|
@@ -201,7 +201,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
}
|
|
|
}
|
|
|
if (!allow) {
|
|
|
- throw new BusinessException("考生IP不被允许");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_STATUS_NOT_ALLOW_IP);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -216,11 +216,11 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
TBSession tbSession = (TBSession) ServletUtil.getRequestSession();
|
|
|
ExamStudentCacheBean es = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
//停用
|
|
|
if (es.getEnable().intValue() == 0) {
|
|
@@ -255,40 +255,40 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
}
|
|
|
}
|
|
|
if (examCache.getExamCount().intValue() <= es.getAlreadyExamCount().intValue()) {
|
|
|
- throw new BusinessException("没有剩余考试次数");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_LEFT_COUNT_IS_ZERO);
|
|
|
}
|
|
|
Long activityId = es.getExamActivityId();
|
|
|
ExamActivityCacheBean ac = teExamActivityService.getExamActivityCacheBean(activityId);
|
|
|
if (ac == null) {
|
|
|
- throw new BusinessException("未找到场次");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_ACTIVITY);
|
|
|
}
|
|
|
Date now = new Date();
|
|
|
if (ExamModeEnum.ANYTIME.equals(examCache.getMode())) {
|
|
|
Long start = ac.getStartTime() - (ac.getPrepareSeconds() * 1000);
|
|
|
Long end = ac.getFinishTime();
|
|
|
if (now.getTime() < start) {
|
|
|
- throw new BusinessException("没有到允许开考的时间");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_ALLOW_MAX_START_TIME);
|
|
|
}
|
|
|
if (now.getTime() > end) {
|
|
|
- throw new BusinessException("允许开考的时间已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MAX_START_TIME_FINISHED);
|
|
|
}
|
|
|
} else {
|
|
|
Long start = ac.getStartTime() - (ac.getPrepareSeconds() * 1000);
|
|
|
Long end = ac.getStartTime() + (ac.getOpeningSeconds() * 1000);
|
|
|
if (now.getTime() < start) {
|
|
|
- throw new BusinessException("没有到允许开考的时间");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_ALLOW_MAX_START_TIME);
|
|
|
}
|
|
|
if (now.getTime() > end) {
|
|
|
- throw new BusinessException("允许开考的时间已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MAX_START_TIME_FINISHED);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
ExamCourseCacheBean ec = teExamCourseService.getExamCourseCacheBean(es.getExamId(), es.getCourseCode());
|
|
|
if (ec == null) {
|
|
|
- throw new BusinessException("未找到考试科目");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_COURSE);
|
|
|
}
|
|
|
if (ec.getPaperIds() == null) {
|
|
|
- throw new BusinessException("考试科目未绑定试卷");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_COURSE_OR_EXAM_PAPER_NOT_BIND);
|
|
|
}
|
|
|
// if (ec.getHasAnswer() == null || ec.getHasAnswer().intValue() == 0) {
|
|
|
// throw new BusinessException("考试科目答案未补全");
|
|
@@ -297,7 +297,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
Long paperId = ec.getPaperIds().get(getPaperByWeight(ec.getPaperWeight()));
|
|
|
ExamPaperCacheBean ep = teExamPaperService.getExamPaperCacheBean(paperId);
|
|
|
if (ep == null) {
|
|
|
- throw new BusinessException("未找到试卷:" + paperId);
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_PAPER + ":" + paperId);
|
|
|
}
|
|
|
// if (StringUtils.isBlank(ep.getAnswerPath())) {
|
|
|
// throw new BusinessException("试卷答案未上传:" + paperId);
|
|
@@ -377,16 +377,16 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
|
- throw new BusinessException("未找到考试记录");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_RECORD);
|
|
|
}
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean es = (ExamStudentCacheBean) redisUtil
|
|
|
.get(RedisKeyHelper.examStudentCacheKey(examStudentId));
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考试记录的学生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
//停用
|
|
|
if (es.getEnable().intValue() == 0) {
|
|
@@ -396,41 +396,41 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
Long activityId = es.getExamActivityId();
|
|
|
ExamActivityCacheBean ac = teExamActivityService.getExamActivityCacheBean(activityId);
|
|
|
if (ac == null) {
|
|
|
- throw new BusinessException("未找到场次");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_ACTIVITY);
|
|
|
}
|
|
|
ExamRecordStatusEnum sta = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
if (ExamRecordStatusEnum.FINISHED.equals(sta) || ExamRecordStatusEnum.PERSISTED.equals(sta)) {
|
|
|
- throw new BusinessException("该考试已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
Date now = new Date();
|
|
|
if (ExamModeEnum.ANYTIME.equals(exam.getMode())) {
|
|
|
Long start = ac.getStartTime();
|
|
|
Long end = ac.getFinishTime();
|
|
|
if (now.getTime() < start) {
|
|
|
- throw new BusinessException("没有到允许开考的时间");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_ALLOW_MAX_START_TIME);
|
|
|
}
|
|
|
if (!ExamRecordStatusEnum.RESUME_PREPARE.equals(sta)) {//非断点进入的
|
|
|
if (now.getTime() > end) {
|
|
|
- throw new BusinessException("允许开考的时间已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MAX_START_TIME_FINISHED);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
Long start = ac.getStartTime();
|
|
|
Long end = ac.getStartTime() + (ac.getOpeningSeconds() * 1000);
|
|
|
if (now.getTime() < start) {
|
|
|
- throw new BusinessException("没有到允许开考的时间");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_ALLOW_MAX_START_TIME);
|
|
|
}
|
|
|
if (ExamRecordStatusEnum.RESUME_PREPARE.equals(sta)) {//断点进入的
|
|
|
//集中不启用统一收卷,考试快结束时,断点,再登录时, 时间已经超过考试截止时间,断点时,此时应该能登录继续作答
|
|
|
Integer forceFinish = ExamRecordCacheUtil.getForceFinish(recordId);
|
|
|
if (forceFinish != null && forceFinish.intValue() == 1) {
|
|
|
if (now.getTime() > end) {
|
|
|
- throw new BusinessException("允许开考的时间已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MAX_START_TIME_FINISHED);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
if (now.getTime() > end) {
|
|
|
- throw new BusinessException("允许开考的时间已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MAX_START_TIME_FINISHED);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -439,28 +439,28 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
Long paperId = ExamRecordCacheUtil.getPaperId(recordId);
|
|
|
ExamPaperCacheBean ep = teExamPaperService.getExamPaperCacheBean(paperId);
|
|
|
if (ep == null) {
|
|
|
- throw new BusinessException("未找到试卷");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_PAPER);
|
|
|
}
|
|
|
|
|
|
WebsocketStatusEnum websocketStatusEnum = ExamRecordCacheUtil.getClientWebsocketStatus(recordId);
|
|
|
if (Objects.nonNull(websocketStatusEnum) && Objects.equals(WebsocketStatusEnum.OFF_LINE, websocketStatusEnum)) {
|
|
|
- throw new BusinessException("客户端网络离线");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.CLIENT_NET_OFFLINE);
|
|
|
}
|
|
|
MonitorStatusSourceEnum clientCameraStatus = ExamRecordCacheUtil.getMonitorStatus(recordId, MonitorVideoSourceEnum.CLIENT_CAMERA.name());
|
|
|
if (Objects.nonNull(clientCameraStatus) && Objects.equals(MonitorStatusSourceEnum.STOP, clientCameraStatus)) {
|
|
|
- throw new BusinessException("客户端摄像头离线");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.CLIENT_CAMERA_OFFLINE);
|
|
|
}
|
|
|
MonitorStatusSourceEnum clientScreenStatus = ExamRecordCacheUtil.getMonitorStatus(recordId, MonitorVideoSourceEnum.CLIENT_SCREEN.name());
|
|
|
if (Objects.nonNull(clientScreenStatus) && Objects.equals(MonitorStatusSourceEnum.STOP, clientScreenStatus)) {
|
|
|
- throw new BusinessException("客户端屏幕离线");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.CLIENT_SCREEN_OFFLINE);
|
|
|
}
|
|
|
MonitorStatusSourceEnum mobileFirstStatus = ExamRecordCacheUtil.getMonitorStatus(recordId, MonitorVideoSourceEnum.MOBILE_FIRST.name());
|
|
|
if (Objects.nonNull(mobileFirstStatus) && Objects.equals(MonitorStatusSourceEnum.STOP, mobileFirstStatus)) {
|
|
|
- throw new BusinessException("移动端第一机位离线");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MOBILE_FIRST_OFFLINE);
|
|
|
}
|
|
|
MonitorStatusSourceEnum mobileSecondStatus = ExamRecordCacheUtil.getMonitorStatus(recordId, MonitorVideoSourceEnum.MOBILE_SECOND.name());
|
|
|
if (Objects.nonNull(mobileSecondStatus) && Objects.equals(MonitorStatusSourceEnum.STOP, mobileSecondStatus)) {
|
|
|
- throw new BusinessException("移动端第二机位离线");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.MOBILE_SECOND_OFFLINE);
|
|
|
}
|
|
|
|
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
@@ -532,20 +532,20 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
|
- throw new BusinessException("未找到考试记录");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_RECORD);
|
|
|
}
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean es = (ExamStudentCacheBean) redisUtil
|
|
|
.get(RedisKeyHelper.examStudentCacheKey(examStudentId));
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考试记录的学生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
ExamRecordStatusEnum sta = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
if (ExamRecordStatusEnum.FINISHED.equals(sta) || ExamRecordStatusEnum.PERSISTED.equals(sta)) {
|
|
|
- throw new BusinessException("该考试已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
ExamStudentPaperStructCacheBean struct = new ExamStudentPaperStructCacheBean();
|
|
|
struct.setContent(content);
|
|
@@ -567,20 +567,20 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
|
- throw new BusinessException("未找到考试记录");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_RECORD);
|
|
|
}
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean es = (ExamStudentCacheBean) redisUtil
|
|
|
.get(RedisKeyHelper.examStudentCacheKey(examStudentId));
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考试记录的学生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
ExamRecordStatusEnum sta = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
if (ExamRecordStatusEnum.FINISHED.equals(sta) || ExamRecordStatusEnum.PERSISTED.equals(sta)) {
|
|
|
- throw new BusinessException("该考试已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
ExamStudentAnswerCacheBean answerCache = (ExamStudentAnswerCacheBean) redisUtil.get(
|
|
|
RedisKeyHelper.examAnswerKey(recordId),
|
|
@@ -659,20 +659,20 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
|
- throw new BusinessException("未找到考试记录");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_RECORD);
|
|
|
}
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean es = (ExamStudentCacheBean) redisUtil
|
|
|
.get(RedisKeyHelper.examStudentCacheKey(examStudentId));
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考试记录的学生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
ExamRecordStatusEnum sta = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
if (ExamRecordStatusEnum.FINISHED.equals(sta) || ExamRecordStatusEnum.PERSISTED.equals(sta)) {
|
|
|
- throw new BusinessException("该考试已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
// 音频剩余播放次数缓存
|
|
|
redisUtil.set(RedisKeyHelper.audioLeftPlayCountKey(recordId), key, count);
|
|
@@ -690,20 +690,20 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
|
|
|
// 校验当前登录用户和参数一致性
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
|
- throw new BusinessException("未找到考试记录");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_RECORD);
|
|
|
}
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean es = (ExamStudentCacheBean) redisUtil
|
|
|
.get(RedisKeyHelper.examStudentCacheKey(examStudentId));
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考试记录的学生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
ExamRecordStatusEnum sta = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
if (ExamRecordStatusEnum.FINISHED.equals(sta) || ExamRecordStatusEnum.PERSISTED.equals(sta)) {
|
|
|
- throw new BusinessException("该考试已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
|
|
|
String filePath = "upload" + File.separator + sdf.format(new Date()) + File.separator + uuid() + "." + suffix;
|
|
@@ -745,16 +745,16 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
TBSession tbSession = (TBSession) ServletUtil.getRequestSession();
|
|
|
// 校验当前登录用户和参数一致性
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
|
- throw new BusinessException("未找到考试记录");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_RECORD);
|
|
|
}
|
|
|
Long examStudentId = ExamRecordCacheUtil.getExamStudentId(recordId);
|
|
|
ExamStudentCacheBean es = (ExamStudentCacheBean) redisUtil
|
|
|
.get(RedisKeyHelper.examStudentCacheKey(examStudentId));
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考试记录的学生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
//停用
|
|
|
if (es.getEnable().intValue() == 0) {
|
|
@@ -768,11 +768,11 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
Long paperId = ExamRecordCacheUtil.getPaperId(recordId);
|
|
|
ExamPaperCacheBean ep = teExamPaperService.getExamPaperCacheBean(paperId);
|
|
|
if (ep == null) {
|
|
|
- throw new BusinessException("未找到试卷");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_PAPER);
|
|
|
}
|
|
|
ExamRecordStatusEnum sta = ExamRecordCacheUtil.getStatus(recordId);
|
|
|
if (ExamRecordStatusEnum.FINISHED.equals(sta) || ExamRecordStatusEnum.PERSISTED.equals(sta)) {
|
|
|
- throw new BusinessException("该考试已结束");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
ExamStudentCacheBean examStudentCacheBean = teExamStudentService.getExamStudentCacheBean(examStudentId);
|
|
|
Integer durationSeconds = Objects.isNull(ExamRecordCacheUtil.getDurationSeconds(recordId)) ? 0 : ExamRecordCacheUtil.getDurationSeconds(recordId);
|
|
@@ -905,10 +905,10 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
ExamStudentCacheBean es = (ExamStudentCacheBean) redisUtil
|
|
|
.get(RedisKeyHelper.examStudentCacheKey(examStudentId));
|
|
|
if (es == null) {
|
|
|
- throw new BusinessException("未找到考生");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_STUDENT);
|
|
|
}
|
|
|
if (!studentId.equals(es.getStudentId())) {
|
|
|
- throw new BusinessException("考试记录的学生Id和当前登录用户不一致");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.EXAM_ID_NOT_EQUALY);
|
|
|
}
|
|
|
|
|
|
ExamCacheBean exam = getExamCacheBeanNative(es.getExamId());
|
|
@@ -1055,7 +1055,7 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
|
|
|
if (ExamRecordCacheUtil.getId(recordId) == null) {
|
|
|
er = toeExamRecordService.getById(recordId);
|
|
|
if (er == null) {
|
|
|
- throw new BusinessException("未找到考试记录");
|
|
|
+ throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_RECORD);
|
|
|
}
|
|
|
ret.setDurationSeconds(er.getDurationSeconds());
|
|
|
ret.setFinishTime(er.getFinishTime());
|