|
@@ -2,7 +2,6 @@ package com.qmth.themis.business.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.qmth.themis.business.bean.admin.ExamActivityTodayBean;
|
|
import com.qmth.themis.business.bean.admin.ExamActivityTodayBean;
|
|
-import com.qmth.themis.business.bean.admin.ExamListBean;
|
|
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
import com.qmth.themis.business.cache.bean.ExamCacheBean;
|
|
import com.qmth.themis.business.constant.SpringContextHolder;
|
|
import com.qmth.themis.business.constant.SpringContextHolder;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
@@ -654,7 +653,6 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
//查询考试场次结束时间大于当前时间的所有考试
|
|
//查询考试场次结束时间大于当前时间的所有考试
|
|
List<TEExamActivity> teExamActivityList = teExamActivityService.list(new QueryWrapper<TEExamActivity>().lambda().gt(TEExamActivity::getFinishTime, System.currentTimeMillis()).eq(TEExamActivity::getEnable, 1));
|
|
List<TEExamActivity> teExamActivityList = teExamActivityService.list(new QueryWrapper<TEExamActivity>().lambda().gt(TEExamActivity::getFinishTime, System.currentTimeMillis()).eq(TEExamActivity::getEnable, 1));
|
|
if (!CollectionUtils.isEmpty(teExamActivityList)) {
|
|
if (!CollectionUtils.isEmpty(teExamActivityList)) {
|
|
- LinkedMultiValueMap<Long, ExamListBean> examActivityMap = new LinkedMultiValueMap<>();
|
|
|
|
Map<Long, Set<Long>> examMap = new HashMap<>();
|
|
Map<Long, Set<Long>> examMap = new HashMap<>();
|
|
Map<Long, Set<Long>> orgMap = new HashMap<>();
|
|
Map<Long, Set<Long>> orgMap = new HashMap<>();
|
|
for (TEExamActivity t : teExamActivityList) {
|
|
for (TEExamActivity t : teExamActivityList) {
|
|
@@ -678,12 +676,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
}
|
|
}
|
|
orgMap.forEach((k, v) -> {
|
|
orgMap.forEach((k, v) -> {
|
|
for (Long l : v) {
|
|
for (Long l : v) {
|
|
- examActivityMap.add(k, new ExamListBean(l, examMap.get(l)));
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- examActivityMap.forEach((k, v) -> {
|
|
|
|
- for (ExamListBean e : v) {
|
|
|
|
- redisUtil.set(SystemConstant.ORG_EXAM_LIST_MAP_CACHE + k, e.getExamId().toString(), e.getExamActivityIdSet());
|
|
|
|
|
|
+ redisUtil.set(SystemConstant.ORG_EXAM_LIST_MAP_CACHE + k, l.toString(), examMap.get(l));
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|