diff --git a/rc-service/rc-inner-api/order-inner/order-inner-model/src/main/java/com/red/circle/order/inner/model/enums/MonthlyRechargeType.java b/rc-service/rc-inner-api/order-inner/order-inner-model/src/main/java/com/red/circle/order/inner/model/enums/MonthlyRechargeType.java index 59e2d433..3332e896 100644 --- a/rc-service/rc-inner-api/order-inner/order-inner-model/src/main/java/com/red/circle/order/inner/model/enums/MonthlyRechargeType.java +++ b/rc-service/rc-inner-api/order-inner/order-inner-model/src/main/java/com/red/circle/order/inner/model/enums/MonthlyRechargeType.java @@ -64,6 +64,11 @@ public enum MonthlyRechargeType { */ CLIPSPAY, + /** + * 抽奖兑换 + */ + LOTTERY_EXCHANGE, + /** * 未定义. */ diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryExchangeGoldExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryExchangeGoldExe.java index 132c1dbf..e4d26dce 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryExchangeGoldExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryExchangeGoldExe.java @@ -4,6 +4,8 @@ import com.red.circle.component.redis.service.RedisService; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.framework.core.response.ResponseErrorCode; +import com.red.circle.order.inner.endpoint.UserRechargeCountClient; +import com.red.circle.order.inner.model.enums.MonthlyRechargeType; import com.red.circle.other.app.dto.clientobject.activity.LotteryWithdrawAmountCO; import com.red.circle.other.app.dto.cmd.activity.LotteryExchangeGoldCmd; import com.red.circle.other.app.service.activity.LotteryActivityRestService; @@ -49,6 +51,7 @@ public class LotteryExchangeGoldExe { private final UserRegionClient userRegionClient; private final WalletGoldClient walletGoldClient; private final LotteryWithdrawAmountQryExe lotteryWithdrawAmountQryExe; + private final UserRechargeCountClient userRechargeCountClient; public void execute(LotteryExchangeGoldCmd cmd) { ResponseAssert.isTrue(ResponseErrorCode.REQUEST_PARAMETER_ERROR, @@ -101,6 +104,11 @@ public class LotteryExchangeGoldExe { .build(); ResponseAssert.requiredSuccess(walletGoldClient.changeBalance(build)); + userRechargeCountClient.count( cmd.getReqUserId(), + cmd.getAmount(), + MonthlyRechargeType.LOTTERY_EXCHANGE + ); + log.info("用户{}兑换金币成功,金额{},金币{}", userId, cmd.getAmount(), goldQuantity); } finally { redisService.unlock(key);