fix(admin-charge-status-detail): pgChargeAmount와 can의 가격을 가져와서 사용하는 로직을 제거하고 payment에 기록된 가격으로 계산하도록 수정
This commit is contained in:
@@ -74,7 +74,6 @@ class AdminChargeStatusQueryRepository(private val queryFactory: JPAQueryFactory
|
|||||||
member.nickname,
|
member.nickname,
|
||||||
payment.method.coalesce(""),
|
payment.method.coalesce(""),
|
||||||
payment.price,
|
payment.price,
|
||||||
can1.price,
|
|
||||||
payment.locale.coalesce(""),
|
payment.locale.coalesce(""),
|
||||||
formattedDate
|
formattedDate
|
||||||
)
|
)
|
||||||
|
@@ -69,17 +69,15 @@ class AdminChargeStatusService(val repository: AdminChargeStatusQueryRepository)
|
|||||||
.toLocalDateTime()
|
.toLocalDateTime()
|
||||||
|
|
||||||
return repository.getChargeStatusDetail(startDate, endDate, paymentGateway)
|
return repository.getChargeStatusDetail(startDate, endDate, paymentGateway)
|
||||||
.asSequence()
|
|
||||||
.map {
|
.map {
|
||||||
GetChargeStatusDetailResponse(
|
GetChargeStatusDetailResponse(
|
||||||
memberId = it.memberId,
|
memberId = it.memberId,
|
||||||
nickname = it.nickname,
|
nickname = it.nickname,
|
||||||
method = it.method,
|
method = it.method,
|
||||||
amount = it.appleChargeAmount.toInt(),
|
amount = it.amount.toInt(),
|
||||||
locale = it.locale,
|
locale = it.locale,
|
||||||
datetime = it.datetime
|
datetime = it.datetime
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.toList()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,8 +7,7 @@ data class GetChargeStatusDetailQueryDto @QueryProjection constructor(
|
|||||||
val memberId: Long,
|
val memberId: Long,
|
||||||
val nickname: String,
|
val nickname: String,
|
||||||
val method: String,
|
val method: String,
|
||||||
val appleChargeAmount: BigDecimal,
|
val amount: BigDecimal,
|
||||||
val pgChargeAmount: BigDecimal,
|
|
||||||
val locale: String,
|
val locale: String,
|
||||||
val datetime: String
|
val datetime: String
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user