Compare commits

..

No commits in common. "0ee7faa55199824a79e8c61f5221e1599df8cd2b" and "e5fdced681369634db82ed69d3bad967940fdccb" have entirely different histories.

2 changed files with 8 additions and 8 deletions

View File

@ -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: Float, val adProfit: Int,
val adCurrency: String, val adCurrency: String,
val point: Float, val point: Int,
val deviceIfa: String val deviceIfa: String
) : BaseEntity() { ) : BaseEntity() {
@ManyToOne(fetch = FetchType.LAZY) @ManyToOne(fetch = FetchType.LAZY)

View File

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