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

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,20 +149,20 @@ public class SignCheckInExe {
List<PropsActivityRewardConfig> configs = propsActivityRewardConfigService.listByGroupId(resourceGroupId);
ResponseAssert.notEmpty(CommonErrorCode.NOT_FOUND_MAPPING_INFO, configs);
PropsActivityRewardConfig config = configs.get(0);
propsSendCommon.send(new PrizeDescribeRewardCmd()
.setTrackId(config.getGroupId())
.setAcceptUserId(userId)
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
.setPrizes(Collections.singletonList(new PrizeDescribe()
.setTrackId(config.getGroupId())
.setType(config.getType())
.setDetailType(config.getDetailType())
.setContent(config.getContent())
.setQuantity(config.getQuantity())))
);
configs.forEach(config -> {
propsSendCommon.send(new PrizeDescribeRewardCmd()
.setTrackId(config.getGroupId())
.setAcceptUserId(userId)
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
.setPrizes(Collections.singletonList(new PrizeDescribe()
.setTrackId(config.getGroupId())
.setType(config.getType())
.setDetailType(config.getDetailType())
.setContent(config.getContent())
.setQuantity(config.getQuantity())))
);
});
}
/**
@ -174,15 +174,13 @@ public class SignCheckInExe {
}
try {
for (int i = 0; i < config.getLotteryTicketCount(); i++) {
Long ticketId = lotteryTicketClient.addTicket(
userId,
FIXED_ACTIVITY_ID,
config.getLotteryTicketCount(),
"SIGN_IN",
"SIGN_IN_DAY_" + config.getDayIndex()
).getBody();
}
lotteryTicketClient.addTicket(
userId,
FIXED_ACTIVITY_ID,
config.getLotteryTicketCount(),
"SIGN_IN",
"SIGN_IN_DAY_" + config.getDayIndex()
);
} catch (Exception e) {
log.error("发放签到抽奖券失败, userId={}, dayIndex={}, count={}",
userId, config.getDayIndex(), config.getLotteryTicketCount(), e);

View File

@ -152,20 +152,20 @@ public class SupplementCheckInExe {
List<PropsActivityRewardConfig> configs = propsActivityRewardConfigService.listByGroupId(resourceGroupId);
ResponseAssert.notEmpty(CommonErrorCode.NOT_FOUND_MAPPING_INFO, configs);
PropsActivityRewardConfig config = configs.get(0);
propsSendCommon.send(new PrizeDescribeRewardCmd()
.setTrackId(config.getGroupId())
.setAcceptUserId(userId)
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
.setPrizes(Collections.singletonList(new PrizeDescribe()
.setTrackId(config.getGroupId())
.setType(config.getType())
.setDetailType(config.getDetailType())
.setContent(config.getContent())
.setQuantity(config.getQuantity())))
);
configs.forEach(config -> {
propsSendCommon.send(new PrizeDescribeRewardCmd()
.setTrackId(config.getGroupId())
.setAcceptUserId(userId)
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
.setPrizes(Collections.singletonList(new PrizeDescribe()
.setTrackId(config.getGroupId())
.setType(config.getType())
.setDetailType(config.getDetailType())
.setContent(config.getContent())
.setQuantity(config.getQuantity())))
);
});
}
@ -178,15 +178,13 @@ public class SupplementCheckInExe {
}
try {
for (int i = 0; i < config.getLotteryTicketCount(); i++) {
Long ticketId = lotteryTicketClient.addTicket(
userId,
FIXED_ACTIVITY_ID,
config.getLotteryTicketCount(),
"SIGN_IN",
"SIGN_IN_DAY_" + config.getDayIndex()
).getBody();
}
lotteryTicketClient.addTicket(
userId,
FIXED_ACTIVITY_ID,
config.getLotteryTicketCount(),
"SIGN_IN",
"SIGN_IN_DAY_" + config.getDayIndex()
);
} catch (Exception e) {
log.error("发放签到抽奖券失败, userId={}, dayIndex={}, count={}",
userId, config.getDayIndex(), config.getLotteryTicketCount(), e);