签到发送奖励和券问题处理

This commit is contained in:
tianfeng 2026-01-19 22:17:44 +08:00
parent 8ed2a132c2
commit 4fd156ba23
2 changed files with 42 additions and 46 deletions

View File

@ -149,8 +149,7 @@ public class SignCheckInExe {
List<PropsActivityRewardConfig> configs = propsActivityRewardConfigService.listByGroupId(resourceGroupId); List<PropsActivityRewardConfig> configs = propsActivityRewardConfigService.listByGroupId(resourceGroupId);
ResponseAssert.notEmpty(CommonErrorCode.NOT_FOUND_MAPPING_INFO, configs); ResponseAssert.notEmpty(CommonErrorCode.NOT_FOUND_MAPPING_INFO, configs);
PropsActivityRewardConfig config = configs.get(0); configs.forEach(config -> {
propsSendCommon.send(new PrizeDescribeRewardCmd() propsSendCommon.send(new PrizeDescribeRewardCmd()
.setTrackId(config.getGroupId()) .setTrackId(config.getGroupId())
.setAcceptUserId(userId) .setAcceptUserId(userId)
@ -163,6 +162,7 @@ public class SignCheckInExe {
.setContent(config.getContent()) .setContent(config.getContent())
.setQuantity(config.getQuantity()))) .setQuantity(config.getQuantity())))
); );
});
} }
/** /**
@ -174,15 +174,13 @@ public class SignCheckInExe {
} }
try { try {
for (int i = 0; i < config.getLotteryTicketCount(); i++) { lotteryTicketClient.addTicket(
Long ticketId = lotteryTicketClient.addTicket(
userId, userId,
FIXED_ACTIVITY_ID, FIXED_ACTIVITY_ID,
config.getLotteryTicketCount(), config.getLotteryTicketCount(),
"SIGN_IN", "SIGN_IN",
"SIGN_IN_DAY_" + config.getDayIndex() "SIGN_IN_DAY_" + config.getDayIndex()
).getBody(); );
}
} catch (Exception e) { } catch (Exception e) {
log.error("发放签到抽奖券失败, userId={}, dayIndex={}, count={}", log.error("发放签到抽奖券失败, userId={}, dayIndex={}, count={}",
userId, config.getDayIndex(), config.getLotteryTicketCount(), e); userId, config.getDayIndex(), config.getLotteryTicketCount(), e);

View File

@ -152,8 +152,7 @@ public class SupplementCheckInExe {
List<PropsActivityRewardConfig> configs = propsActivityRewardConfigService.listByGroupId(resourceGroupId); List<PropsActivityRewardConfig> configs = propsActivityRewardConfigService.listByGroupId(resourceGroupId);
ResponseAssert.notEmpty(CommonErrorCode.NOT_FOUND_MAPPING_INFO, configs); ResponseAssert.notEmpty(CommonErrorCode.NOT_FOUND_MAPPING_INFO, configs);
PropsActivityRewardConfig config = configs.get(0); configs.forEach(config -> {
propsSendCommon.send(new PrizeDescribeRewardCmd() propsSendCommon.send(new PrizeDescribeRewardCmd()
.setTrackId(config.getGroupId()) .setTrackId(config.getGroupId())
.setAcceptUserId(userId) .setAcceptUserId(userId)
@ -166,6 +165,7 @@ public class SupplementCheckInExe {
.setContent(config.getContent()) .setContent(config.getContent())
.setQuantity(config.getQuantity()))) .setQuantity(config.getQuantity())))
); );
});
} }
@ -178,15 +178,13 @@ public class SupplementCheckInExe {
} }
try { try {
for (int i = 0; i < config.getLotteryTicketCount(); i++) { lotteryTicketClient.addTicket(
Long ticketId = lotteryTicketClient.addTicket(
userId, userId,
FIXED_ACTIVITY_ID, FIXED_ACTIVITY_ID,
config.getLotteryTicketCount(), config.getLotteryTicketCount(),
"SIGN_IN", "SIGN_IN",
"SIGN_IN_DAY_" + config.getDayIndex() "SIGN_IN_DAY_" + config.getDayIndex()
).getBody(); );
}
} catch (Exception e) { } catch (Exception e) {
log.error("发放签到抽奖券失败, userId={}, dayIndex={}, count={}", log.error("发放签到抽奖券失败, userId={}, dayIndex={}, count={}",
userId, config.getDayIndex(), config.getLotteryTicketCount(), e); userId, config.getDayIndex(), config.getLotteryTicketCount(), e);