xiatian 5 anni fa
parent
commit
8e0fdddf0f

+ 9 - 0
themis-business/src/main/java/com/qmth/themis/business/cache/RedisKeyHelper.java

@@ -0,0 +1,9 @@
+package com.qmth.themis.business.cache;
+
+public class RedisKeyHelper {
+	private static String examActivityKeyPrefix = "exam_activity::";
+
+	public static String examActivityCacheKey(Long activityId) {
+		return examActivityKeyPrefix + activityId;
+	}
+}

+ 1 - 1
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamActivityServiceImpl.java

@@ -111,7 +111,7 @@ public class TEExamActivityServiceImpl extends ServiceImpl<TEExamActivityMapper,
         return teExamActivityMapper.getWaitingExam(studentId, examId, examActivityId);
     }
     
-    @Cacheable(value = "exam_activity", key = "'activity_id_'+#examActivityId",unless = "#result == null")
+    @Cacheable(value = "exam_activity", key = "#examActivityId",unless = "#result == null")
     @Override
     public ExamActivityCacheBean getExamActivityCacheBean(Long examActivityId) {
     	ExamActivityCacheBean ret=null;