카울리를 이용한 무료충전 테이블 adProfit 과 point 타입 int -> float 로 변경 #56

Merged
klaus merged 1 commits from test into main 2023-10-26 16:55:40 +00:00
2 changed files with 8 additions and 8 deletions

View File

@ -12,9 +12,9 @@ data class AdsCharge(
val transactionKey: String,
val adKey: String,
val adName: String,
val adProfit: Int,
val adProfit: Float,
val adCurrency: String,
val point: Int,
val point: Float,
val deviceIfa: String
) : BaseEntity() {
@ManyToOne(fetch = FetchType.LAZY)

View File

@ -49,16 +49,16 @@ class AdsChargeService(
transactionKey = transactionKey,
adKey = adKey,
adName = adName,
adProfit = adProfit.toInt(),
adProfit = adProfit.toFloat(),
adCurrency = adCurrency,
point = point.toInt(),
point = point.toFloat(),
deviceIfa = deviceIfa
)
adsCharge.member = member
repository.save(adsCharge)
val charge = Charge(0, rewardCan = point.toInt(), status = ChargeStatus.ADS)
charge.title = "${point.toInt()}"
val charge = Charge(0, rewardCan = adsCharge.point.toInt(), status = ChargeStatus.ADS)
charge.title = "${adsCharge.point.toInt()}"
charge.member = member
val payment = Payment(
@ -70,13 +70,13 @@ class AdsChargeService(
charge.payment = payment
chargeRepository.save(charge)
member.charge(0, point.toInt(), "ads")
member.charge(0, adsCharge.point.toInt(), "ads")
applicationEventPublisher.publishEvent(
FcmEvent(
type = FcmEventType.INDIVIDUAL,
title = "제휴보상",
message = "${point.toInt()} 캔이 지급되었습니다.",
message = "${adsCharge.point.toInt()} 캔이 지급되었습니다.",
recipients = listOf(member.id!!),
isAuth = false
)