wangliang 4 ani în urmă
părinte
comite
5999dc377a

+ 3 - 1
themis-business/src/main/java/com/qmth/themis/business/cache/ExamRecordCacheUtil.java

@@ -228,7 +228,9 @@ public class ExamRecordCacheUtil {
     }
 
     public static void setMonitorKey(Long recordId, String monitorKey) {
-        redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.monitor_key.getCode(), monitorKey);
+        if (Objects.nonNull(redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.id.getCode()))) {
+            redisUtil.set(RedisKeyHelper.examRecordCacheKey(recordId), ExamRecordFieldEnum.monitor_key.getCode(), monitorKey);
+        }
     }
 
     public static String getMonitorKey(Long recordId) {