领取奖励去除发放抽奖券
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);
|
||||
|
||||
Integer ticketCount = parseTicketCount(targetRule.getJsonData());
|
||||
if (Objects.isNull(ticketCount) || ticketCount <= 0) {
|
||||
ticketCount = 1;
|
||||
}
|
||||
// Integer ticketCount = parseTicketCount(targetRule.getJsonData());
|
||||
// if (Objects.isNull(ticketCount) || ticketCount <= 0) {
|
||||
// ticketCount = 1;
|
||||
// }
|
||||
|
||||
List<Long> ticketIds = new ArrayList<>();
|
||||
for (int i = 0; i < ticketCount; i++) {
|
||||
Long ticketId = ResponseAssert.requiredSuccess(
|
||||
lotteryTicketClient.addTicket(
|
||||
cmd.getReqUserId(),
|
||||
cmd.getActivityId(),
|
||||
1,
|
||||
"ACTIVITY_REWARD",
|
||||
cmd.getRuleId().toString()
|
||||
)
|
||||
);
|
||||
ticketIds.add(ticketId);
|
||||
}
|
||||
// List<Long> ticketIds = new ArrayList<>();
|
||||
// for (int i = 0; i < ticketCount; i++) {
|
||||
// Long ticketId = ResponseAssert.requiredSuccess(
|
||||
// lotteryTicketClient.addTicket(
|
||||
// cmd.getReqUserId(),
|
||||
// cmd.getActivityId(),
|
||||
// 1,
|
||||
// "ACTIVITY_REWARD",
|
||||
// cmd.getRuleId().toString()
|
||||
// )
|
||||
// );
|
||||
// ticketIds.add(ticketId);
|
||||
// }
|
||||
|
||||
UserActivityRewardClaim claim = new UserActivityRewardClaim()
|
||||
.setUserId(cmd.getReqUserId())
|
||||
@ -112,7 +112,7 @@ public class ClaimActivityRewardExe {
|
||||
.setRuleId(cmd.getRuleId())
|
||||
.setActivityType(cmd.getActivityType())
|
||||
.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())
|
||||
.setUpdateTime(TimestampUtils.now());
|
||||
|
||||
@ -137,7 +137,8 @@ public class ClaimActivityRewardExe {
|
||||
|
||||
return new ClaimRewardResultCO()
|
||||
.setSuccess(true)
|
||||
.setLotteryTicketIds(ticketIds);
|
||||
// .setLotteryTicketIds(ticketIds)
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user