Compare commits
2 Commits
53e9678efa
...
7b6f3a7a5f
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b6f3a7a5f | |||
| 84c0768c8b |
@@ -32,7 +32,6 @@ class AdminChargeStatusQueryRepository(private val queryFactory: JPAQueryFactory
|
||||
QGetChargeStatusQueryDto(
|
||||
formattedDate,
|
||||
payment.price.sum(),
|
||||
can1.price.sum(),
|
||||
payment.id.count(),
|
||||
payment.paymentGateway
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user