카울리를 이용한 무료충전 테이블 adProfit 과 point 타입 int -> float 로 변경
This commit is contained in:
parent
1c7fdfac69
commit
146205e4f7
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue