temp: 캔 가격 타입 Int -> Double로 변경
This commit is contained in:
@@ -7,7 +7,7 @@ import kr.co.vividnext.sodalive.extensions.moneyFormat
|
||||
data class AdminCanRequest(
|
||||
val can: Int,
|
||||
val rewardCan: Int,
|
||||
val price: Int
|
||||
val price: Double
|
||||
) {
|
||||
fun toEntity(): Can {
|
||||
var title = "${can.moneyFormat()} 캔"
|
||||
|
@@ -20,7 +20,7 @@ class AdminChargeStatusService(val repository: AdminChargeStatusQueryRepository)
|
||||
.withZoneSameInstant(ZoneId.of("UTC"))
|
||||
.toLocalDateTime()
|
||||
|
||||
var totalChargeAmount = 0
|
||||
var totalChargeAmount = 0.toDouble()
|
||||
var totalChargeCount = 0L
|
||||
|
||||
val chargeStatusList = repository.getChargeStatus(startDate, endDate)
|
||||
@@ -29,7 +29,7 @@ class AdminChargeStatusService(val repository: AdminChargeStatusQueryRepository)
|
||||
val chargeAmount = if (it.paymentGateWay == PaymentGateway.PG) {
|
||||
it.pgChargeAmount
|
||||
} else {
|
||||
it.appleChargeAmount.toInt()
|
||||
it.appleChargeAmount
|
||||
}
|
||||
|
||||
val chargeCount = it.chargeCount
|
||||
|
@@ -7,7 +7,7 @@ data class GetChargeStatusDetailQueryDto @QueryProjection constructor(
|
||||
val nickname: String,
|
||||
val method: String,
|
||||
val appleChargeAmount: Double,
|
||||
val pgChargeAmount: Int,
|
||||
val pgChargeAmount: Double,
|
||||
val locale: String,
|
||||
val datetime: String
|
||||
)
|
||||
|
@@ -6,7 +6,7 @@ import kr.co.vividnext.sodalive.can.payment.PaymentGateway
|
||||
data class GetChargeStatusQueryDto @QueryProjection constructor(
|
||||
val date: String,
|
||||
val appleChargeAmount: Double,
|
||||
val pgChargeAmount: Int,
|
||||
val pgChargeAmount: Double,
|
||||
val chargeCount: Long,
|
||||
val paymentGateWay: PaymentGateway
|
||||
)
|
||||
|
@@ -2,7 +2,7 @@ package kr.co.vividnext.sodalive.admin.charge
|
||||
|
||||
data class GetChargeStatusResponse(
|
||||
val date: String,
|
||||
val chargeAmount: Int,
|
||||
val chargeAmount: Double,
|
||||
val chargeCount: Long,
|
||||
val pg: String
|
||||
)
|
||||
|
@@ -10,7 +10,7 @@ data class Can(
|
||||
var title: String,
|
||||
var can: Int,
|
||||
var rewardCan: Int,
|
||||
var price: Int,
|
||||
var price: Double,
|
||||
@Enumerated(value = EnumType.STRING)
|
||||
var status: CanStatus
|
||||
) : BaseEntity()
|
||||
|
@@ -7,5 +7,5 @@ data class CanResponse @QueryProjection constructor(
|
||||
val title: String,
|
||||
val can: Int,
|
||||
val rewardCan: Int,
|
||||
val price: Int
|
||||
val price: Double
|
||||
)
|
||||
|
@@ -21,7 +21,7 @@ data class VerifyResult(
|
||||
val method: String,
|
||||
val pg: String,
|
||||
val status: Int,
|
||||
val price: Int
|
||||
val price: Double
|
||||
)
|
||||
|
||||
data class AppleChargeRequest(
|
||||
|
@@ -66,7 +66,7 @@ class ChargeTempService(
|
||||
VerifyResult::class.java
|
||||
)
|
||||
|
||||
if (verifyResult.status == 1 && verifyResult.price == charge.payment!!.price.toInt()) {
|
||||
if (verifyResult.status == 1 && verifyResult.price == charge.payment!!.price) {
|
||||
charge.payment?.receiptId = verifyResult.receiptId
|
||||
charge.payment?.method = verifyResult.method
|
||||
charge.payment?.status = PaymentStatus.COMPLETE
|
||||
@@ -74,7 +74,7 @@ class ChargeTempService(
|
||||
} else {
|
||||
throw SodaException("결제정보에 오류가 있습니다.")
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
throw SodaException("결제정보에 오류가 있습니다.")
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user