删除考试代码bug

This commit is contained in:
DU 2021-01-12 13:34:10 +08:00
parent 15d4702873
commit e0c23c1e2c

View File

@ -410,7 +410,7 @@ public class ExamService implements IExamService{
//判断是否已有用户参与考试如果有不能删除考试定义
UserExamExample userExamExample = new UserExamExample();
userExamExample.createCriteria().andExamIdEqualTo(Long.parseLong(id));
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(userExamMapper.countByExample(userExamExample) < 0,
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertNotTrue(userExamMapper.countByExample(userExamExample) > 0,
String.format("试卷[%s]已被使用", id));
//删除考试信息和规则信息