wangliang 4 년 전
부모
커밋
ef52d6153a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      themis-business/src/main/java/com/qmth/themis/business/cache/ExamRecordCacheUtil.java

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

@@ -44,7 +44,7 @@ public class ExamRecordCacheUtil {
     }
 
     public static Integer getDurationSeconds(Long recordId) {
-        return Integer.parseInt(String.valueOf(redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), "durationSeconds")));
+        return Objects.nonNull(redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), "durationSeconds")) ? Integer.parseInt(String.valueOf(redisUtil.get(RedisKeyHelper.examRecordCacheKey(recordId), "durationSeconds"))) : null;
     }
 
     public static Double getObjectiveScore(Long recordId) {