Prechádzať zdrojové kódy

非法数据的作答记录,不再当有效作答记录保存,也不计入违纪

deason 1 rok pred
rodič
commit
0a72ad008f

+ 4 - 2
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamRecordQuestionsServiceImpl.java

@@ -328,8 +328,10 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
 
         if (StringUtils.isEmpty(referer) || StringUtils.isEmpty(agent) || !agent.contains(Constants.ELECTRON_EXAM_SHELL)) {
             String cacheKey = CacheConstants.CACHE_OE_DISCIPLINE_ILLEGAL_DATA + examSessionInfo.getExamRecordDataId();
-            redisClient.set(cacheKey, true, OeConstants.TIME_OUT_1_DAY);
-            log.warn("DISCIPLINE_ILLEGAL_DATA examRecordDataId:{} agent:{} referer:{} fromBy:{}", examSessionInfo.getExamRecordDataId(), agent, referer, fromBy);
+            log.warn("非法数据:{} fromBy:{} agent:{} referer:{}", cacheKey, fromBy, agent, referer);
+            // redisClient.set(cacheKey, true, OeConstants.TIME_OUT_1_DAY);
+            // 非法数据的作答记录,不再当有效作答记录保存,也不计入违纪
+            return;
         }
 
         for (ExamStudentQuestionInfo examQuestionInfo : examQuestionInfos) {