관리자 라이브 정산 API - 인원 추가 #38
| @@ -34,6 +34,7 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) { | ||||
|                     liveRoom.title, | ||||
|                     liveRoom.price, | ||||
|                     useCan.canUsage, | ||||
|                     useCanCalculate.id.count(), | ||||
|                     useCanCalculate.can.sum() | ||||
|                 ) | ||||
|             ) | ||||
|   | ||||
| @@ -26,11 +26,17 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor | ||||
|             .asSequence() | ||||
|             .map { | ||||
|                 val canUsageStr = if (it.canUsage == CanUsage.LIVE) { | ||||
|                     "유료방 참여" | ||||
|                     "유료" | ||||
|                 } else { | ||||
|                     "후원" | ||||
|                 } | ||||
|  | ||||
|                 val numberOfPeople = if (it.canUsage == CanUsage.LIVE) { | ||||
|                     it.memberCount.toInt() | ||||
|                 } else { | ||||
|                     0 | ||||
|                 } | ||||
|  | ||||
|                 // 원화 = totalCoin * 100 ( 캔 1개 = 100원 ) | ||||
|                 val totalKrw = it.totalAmount * 100 | ||||
|  | ||||
| @@ -52,7 +58,8 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor | ||||
|                     date = it.date, | ||||
|                     title = it.title, | ||||
|                     entranceFee = it.entranceFee, | ||||
|                     coinUsageStr = canUsageStr, | ||||
|                     canUsageStr = canUsageStr, | ||||
|                     numberOfPeople = numberOfPeople, | ||||
|                     totalAmount = it.totalAmount, | ||||
|                     totalKrw = totalKrw, | ||||
|                     paymentFee = paymentFee.roundToInt(), | ||||
|   | ||||
| @@ -12,6 +12,8 @@ data class GetCalculateLiveQueryData @QueryProjection constructor( | ||||
|     val entranceFee: Int, | ||||
|     // 코인 사용 구분 | ||||
|     val canUsage: CanUsage, | ||||
|     // 참여인원 | ||||
|     val memberCount: Long, | ||||
|     // 합계 | ||||
|     val totalAmount: Int | ||||
| ) | ||||
|   | ||||
| @@ -7,8 +7,10 @@ data class GetCalculateLiveResponse( | ||||
|     val title: String, | ||||
|     // 유료방 입장 금액 | ||||
|     val entranceFee: Int, | ||||
|     // 코인 사용 구분 | ||||
|     val coinUsageStr: String, | ||||
|     // 캔 사용 구분 | ||||
|     val canUsageStr: String, | ||||
|     // 인원 | ||||
|     val numberOfPeople: Int, | ||||
|     // 합계 | ||||
|     val totalAmount: Int, | ||||
|     // 원화 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user