|
@@ -611,7 +611,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
* 设置当天考试缓存
|
|
|
*/
|
|
|
@Override
|
|
|
- public void setTodayExamCache() {
|
|
|
+ public void setTodayExamListCache() {
|
|
|
try {
|
|
|
Date now = new Date();
|
|
|
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
|
|
@@ -623,8 +623,8 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
//统计当天00:00:00~23:59:59可以进行的考试批次、场次、考场编码信息
|
|
|
if (!CollectionUtils.isEmpty(teExamActivityList)) {
|
|
|
LinkedMultiValueMap<Long, ExamListBean> todayExamListMap = new LinkedMultiValueMap<>();//考试批次、场次集合/考场编码集合
|
|
|
- Map<Long, Set<Long>> examActivityIdMap = new HashMap<>();//考试批次id,场次id集合
|
|
|
- Map<Long, Set<String>> roomCodeMap = new HashMap<>();//考试场次id,考场编码集合
|
|
|
+ Map<Long, Set<Long>> examActivityIdMap = new LinkedHashMap<>();//考试批次id,场次id集合
|
|
|
+ Map<Long, Set<String>> roomCodeMap = new LinkedHashMap<>();//考试场次id,考场编码集合
|
|
|
for (TEExamActivity t : teExamActivityList) {
|
|
|
ExamCacheBean examCacheBean = teExamService.getExamCacheBean(t.getExamId());
|
|
|
if (Objects.nonNull(examCacheBean.getEnable()) && examCacheBean.getEnable().intValue() == 1 && Objects.nonNull(t.getEnable()) && t.getEnable().intValue() == 1) {
|
|
@@ -665,8 +665,8 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
//查询考试场次结束时间大于当前时间的所有考试
|
|
|
List<TEExamActivity> teExamActivityList = teExamActivityService.list(new QueryWrapper<TEExamActivity>().lambda().gt(TEExamActivity::getFinishTime, System.currentTimeMillis()).eq(TEExamActivity::getEnable, 1));
|
|
|
if (!CollectionUtils.isEmpty(teExamActivityList)) {
|
|
|
- Map<Long, Set<Long>> orgMap = new HashMap<>();//机构id,考试批次id集合
|
|
|
- Map<Long, Set<Long>> examMap = new HashMap<>();//考试批次id,场次id集合
|
|
|
+ Map<Long, Set<Long>> orgMap = new LinkedHashMap<>();//机构id,考试批次id集合
|
|
|
+ Map<Long, Set<Long>> examMap = new LinkedHashMap<>();//考试批次id,场次id集合
|
|
|
for (TEExamActivity t : teExamActivityList) {
|
|
|
ExamCacheBean examCacheBean = teExamService.getExamCacheBean(t.getExamId());
|
|
|
if (Objects.nonNull(examCacheBean.getEnable()) && examCacheBean.getEnable().intValue() == 1) {
|
|
@@ -884,7 +884,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Cacheable(value = SystemConstant.examSummaryCache, key = "#p0", unless = "#result?.size() == 0")
|
|
|
- public List<TEExamSummary> addExamSummaryCache(Long examId) {
|
|
|
+ public List<TEExamSummary> getExamSummaryCache(Long examId) {
|
|
|
return this.examSummaryQueryCommon(examId, null, null);
|
|
|
}
|
|
|
|
|
@@ -897,7 +897,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Cacheable(value = SystemConstant.examSummaryCache, key = "#p0 + '-' + #p1", unless = "#result?.size() == 0")
|
|
|
- public List<TEExamSummary> addExamSummaryCache(Long examId, Long examActivityId) {
|
|
|
+ public List<TEExamSummary> getExamSummaryCache(Long examId, Long examActivityId) {
|
|
|
return this.examSummaryQueryCommon(examId, examActivityId, null);
|
|
|
}
|
|
|
|
|
@@ -911,7 +911,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Cacheable(value = SystemConstant.examSummaryCache, key = "#p0 + '-' + #p1 + '-' + #p2", unless = "#result?.size() == 0")
|
|
|
- public List<TEExamSummary> addExamSummaryCache(Long examId, Long examActivityId, String roomCode) {
|
|
|
+ public List<TEExamSummary> getExamSummaryCache(Long examId, Long examActivityId, String roomCode) {
|
|
|
return this.examSummaryQueryCommon(examId, examActivityId, roomCode);
|
|
|
}
|
|
|
|
|
@@ -998,7 +998,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Cacheable(value = SystemConstant.orgSummaryCache, key = "#p0", unless = "#result == null")
|
|
|
- public TEOrgSummary addOrgSummaryCache(Long orgId) {
|
|
|
+ public TEOrgSummary getOrgSummaryCache(Long orgId) {
|
|
|
return teOrgSummaryService.getOne(new QueryWrapper<TEOrgSummary>().lambda().eq(TEOrgSummary::getOrgId, orgId));
|
|
|
}
|
|
|
|
|
@@ -1032,7 +1032,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Cacheable(value = SystemConstant.regionSummaryCache, unless = "#result?.size() == 0")
|
|
|
- public List<TERegionSummary> addRegionSummaryCache() {
|
|
|
+ public List<TERegionSummary> getRegionSummaryCache() {
|
|
|
return teRegionSummaryService.list();
|
|
|
}
|
|
|
|