Bläddra i källkod

rename cache keys.

deason 2 år sedan
förälder
incheckning
701e88da06

+ 42 - 5
examcloud-web/src/main/java/cn/com/qmth/examcloud/support/CacheConstants.java

@@ -7,7 +7,7 @@ package cn.com.qmth.examcloud.support;
  */
 public interface CacheConstants {
 
-    /* #################### 常用 #################### */
+    /* #################### 会话、锁等KEY #################### */
 
     /**
      * 缓存 - 登录会话前缀:{userType}_{rootOrgId}_{userId}
@@ -32,12 +32,38 @@ public interface CacheConstants {
     /**
      * 考试控制锁:{studentId}
      */
-    String LOCK_EXAM_CONTROL = LOCK_PREFIX + "OE:EXAM_CONTROL:";
+    String LOCK_EXAM_CONTROL = LOCK_PREFIX + "OE_EXAM_CONTROL:";
 
     /**
      * 考试交卷锁:{examRecordDataId}
      */
-    String LOCK_HAND_IN_EXAM = LOCK_PREFIX + "OE:HAND_IN_EXAM:";
+    String LOCK_HAND_IN_EXAM = LOCK_PREFIX + "OE_HAND_IN_EXAM:";
+
+    /**
+     * 人脸活体检测信息锁:{studentId}
+     */
+    String LOCK_GET_FACE_BIOPSY = LOCK_PREFIX + "OE_GET_FACE_BIOPSY:";
+
+    /**
+     * 人脸比对信息锁:{examRecordDataId}
+     */
+    String LOCK_FACE_COMPARE = LOCK_PREFIX + "OE_FACE_COMPARE:";
+
+    /**
+     * 考试记录清理锁
+     */
+    String LOCK_EXAM_DATA_CLEAN = LOCK_PREFIX + "OE_EXAM_DATA_CLEAN";
+
+    /**
+     * 考试更新锁:{rootOrgId}_{examCode}
+     */
+    String LOCK_E_EXAM_SAVE = LOCK_PREFIX + "E_EXAM_SAVE:";
+
+    /**
+     * 考试设置更新锁:{examId}_{orgId}_{courseId}_{studentId}
+     */
+    String LOCK_E_EXAM_SPECIAL_SETTINGS = LOCK_PREFIX + "E_EXAM_SPECIAL_SETTINGS:";
+
 
 
     /* #################### 基础模块 #################### */
@@ -112,19 +138,18 @@ public interface CacheConstants {
      */
     String CACHE_B_STUDENT = "$B:STUDENT:";
 
-
     /**
      * 缓存 - 学习中心安全策略IP:{orgId}
      */
     String CACHE_B_SECURITY_IP = "$B:SECURITY_IP:";
 
-
     /**
      * 缓存 - 登录错误信息:{accountType}_{account}_{ip}
      */
     String CACHE_B_LOGIN_ERR = "$B:LOGIN_ERR:";
 
 
+
     /* #################### 考务模块 #################### */
 
     /**
@@ -168,6 +193,7 @@ public interface CacheConstants {
     String CACHE_E_EXAM_STUDENT_PROP = "$E:EXAM_STUDENT_PROP:";
 
 
+
     /* #################### 题库模块 #################### */
 
     /**
@@ -211,6 +237,7 @@ public interface CacheConstants {
     String CACHE_Q_QUESTION_ANSWER = "$Q:QUESTION_ANSWER:";
 
 
+
     /* #################### 网考模块 #################### */
 
     /**
@@ -263,6 +290,16 @@ public interface CacheConstants {
      */
     String CACHE_OE_SCORE_STATISTIC_STATUS = "$OE:SCORE_STATISTIC_STATUS:";
 
+    /**
+     * 缓存 - 违纪非法考生端应用:{examRecordDataId}
+     */
+    String CACHE_OE_DISCIPLINE_ILLEGAL_CLIENT = "$OE:DISCIPLINE_ILLEGAL_CLIENT:";
+
+    /**
+     * 缓存 - 违纪非法数据:{examRecordDataId}
+     */
+    String CACHE_OE_DISCIPLINE_ILLEGAL_DATA = "$OE:DISCIPLINE_ILLEGAL_DATA:";
+
 
     /* #################### Exchange模块 #################### */
 

+ 0 - 25
examcloud-web/src/main/java/cn/com/qmth/examcloud/support/Constants.java

@@ -13,21 +13,6 @@ public interface Constants {
      */
     String OE_CODE_400 = "000400";
 
-    /**
-     * 获取人脸活体检测基本信息前缀_{studentId}
-     */
-    String GET_FACE_BIOPSY_INFO_PREFIX = "$oe_lock:get_face_biopsy_info_";
-
-    /**
-     * 人脸比对控制锁_{examRecordDataId}
-     */
-    String FACE_COMPARE_LOCK_PREFIX = "$oe_lock:face_compare_";
-
-    /**
-     * 考试数据清理锁
-     */
-    String EXAM_DATA_CLEAN_LOCK_PREFIX = "$oe_lock:exam_data_clean";
-
     String ERROR_MSG = "error_message";
 
     String isTrue = "true";
@@ -142,16 +127,6 @@ public interface Constants {
      */
     String ID_NUMBER_PRIVATE_MODE_KEY = "ID_NUMBER_PRIVATE_MODE";
 
-    /**
-     * 违纪-非法考生端应用 缓存Key前缀
-     */
-    String OE_DISCIPLINE_ILLEGAL_CLIENT = "OE_DISCIPLINE:ILLEGAL_CLIENT_";
-
-    /**
-     * 违纪-非法数据 缓存Key前缀
-     */
-    String OE_DISCIPLINE_ILLEGAL_DATA = "OE_DISCIPLINE:ILLEGAL_DATA_";
-
     /**
      * 客户端请求中User-Agent特征值
      */

+ 0 - 1
examcloud-web/src/main/java/cn/com/qmth/examcloud/web/helpers/SequenceLockHelper.java

@@ -43,7 +43,6 @@ public class SequenceLockHelper {
      * @throws SequenceLockException 获取锁失败时抛出异常
      */
     public static void getLock(Object... args) throws SequenceLockException {
-
         String key = StringUtils.join(Arrays.asList(args), "_");
 
         int timeout = 60 * 2;