wangliang 4 years ago
parent
commit
ef52d6153a

+ 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) {
     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) {
     public static Double getObjectiveScore(Long recordId) {