签到发送奖励和券问题处理
This commit is contained in:
parent
8ed2a132c2
commit
4fd156ba23
@ -149,20 +149,20 @@ 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)
|
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
|
||||||
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
|
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
|
||||||
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
|
.setPrizes(Collections.singletonList(new PrizeDescribe()
|
||||||
.setPrizes(Collections.singletonList(new PrizeDescribe()
|
.setTrackId(config.getGroupId())
|
||||||
.setTrackId(config.getGroupId())
|
.setType(config.getType())
|
||||||
.setType(config.getType())
|
.setDetailType(config.getDetailType())
|
||||||
.setDetailType(config.getDetailType())
|
.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);
|
||||||
|
|||||||
@ -152,20 +152,20 @@ 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)
|
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
|
||||||
.setOrigin(SendPropsOrigin.SIGN_IN_REWARD)
|
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
|
||||||
.setSysOrigin(SysOriginPlatformEnum.LIKEI)
|
.setPrizes(Collections.singletonList(new PrizeDescribe()
|
||||||
.setPrizes(Collections.singletonList(new PrizeDescribe()
|
.setTrackId(config.getGroupId())
|
||||||
.setTrackId(config.getGroupId())
|
.setType(config.getType())
|
||||||
.setType(config.getType())
|
.setDetailType(config.getDetailType())
|
||||||
.setDetailType(config.getDetailType())
|
.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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user