카울리를 이용한 무료충전 테이블 adProfit 과 point 타입 int -> float 로 변경 #56
|
@ -12,9 +12,9 @@ data class AdsCharge(
|
||||||
val transactionKey: String,
|
val transactionKey: String,
|
||||||
val adKey: String,
|
val adKey: String,
|
||||||
val adName: String,
|
val adName: String,
|
||||||
val adProfit: Int,
|
val adProfit: Float,
|
||||||
val adCurrency: String,
|
val adCurrency: String,
|
||||||
val point: Int,
|
val point: Float,
|
||||||
val deviceIfa: String
|
val deviceIfa: String
|
||||||
) : BaseEntity() {
|
) : BaseEntity() {
|
||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
|
|
@ -49,16 +49,16 @@ class AdsChargeService(
|
||||||
transactionKey = transactionKey,
|
transactionKey = transactionKey,
|
||||||
adKey = adKey,
|
adKey = adKey,
|
||||||
adName = adName,
|
adName = adName,
|
||||||
adProfit = adProfit.toInt(),
|
adProfit = adProfit.toFloat(),
|
||||||
adCurrency = adCurrency,
|
adCurrency = adCurrency,
|
||||||
point = point.toInt(),
|
point = point.toFloat(),
|
||||||
deviceIfa = deviceIfa
|
deviceIfa = deviceIfa
|
||||||
)
|
)
|
||||||
adsCharge.member = member
|
adsCharge.member = member
|
||||||
repository.save(adsCharge)
|
repository.save(adsCharge)
|
||||||
|
|
||||||
val charge = Charge(0, rewardCan = point.toInt(), status = ChargeStatus.ADS)
|
val charge = Charge(0, rewardCan = adsCharge.point.toInt(), status = ChargeStatus.ADS)
|
||||||
charge.title = "${point.toInt()} 캔"
|
charge.title = "${adsCharge.point.toInt()} 캔"
|
||||||
charge.member = member
|
charge.member = member
|
||||||
|
|
||||||
val payment = Payment(
|
val payment = Payment(
|
||||||
|
@ -70,13 +70,13 @@ class AdsChargeService(
|
||||||
charge.payment = payment
|
charge.payment = payment
|
||||||
chargeRepository.save(charge)
|
chargeRepository.save(charge)
|
||||||
|
|
||||||
member.charge(0, point.toInt(), "ads")
|
member.charge(0, adsCharge.point.toInt(), "ads")
|
||||||
|
|
||||||
applicationEventPublisher.publishEvent(
|
applicationEventPublisher.publishEvent(
|
||||||
FcmEvent(
|
FcmEvent(
|
||||||
type = FcmEventType.INDIVIDUAL,
|
type = FcmEventType.INDIVIDUAL,
|
||||||
title = "제휴보상",
|
title = "제휴보상",
|
||||||
message = "${point.toInt()} 캔이 지급되었습니다.",
|
message = "${adsCharge.point.toInt()} 캔이 지급되었습니다.",
|
||||||
recipients = listOf(member.id!!),
|
recipients = listOf(member.id!!),
|
||||||
isAuth = false
|
isAuth = false
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue