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