|
@@ -125,7 +125,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public UserExam createExam(String userId, String examId) {
|
|
|
- Exam exam = getById(examId);
|
|
|
+ Exam exam = detail(examId);
|
|
|
if (exam == null) {
|
|
|
throw new JeecgBootException("考试不存在!");
|
|
|
}
|
|
@@ -138,7 +138,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
throw new JeecgBootException("考试次数达到限制!");
|
|
|
}
|
|
|
}
|
|
|
- Paper paper = paperService.getById(exam.getPaperId());
|
|
|
+ Paper paper = exam.getPaper();
|
|
|
if (Objects.isNull(paper)) {
|
|
|
throw new JeecgBootException("试卷不存在!");
|
|
|
}
|