抽奖兑换计入充值
This commit is contained in:
parent
653e2d6ce2
commit
e43018560e
@ -64,6 +64,11 @@ public enum MonthlyRechargeType {
|
||||
*/
|
||||
CLIPSPAY,
|
||||
|
||||
/**
|
||||
* 抽奖兑换
|
||||
*/
|
||||
LOTTERY_EXCHANGE,
|
||||
|
||||
/**
|
||||
* 未定义.
|
||||
*/
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user