|
|
@@ -283,7 +283,7 @@ public class KxsCampServiceImpl extends ServiceImpl<KxsCampMapper, KxsCamp> impl
|
|
|
if (kxsCampUser != null) {
|
|
|
kxsCamp = baseMapper.selectById(kxsCampUser.getCampId());
|
|
|
//判断绑定时间
|
|
|
- if (!LocalDateTimeUtil.isIn(bindTime, kxsCamp.getStartTime(), kxsCamp.getEndTime(), false, false)) {
|
|
|
+ if(kxsCamp.getStartTime().isAfter(bindTime)){
|
|
|
return;
|
|
|
}
|
|
|
kxsCamp.setOpenNum(kxsCamp.getOpenNum() + (param.getActType() == 4 ? 2 : 1));
|
|
|
@@ -315,8 +315,6 @@ public class KxsCampServiceImpl extends ServiceImpl<KxsCampMapper, KxsCamp> impl
|
|
|
@Async
|
|
|
public void poweronQuantityStatistics() {
|
|
|
//查询正在进行中的活动
|
|
|
- LocalDateTime now = LocalDateTime.now();
|
|
|
- //定时任务执行中时,查询当前正在进行的活动,由于定时任务执行时间偏差,当前时间减1一分钟判断
|
|
|
List<KxsCamp> list = baseMapper.selectList(Wrappers.<KxsCamp>lambdaQuery().eq(KxsCamp::getStatus, CampStatusEnum.STATUS_NORMAL.getType()));
|
|
|
//查询活动参与的创客
|
|
|
for (KxsCamp kxsCamp : list) {
|
|
|
@@ -369,11 +367,18 @@ public class KxsCampServiceImpl extends ServiceImpl<KxsCampMapper, KxsCamp> impl
|
|
|
KxsCampUser kxsCampUser = campUsersMap.get(userId);
|
|
|
kxsCampUser.setTeamLeaderNum(kxsCampUser.getTeamLeaderNum() + 1);
|
|
|
kxsCampUserService.update(Wrappers.<KxsCampUser>lambdaUpdate().eq(KxsCampUser::getId, kxsCampUser.getId()).set(KxsCampUser::getTeamLeaderNum, kxsCampUser.getTeamLeaderNum()));
|
|
|
- this.update(Wrappers.<KxsCamp>lambdaUpdate().eq(KxsCamp::getId, kxsCamp.getId()).set(KxsCamp::getOrderNum, kxsCamp.getOrderNum() + 1));
|
|
|
+
|
|
|
log.info("创客{}的上级{}参与训练营,进入到{}订单统计", leader.getUserId(), userId, kxsCamp.getTitle());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ //刷新训练营统计
|
|
|
+ int leaderNum = 0;
|
|
|
+ List<KxsCampUser> users = kxsCampUserService.list(Wrappers.<KxsCampUser>lambdaQuery().eq(KxsCampUser::getCampId, kxsCamp.getId()));
|
|
|
+ for (KxsCampUser user : users) {
|
|
|
+ leaderNum = leaderNum + user.getTeamLeaderNum();
|
|
|
+ }
|
|
|
+ kxsCamp.setOrderNum(kxsCamp.getOrderNum() + leaderNum);
|
|
|
+ baseMapper.updateById(kxsCamp);
|
|
|
}
|
|
|
|
|
|
}
|