|
|
@@ -157,15 +157,16 @@ public class KxsCampServiceImpl extends ServiceImpl<KxsCampMapper, KxsCamp> impl
|
|
|
errorMessageList.add(new ErrorMessage(excel.getLineNum(), errorMsg));
|
|
|
}
|
|
|
}
|
|
|
- if (CollUtil.isNotEmpty(errorMessageList)) {
|
|
|
- return R.failed(JSON.toJSONString(errorMessageList));
|
|
|
- }
|
|
|
//刷新参与人数
|
|
|
- List<KxsCamp> kxsCamps = baseMapper.selectList(Wrappers.<KxsCamp>lambdaQuery().eq(KxsCamp::getStatus, CampStatusEnum.STATUS_NORMAL.getType()));
|
|
|
+ List<KxsCamp> kxsCamps = baseMapper.selectList(Wrappers.<KxsCamp>lambdaQuery().lt(KxsCamp::getStatus, CampStatusEnum.STATUS_END.getType()));
|
|
|
for (KxsCamp kxsCamp : kxsCamps) {
|
|
|
long count = kxsCampUserService.count(Wrappers.<KxsCampUser>lambdaQuery().eq(KxsCampUser::getCampId, kxsCamp.getId()));
|
|
|
baseMapper.update(null, Wrappers.<KxsCamp>lambdaUpdate().set(KxsCamp::getUserNum, count).eq(KxsCamp::getId, kxsCamp.getId()));
|
|
|
}
|
|
|
+ if (CollUtil.isNotEmpty(errorMessageList)) {
|
|
|
+ return R.failed(JSON.toJSONString(errorMessageList));
|
|
|
+ }
|
|
|
+
|
|
|
return R.ok();
|
|
|
}
|
|
|
|