|
@@ -9,7 +9,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.google.gson.Gson;
|
|
import com.google.gson.Gson;
|
|
import com.qmth.themis.business.bean.admin.OpenExamBean;
|
|
import com.qmth.themis.business.bean.admin.OpenExamBean;
|
|
import com.qmth.themis.business.bean.exam.*;
|
|
import com.qmth.themis.business.bean.exam.*;
|
|
-import com.qmth.themis.business.cache.*;
|
|
|
|
|
|
+import com.qmth.themis.business.cache.ExamBreakCacheUtil;
|
|
|
|
+import com.qmth.themis.business.cache.ExamRecordCacheUtil;
|
|
|
|
+import com.qmth.themis.business.cache.ExamingDataCacheUtil;
|
|
|
|
+import com.qmth.themis.business.cache.RedisKeyHelper;
|
|
import com.qmth.themis.business.cache.bean.*;
|
|
import com.qmth.themis.business.cache.bean.*;
|
|
import com.qmth.themis.business.constant.SpringContextHolder;
|
|
import com.qmth.themis.business.constant.SpringContextHolder;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
@@ -318,7 +321,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
// 更新考生缓存
|
|
// 更新考生缓存
|
|
redisUtil.set(RedisKeyHelper.examStudentCacheKey(examStudentId), es);
|
|
redisUtil.set(RedisKeyHelper.examStudentCacheKey(examStudentId), es);
|
|
//更新场次-考试记录缓存
|
|
//更新场次-考试记录缓存
|
|
- ExamActivityRecordCacheUtil.setExamRecordStatus(activityId, recordId);
|
|
|
|
|
|
+// ExamActivityRecordCacheUtil.setExamRecordStatus(activityId, recordId);
|
|
ExamingDataCacheUtil.setUnFinishedRecordId(studentId, recordId);
|
|
ExamingDataCacheUtil.setUnFinishedRecordId(studentId, recordId);
|
|
//mq发送消息start
|
|
//mq发送消息start
|
|
// TEStudentCacheDto teStudentCacheDto = (TEStudentCacheDto) redisUtil.getStudent(studentId);
|
|
// TEStudentCacheDto teStudentCacheDto = (TEStudentCacheDto) redisUtil.getStudent(studentId);
|
|
@@ -486,7 +489,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
}
|
|
}
|
|
toeExamRecordService.sendExamRecordDataSaveMq(recordId, timestamp);
|
|
toeExamRecordService.sendExamRecordDataSaveMq(recordId, timestamp);
|
|
//更新场次-考试记录缓存
|
|
//更新场次-考试记录缓存
|
|
- ExamActivityRecordCacheUtil.setExamRecordStatus(activityId, recordId);
|
|
|
|
|
|
+// ExamActivityRecordCacheUtil.setExamRecordStatus(activityId, recordId);
|
|
} else {
|
|
} else {
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_ALREADY_UPDATE);
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_ALREADY_UPDATE);
|
|
}
|
|
}
|
|
@@ -941,7 +944,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
}
|
|
}
|
|
toeExamRecordService.sendExamRecordDataSaveMq(recordId, lastPrepareTime);
|
|
toeExamRecordService.sendExamRecordDataSaveMq(recordId, lastPrepareTime);
|
|
//更新场次-考试记录缓存
|
|
//更新场次-考试记录缓存
|
|
- ExamActivityRecordCacheUtil.setExamRecordStatus(es.getExamActivityId(), recordId);
|
|
|
|
|
|
+// ExamActivityRecordCacheUtil.setExamRecordStatus(es.getExamActivityId(), recordId);
|
|
} else {
|
|
} else {
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_ALREADY_UPDATE);
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_ALREADY_UPDATE);
|
|
}
|
|
}
|
|
@@ -1140,7 +1143,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
&& examRecordStatusEnum == ExamRecordStatusEnum.FINISHED) {
|
|
&& examRecordStatusEnum == ExamRecordStatusEnum.FINISHED) {
|
|
toeExamRecordService.sendExamRecordDataSaveMq(recordId, finishTime);
|
|
toeExamRecordService.sendExamRecordDataSaveMq(recordId, finishTime);
|
|
//更新场次-考试记录缓存
|
|
//更新场次-考试记录缓存
|
|
- ExamActivityRecordCacheUtil.setExamRecordStatus(es.getExamActivityId(), recordId);
|
|
|
|
|
|
+// ExamActivityRecordCacheUtil.setExamRecordStatus(es.getExamActivityId(), recordId);
|
|
} else {
|
|
} else {
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_ALREADY_UPDATE);
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_ALREADY_UPDATE);
|
|
}
|
|
}
|
|
@@ -1163,7 +1166,9 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_UPDATE_ERROR);
|
|
throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_UPDATE_ERROR);
|
|
}
|
|
}
|
|
//更新未完成考试记录id
|
|
//更新未完成考试记录id
|
|
- TEStudentCacheDto teStudentCacheDto = cacheService.updateStudentAccountCache(es.getStudentId());
|
|
|
|
|
|
+ TEStudentCacheDto teStudentCacheDto = cacheService.addStudentAccountCache(es.getStudentId());
|
|
|
|
+ ExamingDataCacheUtil.deleteUnFinishedRecordId(studentId);
|
|
|
|
+
|
|
MqDto mobileMqDto = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.EXAM_STOP.name(), recordId, MqTagEnum.EXAM_STOP, String.valueOf(recordId), Collections.singletonMap(SystemConstant.RECORD_ID, recordId), String.valueOf(recordId));
|
|
MqDto mobileMqDto = new MqDto(mqUtil.getMqGroupDomain().getTopic(), MqTagEnum.EXAM_STOP.name(), recordId, MqTagEnum.EXAM_STOP, String.valueOf(recordId), Collections.singletonMap(SystemConstant.RECORD_ID, recordId), String.valueOf(recordId));
|
|
mqDtoService.assembleSendOneOrderMsg(mobileMqDto);
|
|
mqDtoService.assembleSendOneOrderMsg(mobileMqDto);
|
|
//异步持久化
|
|
//异步持久化
|