From 9425889e93b65d7b3f7ea21ac13b3cd01fd92e54 Mon Sep 17 00:00:00 2001 From: Klaus Date: Mon, 28 Oct 2024 16:32:08 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EB=B0=A9=20?= =?UTF-8?q?=ED=9B=84=EC=9B=90=EB=A6=AC=EC=8A=A4=ED=8A=B8=20-=20=ED=9B=84?= =?UTF-8?q?=EC=9B=90=EB=A6=AC=EC=8A=A4=ED=8A=B8=20=ED=95=A9=EA=B3=84=20?= =?UTF-8?q?=EC=9D=BC=EB=B0=98=ED=9B=84=EC=9B=90=EA=B3=BC=20=EB=B9=84?= =?UTF-8?q?=EB=B0=80=ED=9B=84=EC=9B=90=20=EA=B0=92=EC=9D=84=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kr/co/vividnext/sodalive/live/room/LiveRoomService.kt | 6 ++++-- .../live/room/donation/GetLiveRoomDonationStatusResponse.kt | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt index 7f02bc2..bfeaf41 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/LiveRoomService.kt @@ -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 ) } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationStatusResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationStatusResponse.kt index a251b5d..cb25eb0 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationStatusResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/live/room/donation/GetLiveRoomDonationStatusResponse.kt @@ -5,7 +5,8 @@ import com.querydsl.core.annotations.QueryProjection data class GetLiveRoomDonationStatusResponse( val donationList: List, val totalCount: Int, - val totalCan: Int + val totalCan: Int, + val totalSecretCan: Int ) data class GetLiveRoomDonationItem @QueryProjection constructor(