|
@@ -3,7 +3,6 @@ package com.qmth.themis.business.service.impl;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.aliyun.oss.common.utils.BinaryUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -32,7 +31,6 @@ import com.qmth.themis.common.contanst.Constants;
|
|
|
import com.qmth.themis.common.enums.ExceptionResultEnum;
|
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
|
import com.qmth.themis.common.util.GsonUtil;
|
|
|
-import com.qmth.themis.common.util.HexUtils;
|
|
|
import com.qmth.themis.common.util.IpUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -362,6 +360,10 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
es.getAlreadyExamCount() + 1, studentId, ec.getMobilePhotoUpload());
|
|
|
|
|
|
es.setCurrentRecordId(recordId);
|
|
|
+ // 更新考生缓存
|
|
|
+ redisUtil.set(RedisKeyHelper.examStudentCacheKey(examStudentId), es);
|
|
|
+ updateExamStudent(examStudentId, null, recordId);
|
|
|
+
|
|
|
ExamPrepareBean prepare = new ExamPrepareBean(recordId,
|
|
|
(ec.getObjectiveShuffle() == null || ec.getObjectiveShuffle().intValue() == 0 ? false : true),
|
|
|
(ec.getOptionShuffle() == null || ec.getOptionShuffle().intValue() == 0 ? false : true),
|
|
@@ -392,9 +394,13 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
|
|
|
private void updateExamStudent(Long examStudentId, Integer alreadyExamCount, Long currentRecordId) {
|
|
|
Map<String, Object> transMap = new HashMap<String, Object>();
|
|
|
- transMap.put(SystemConstant.EXAM_STUDENT_ID, String.valueOf(examStudentId));
|
|
|
- transMap.put("alreadyExamCount", String.valueOf(alreadyExamCount));
|
|
|
- transMap.put("currentRecordId", String.valueOf(currentRecordId));
|
|
|
+ transMap.put(SystemConstant.EXAM_STUDENT_ID, examStudentId);
|
|
|
+ if (Objects.nonNull(alreadyExamCount)) {
|
|
|
+ transMap.put("alreadyExamCount", alreadyExamCount);
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(currentRecordId)) {
|
|
|
+ transMap.put("currentRecordId", currentRecordId);
|
|
|
+ }
|
|
|
MqDto mqDto = new MqDto(mqUtil.getTopic(), MqTagEnum.EXAM_STUDNET_UPDATE.name(), transMap,
|
|
|
MqTagEnum.EXAM_STUDNET_UPDATE, examStudentId.toString(), examStudentId.toString());
|
|
|
mqDtoService.assembleSendAsyncMsg(mqDto);
|