라이브 방 후원리스트
- 후원리스트 합계 일반후원과 비밀후원 값을 분리
This commit is contained in:
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
@@ -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(
|
||||
|
Reference in New Issue
Block a user