|
@@ -237,8 +237,11 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
throw new CustomException("该卷已被绑定,不允许修改发布状态为未发布");
|
|
|
}
|
|
|
}
|
|
|
- if(Validator.isNotEmpty(entity.getSimulateStatus())&&(entity.getDoType()!=2)&&(entity.getSimulateStatus()==1)){
|
|
|
- throw new CustomException("非考试类型无法开启模拟随机做题");
|
|
|
+ if(Validator.isNotEmpty(entity.getSimulateStatus())&&(entity.getSimulateStatus()==1)){
|
|
|
+ if((Validator.isEmpty(entity.getDoType()))||(entity.getDoType()!=2)){
|
|
|
+ throw new CustomException("非考试类型无法开启模拟随机做题");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if(Validator.isNotEmpty(entity.getSimulateConfig())){
|
|
|
Integer q1 = entity.getSimulateConfig().getSingleChoice().getQNum();
|