Authored by wangshusheng

提交发奖逻辑日志

... ... @@ -30,12 +30,14 @@ public class SendUserAwardTimer {
public void sendAwardToLuckyUser() {
boolean execute = PropertiesUtil.getExecuteTask();
log.info(" SendUserAwardTimer.sendAwardToLuckyUser, execute is {}", execute);
if (!execute) {
log.info("properties is false exit task");
return;
}
// 对中奖表中的所有记录做发放
log.info(" start luckyUserService.sendAwardToLuckyUser");
luckyUserService.sendAwardToLuckyUser(null);
}
... ...
... ... @@ -168,7 +168,7 @@ public class LuckyUserServiceImpl implements ILuckyUserService {
@Override
public void sendAwardToLuckyUser(ActivityReqBO activityReqBO) {
logger.info("Enter LuckyUserServiceImpl.sendAwardToLuckyUser");
logger.info("Enter LuckyUserServiceImpl.sendAwardToLuckyUser activityReqBO is {}", activityReqBO);
List<DrawlineLuckyUser> luckyUserList = new ArrayList<DrawlineLuckyUser>();
if(activityReqBO == null){
// 取出所有活动的中奖记录列表
... ... @@ -178,10 +178,12 @@ public class LuckyUserServiceImpl implements ILuckyUserService {
// 取出指定活动的中奖记录列表
// 查询中奖用户总数
int total = luckyUserDAO.selectCountByActivityId(activityId);
logger.info("LuckyUserServiceImpl.sendAwardToLuckyUser, total is {}", total);
// 查询drawline_lucky_user表里获取中奖用户列表
luckyUserList = luckyUserDAO.selectByActivityId(activityId, 0, total);
}
logger.debug("LuckyUserServiceImpl.sendAwardToLuckyUser, luckyUserList.size is {}", luckyUserList.size());
if(CollectionUtils.isEmpty(luckyUserList)){
return;
}
... ... @@ -195,6 +197,7 @@ public class LuckyUserServiceImpl implements ILuckyUserService {
});
// 对每个activityidmap批量发送限购码
logger.debug("start processActivityMap()");
processActivityMap(transformListMap);
}
... ... @@ -232,6 +235,7 @@ public class LuckyUserServiceImpl implements ILuckyUserService {
}
// 10个中奖记录一个批次调promotion接口发放限购码奖励
int activityLuckyUserCount = activityLuckyUserList.size();
logger.info("LuckyUserServiceImpl.sendAwardPerActivity, activityLuckyUserCount is {}", activityLuckyUserCount);
int page = 0 == activityLuckyUserCount % BATCH_SEND_AWARD_NUM ? activityLuckyUserCount / BATCH_SEND_AWARD_NUM : activityLuckyUserCount / BATCH_SEND_AWARD_NUM + 1;
List<DrawlineLuckyUser> perActivityLuckyUserList = new ArrayList<DrawlineLuckyUser>();
for (int i = 0; i < page; i++) {
... ... @@ -256,6 +260,7 @@ public class LuckyUserServiceImpl implements ILuckyUserService {
logger.info("end invoke promotion.batchAddLimitCodeReceiveRecord");
// 处理中奖用户发放结果,发放成功的修改表状态
logger.info("start updateLuckyUserStatus, activityId is {}", activityId);
updateLuckyUserStatus(limitCodeUserBoArray, activityId);
}
}
... ... @@ -273,7 +278,9 @@ public class LuckyUserServiceImpl implements ILuckyUserService {
for (LimitCodeUserBo limitCodeUserBo : limitCodeUserBoArray) {
uids.add(limitCodeUserBo.getUid());
}
logger.info("start luckyUserDAO.updatePrizeStatusByActIdAndUids, activityId is {}, uids is {}", activityId, uids);
luckyUserDAO.updatePrizeStatusByActIdAndUids(activityId, uids);
logger.debug("end luckyUserDAO.updatePrizeStatusByActIdAndUids, activityId is {}, uids is {}", activityId, uids);
}
}
... ...