领取奖励去除发放抽奖券
This commit is contained in:
parent
77a11aa393
commit
a7d7a95989
@ -87,24 +87,24 @@ public class ClaimActivityRewardExe {
|
|||||||
|
|
||||||
ResponseAssert.isFalse(OtherErrorCode.USER_RECHARGE_INVALID, Objects.isNull(userTotalAmount) || userTotalAmount.compareTo(requiredAmount) < 0);
|
ResponseAssert.isFalse(OtherErrorCode.USER_RECHARGE_INVALID, Objects.isNull(userTotalAmount) || userTotalAmount.compareTo(requiredAmount) < 0);
|
||||||
|
|
||||||
Integer ticketCount = parseTicketCount(targetRule.getJsonData());
|
// Integer ticketCount = parseTicketCount(targetRule.getJsonData());
|
||||||
if (Objects.isNull(ticketCount) || ticketCount <= 0) {
|
// if (Objects.isNull(ticketCount) || ticketCount <= 0) {
|
||||||
ticketCount = 1;
|
// ticketCount = 1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<Long> ticketIds = new ArrayList<>();
|
// List<Long> ticketIds = new ArrayList<>();
|
||||||
for (int i = 0; i < ticketCount; i++) {
|
// for (int i = 0; i < ticketCount; i++) {
|
||||||
Long ticketId = ResponseAssert.requiredSuccess(
|
// Long ticketId = ResponseAssert.requiredSuccess(
|
||||||
lotteryTicketClient.addTicket(
|
// lotteryTicketClient.addTicket(
|
||||||
cmd.getReqUserId(),
|
// cmd.getReqUserId(),
|
||||||
cmd.getActivityId(),
|
// cmd.getActivityId(),
|
||||||
1,
|
// 1,
|
||||||
"ACTIVITY_REWARD",
|
// "ACTIVITY_REWARD",
|
||||||
cmd.getRuleId().toString()
|
// cmd.getRuleId().toString()
|
||||||
)
|
// )
|
||||||
);
|
// );
|
||||||
ticketIds.add(ticketId);
|
// ticketIds.add(ticketId);
|
||||||
}
|
// }
|
||||||
|
|
||||||
UserActivityRewardClaim claim = new UserActivityRewardClaim()
|
UserActivityRewardClaim claim = new UserActivityRewardClaim()
|
||||||
.setUserId(cmd.getReqUserId())
|
.setUserId(cmd.getReqUserId())
|
||||||
@ -112,7 +112,7 @@ public class ClaimActivityRewardExe {
|
|||||||
.setRuleId(cmd.getRuleId())
|
.setRuleId(cmd.getRuleId())
|
||||||
.setActivityType(cmd.getActivityType())
|
.setActivityType(cmd.getActivityType())
|
||||||
.setStatus(1)
|
.setStatus(1)
|
||||||
.setLotteryTicketIds(String.join(",", ticketIds.stream().map(String::valueOf).toArray(String[]::new)))
|
// .setLotteryTicketIds(String.join(",", ticketIds.stream().map(String::valueOf).toArray(String[]::new)))
|
||||||
.setCreateTime(TimestampUtils.now())
|
.setCreateTime(TimestampUtils.now())
|
||||||
.setUpdateTime(TimestampUtils.now());
|
.setUpdateTime(TimestampUtils.now());
|
||||||
|
|
||||||
@ -137,7 +137,8 @@ public class ClaimActivityRewardExe {
|
|||||||
|
|
||||||
return new ClaimRewardResultCO()
|
return new ClaimRewardResultCO()
|
||||||
.setSuccess(true)
|
.setSuccess(true)
|
||||||
.setLotteryTicketIds(ticketIds);
|
// .setLotteryTicketIds(ticketIds)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user