@@ -303,6 +303,9 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
if (ac == null) {
throw new BusinessException(ExceptionResultEnum.NOT_FOUND_EXAM_ACTIVITY);
}
+ if (ac.getEnable().intValue() == 0) {
+ throw new BusinessException(ExceptionResultEnum.EXAM_ACTIVITY_ENABLE);
+ }
Date now = new Date();
if (ExamModeEnum.ANYTIME.equals(examCache.getMode())) {
Long start = ac.getStartTime() - (ac.getPrepareSeconds() * 1000);
@@ -269,7 +269,9 @@ public enum ExceptionResultEnum {
EXAM_FINISH(500, 5000024, "考试已结束"),
- REPEAT_CONNECT_ERROR(500, 5000025, "不允许重复连接");
+ REPEAT_CONNECT_ERROR(500, 5000025, "不允许重复连接"),
+
+ EXAM_ACTIVITY_ENABLE(500, 500026, "考试场次已停用");
private int statusCode;