fix(admin-charge-status): pgChargeAmount와 can의 가격을 가져와서 사용하는 로직을 제거하고 payment에 기록된 가격으로 계산하도록 수정

This commit is contained in:
2025-10-10 22:31:36 +09:00
parent efb8d8115f
commit 84c0768c8b
3 changed files with 2 additions and 9 deletions

View File

@@ -32,7 +32,6 @@ class AdminChargeStatusQueryRepository(private val queryFactory: JPAQueryFactory
QGetChargeStatusQueryDto(
formattedDate,
payment.price.sum(),
can1.price.sum(),
payment.id.count(),
payment.paymentGateway
)

View File

@@ -25,12 +25,7 @@ class AdminChargeStatusService(val repository: AdminChargeStatusQueryRepository)
val chargeStatusList = repository.getChargeStatus(startDate, endDate)
.map {
val chargeAmount = if (it.paymentGateWay == PaymentGateway.PG) {
it.pgChargeAmount
} else {
it.appleChargeAmount
}
val chargeAmount = it.amount
val chargeCount = it.chargeCount
totalChargeAmount += chargeAmount

View File

@@ -6,8 +6,7 @@ import java.math.BigDecimal
data class GetChargeStatusQueryDto @QueryProjection constructor(
val date: String,
val appleChargeAmount: BigDecimal,
val pgChargeAmount: BigDecimal,
val amount: BigDecimal,
val chargeCount: Long,
val paymentGateWay: PaymentGateway
)