|
@@ -20,10 +20,7 @@ import com.qmth.themis.business.entity.TEExam;
|
|
import com.qmth.themis.business.entity.TOeExamRecord;
|
|
import com.qmth.themis.business.entity.TOeExamRecord;
|
|
import com.qmth.themis.business.enums.*;
|
|
import com.qmth.themis.business.enums.*;
|
|
import com.qmth.themis.business.service.*;
|
|
import com.qmth.themis.business.service.*;
|
|
-import com.qmth.themis.business.util.OssUtil;
|
|
|
|
-import com.qmth.themis.business.util.RedisUtil;
|
|
|
|
-import com.qmth.themis.business.util.ServletUtil;
|
|
|
|
-import com.qmth.themis.business.util.TencentYunUtil;
|
|
|
|
|
|
+import com.qmth.themis.business.util.*;
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
import com.qmth.themis.common.exception.BusinessException;
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
import org.apache.commons.codec.digest.DigestUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -201,11 +198,11 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
String structurl = OssUtil.getUrlForPrivateBucket(systemConfig.getOssEnv(3), ep.getStructPath());
|
|
String structurl = OssUtil.getUrlForPrivateBucket(systemConfig.getOssEnv(3), ep.getStructPath());
|
|
prepare.setPaperUrl(paperurl);
|
|
prepare.setPaperUrl(paperurl);
|
|
prepare.setStructUrl(structurl);
|
|
prepare.setStructUrl(structurl);
|
|
- if (examCacheBean.getMonitorAudioEnable()) {
|
|
|
|
- prepare.setMonitorKey(String.valueOf(recordId));
|
|
|
|
- prepare.setMonitorUserId("s_" + tbSession.getId());
|
|
|
|
- prepare.setMonitorUserSig(tencentYunUtil.getSign(prepare.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
|
- }
|
|
|
|
|
|
+// if (examCacheBean.getMonitorAudioEnable()) {
|
|
|
|
+ prepare.setMonitorKey(String.valueOf(recordId));
|
|
|
|
+ prepare.setMonitorUserId("s_" + tbSession.getId());
|
|
|
|
+ prepare.setMonitorUserSig(tencentYunUtil.getSign(prepare.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
|
+// }
|
|
return prepare;
|
|
return prepare;
|
|
}
|
|
}
|
|
if (es.getLeftExamCount() == 0) {
|
|
if (es.getLeftExamCount() == 0) {
|
|
@@ -273,11 +270,11 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
prepare.setPaperUrl(paperurl);
|
|
prepare.setPaperUrl(paperurl);
|
|
prepare.setStructUrl(structurl);
|
|
prepare.setStructUrl(structurl);
|
|
ExamCacheBean examCacheBean = this.getExamCacheBean(es.getExamId());
|
|
ExamCacheBean examCacheBean = this.getExamCacheBean(es.getExamId());
|
|
- if (examCacheBean.getMonitorAudioEnable()) {
|
|
|
|
- prepare.setMonitorKey(String.valueOf(recordId));
|
|
|
|
- prepare.setMonitorUserId("s_" + tbSession.getId());
|
|
|
|
- prepare.setMonitorUserSig(tencentYunUtil.getSign(prepare.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
|
- }
|
|
|
|
|
|
+// if (examCacheBean.getMonitorAudioEnable()) {
|
|
|
|
+ prepare.setMonitorKey(String.valueOf(recordId));
|
|
|
|
+ prepare.setMonitorUserId("s_" + tbSession.getId());
|
|
|
|
+ prepare.setMonitorUserSig(tencentYunUtil.getSign(prepare.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
|
+// }
|
|
|
|
|
|
ExamCacheBean exam = getExamCacheBean(es.getExamId());
|
|
ExamCacheBean exam = getExamCacheBean(es.getExamId());
|
|
Integer breakResumeCount = exam.getBreakResumeCount();
|
|
Integer breakResumeCount = exam.getBreakResumeCount();
|
|
@@ -592,16 +589,16 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
ret.setAudioPlayCount(ep.getAudioPlayCount());
|
|
ret.setAudioPlayCount(ep.getAudioPlayCount());
|
|
// TODO 9527
|
|
// TODO 9527
|
|
ExamCacheBean examCacheBean = this.getExamCacheBean(es.getExamId());
|
|
ExamCacheBean examCacheBean = this.getExamCacheBean(es.getExamId());
|
|
- if (examCacheBean.getMonitorAudioEnable()) {
|
|
|
|
- ret.setMonitorKey(recordId.toString());
|
|
|
|
- ret.setMonitorUserId("s_" + tbSession.getId());
|
|
|
|
- ret.setMonitorUserSig(tencentYunUtil.getSign(ret.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
|
- }
|
|
|
|
|
|
+// if (examCacheBean.getMonitorAudioEnable()) {
|
|
|
|
+ ret.setMonitorKey(recordId.toString());
|
|
|
|
+ ret.setMonitorUserId("s_" + tbSession.getId());
|
|
|
|
+ ret.setMonitorUserSig(tencentYunUtil.getSign(ret.getMonitorUserId(), SystemConstant.TENCENT_EXPIRE_TIME));
|
|
|
|
+// }
|
|
|
|
|
|
ExamStudentPaperStructCacheBean struct = (ExamStudentPaperStructCacheBean) redisUtil
|
|
ExamStudentPaperStructCacheBean struct = (ExamStudentPaperStructCacheBean) redisUtil
|
|
.get(RedisKeyHelper.studentPaperStructKey(recordId));
|
|
.get(RedisKeyHelper.studentPaperStructKey(recordId));
|
|
if (struct != null) {
|
|
if (struct != null) {
|
|
- ret.setStudentPaperStruct(struct.getContent());
|
|
|
|
|
|
+ ret.setStudentPaperStruct(JacksonUtil.parseJson(struct.getContent()));
|
|
}
|
|
}
|
|
Map<String, ExamStudentAnswerCacheBean> answers = redisUtil
|
|
Map<String, ExamStudentAnswerCacheBean> answers = redisUtil
|
|
.getHashEntries(RedisKeyHelper.examAnswerKey(recordId));
|
|
.getHashEntries(RedisKeyHelper.examAnswerKey(recordId));
|