temp: 캔 가격 타입 Int -> Double로 변경

This commit is contained in:
2025-10-01 16:07:34 +09:00
parent 863c285049
commit 78ff13a654
9 changed files with 11 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ import kr.co.vividnext.sodalive.extensions.moneyFormat
data class AdminCanRequest( data class AdminCanRequest(
val can: Int, val can: Int,
val rewardCan: Int, val rewardCan: Int,
val price: Int val price: Double
) { ) {
fun toEntity(): Can { fun toEntity(): Can {
var title = "${can.moneyFormat()}" var title = "${can.moneyFormat()}"

View File

@@ -20,7 +20,7 @@ class AdminChargeStatusService(val repository: AdminChargeStatusQueryRepository)
.withZoneSameInstant(ZoneId.of("UTC")) .withZoneSameInstant(ZoneId.of("UTC"))
.toLocalDateTime() .toLocalDateTime()
var totalChargeAmount = 0 var totalChargeAmount = 0.toDouble()
var totalChargeCount = 0L var totalChargeCount = 0L
val chargeStatusList = repository.getChargeStatus(startDate, endDate) val chargeStatusList = repository.getChargeStatus(startDate, endDate)
@@ -29,7 +29,7 @@ class AdminChargeStatusService(val repository: AdminChargeStatusQueryRepository)
val chargeAmount = if (it.paymentGateWay == PaymentGateway.PG) { val chargeAmount = if (it.paymentGateWay == PaymentGateway.PG) {
it.pgChargeAmount it.pgChargeAmount
} else { } else {
it.appleChargeAmount.toInt() it.appleChargeAmount
} }
val chargeCount = it.chargeCount val chargeCount = it.chargeCount

View File

@@ -7,7 +7,7 @@ data class GetChargeStatusDetailQueryDto @QueryProjection constructor(
val nickname: String, val nickname: String,
val method: String, val method: String,
val appleChargeAmount: Double, val appleChargeAmount: Double,
val pgChargeAmount: Int, val pgChargeAmount: Double,
val locale: String, val locale: String,
val datetime: String val datetime: String
) )

View File

@@ -6,7 +6,7 @@ import kr.co.vividnext.sodalive.can.payment.PaymentGateway
data class GetChargeStatusQueryDto @QueryProjection constructor( data class GetChargeStatusQueryDto @QueryProjection constructor(
val date: String, val date: String,
val appleChargeAmount: Double, val appleChargeAmount: Double,
val pgChargeAmount: Int, val pgChargeAmount: Double,
val chargeCount: Long, val chargeCount: Long,
val paymentGateWay: PaymentGateway val paymentGateWay: PaymentGateway
) )

View File

@@ -2,7 +2,7 @@ package kr.co.vividnext.sodalive.admin.charge
data class GetChargeStatusResponse( data class GetChargeStatusResponse(
val date: String, val date: String,
val chargeAmount: Int, val chargeAmount: Double,
val chargeCount: Long, val chargeCount: Long,
val pg: String val pg: String
) )

View File

@@ -10,7 +10,7 @@ data class Can(
var title: String, var title: String,
var can: Int, var can: Int,
var rewardCan: Int, var rewardCan: Int,
var price: Int, var price: Double,
@Enumerated(value = EnumType.STRING) @Enumerated(value = EnumType.STRING)
var status: CanStatus var status: CanStatus
) : BaseEntity() ) : BaseEntity()

View File

@@ -7,5 +7,5 @@ data class CanResponse @QueryProjection constructor(
val title: String, val title: String,
val can: Int, val can: Int,
val rewardCan: Int, val rewardCan: Int,
val price: Int val price: Double
) )

View File

@@ -21,7 +21,7 @@ data class VerifyResult(
val method: String, val method: String,
val pg: String, val pg: String,
val status: Int, val status: Int,
val price: Int val price: Double
) )
data class AppleChargeRequest( data class AppleChargeRequest(

View File

@@ -66,7 +66,7 @@ class ChargeTempService(
VerifyResult::class.java 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?.receiptId = verifyResult.receiptId
charge.payment?.method = verifyResult.method charge.payment?.method = verifyResult.method
charge.payment?.status = PaymentStatus.COMPLETE charge.payment?.status = PaymentStatus.COMPLETE
@@ -74,7 +74,7 @@ class ChargeTempService(
} else { } else {
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
} catch (e: Exception) { } catch (_: Exception) {
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
} else { } else {