라이브 방 후원리스트

- 후원리스트 합계 일반후원과 비밀후원 값을 분리
This commit is contained in:
Klaus 2024-10-28 16:32:08 +09:00
parent 4c9277f61a
commit 9425889e93
2 changed files with 6 additions and 3 deletions

View File

@ -1177,12 +1177,14 @@ class LiveRoomService(
val room = repository.getLiveRoom(roomId) ?: throw SodaException("잘못된 요청입니다.")
val isLiveCreator = room.member!!.id == memberId
val donationList = repository.getDonationList(roomId = room.id!!, isLiveCreator = isLiveCreator)
val totalCan = donationList.sumOf { it.can + it.secretCan }
val totalCan = donationList.sumOf { it.can }
val totalSecretCan = donationList.sumOf { it.secretCan }
return GetLiveRoomDonationStatusResponse(
donationList = donationList,
totalCount = donationList.size,
totalCan = totalCan
totalCan = totalCan,
totalSecretCan = totalSecretCan
)
}

View File

@ -5,7 +5,8 @@ import com.querydsl.core.annotations.QueryProjection
data class GetLiveRoomDonationStatusResponse(
val donationList: List<GetLiveRoomDonationItem>,
val totalCount: Int,
val totalCan: Int
val totalCan: Int,
val totalSecretCan: Int
)
data class GetLiveRoomDonationItem @QueryProjection constructor(