|
@@ -748,6 +748,13 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
redisUtil.delete(SystemConstant.ORG_EXAM_LIST_MAP_CACHE + orgId, examId);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除机构考试列表缓存
|
|
|
+ *
|
|
|
+ * @param orgId
|
|
|
+ * @param examId
|
|
|
+ * @param examActivityId
|
|
|
+ */
|
|
|
@Override
|
|
|
public void removeOrgExamListCache(String orgId, String examId, Long examActivityId) {
|
|
|
Map<String, Set<Long>> map = redisUtil.getHashEntries(SystemConstant.ORG_EXAM_LIST_MAP_CACHE + orgId);
|
|
@@ -767,8 +774,14 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取当天考试列表缓存
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
- public Map<String, Set<String>> getTodayExamCache(String examId) {
|
|
|
+ public Map<String, Set<String>> getTodayExamListCache(String examId) {
|
|
|
return redisUtil.getHashEntries(SystemConstant.TODAY_EXAM_MAP_CACHE + examId);
|
|
|
}
|
|
|
|
|
@@ -779,11 +792,11 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public void updateTodayExamCache(String examId, String examActivityId) {
|
|
|
+ public void updateTodayExamListCache(String examId, String examActivityId) {
|
|
|
List<TEExamStudent> teExamStudentList = teExamStudentService.list(new QueryWrapper<TEExamStudent>().lambda().eq(TEExamStudent::getExamId, Long.parseLong(examId)).eq(TEExamStudent::getExamActivityId, examActivityId));
|
|
|
if (!CollectionUtils.isEmpty(teExamStudentList)) {
|
|
|
Set<String> roomCodeSet = teExamStudentList.stream().map(s -> s.getRoomCode()).collect(Collectors.toSet());
|
|
|
- this.removeTodayExamCache(examId, examActivityId);
|
|
|
+ this.removeTodayExamListCache(examId, examActivityId);
|
|
|
redisUtil.set(SystemConstant.TODAY_EXAM_MAP_CACHE + examId, examActivityId, roomCodeSet);
|
|
|
}
|
|
|
}
|
|
@@ -794,7 +807,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
* @param examId
|
|
|
*/
|
|
|
@Override
|
|
|
- public void removeTodayExamCache(String examId) {
|
|
|
+ public void removeTodayExamListCache(String examId) {
|
|
|
redisUtil.delete(SystemConstant.TODAY_EXAM_MAP_CACHE + examId);
|
|
|
}
|
|
|
|
|
@@ -805,7 +818,7 @@ public class ThemisCacheServiceImpl implements ThemisCacheService {
|
|
|
* @param examActivityId
|
|
|
*/
|
|
|
@Override
|
|
|
- public void removeTodayExamCache(String examId, String examActivityId) {
|
|
|
+ public void removeTodayExamListCache(String examId, String examActivityId) {
|
|
|
redisUtil.delete(SystemConstant.TODAY_EXAM_MAP_CACHE + examId, examActivityId);
|
|
|
}
|
|
|
|