라이브 방 후원리스트

- 비밀후원 캔 0보다 크거나 일반후원 캔이 0보다 큰 경우에만 데이터 반환
This commit is contained in:
Klaus 2024-10-29 00:28:03 +09:00
parent 9425889e93
commit 9fcd172581
1 changed files with 1 additions and 0 deletions

View File

@ -1177,6 +1177,7 @@ class LiveRoomService(
val room = repository.getLiveRoom(roomId) ?: throw SodaException("잘못된 요청입니다.")
val isLiveCreator = room.member!!.id == memberId
val donationList = repository.getDonationList(roomId = room.id!!, isLiveCreator = isLiveCreator)
.filter { it.secretCan > 0 || it.can > 0 }
val totalCan = donationList.sumOf { it.can }
val totalSecretCan = donationList.sumOf { it.secretCan }