test
parent
6acb1a44d7
commit
77b6b97804
|
|
@ -126,13 +126,7 @@ public class PaperQuestionRelServiceImpl extends ServiceImpl<PaperQuestionRelMap
|
|||
.eq(PaperQuestionRelDO::getQuestionId, questionId)
|
||||
.remove();
|
||||
if (!removed) {
|
||||
throw new IllegalArgumentException("试卷试题关系不存在:paperId=" + paperId + ",questionId=" + questionId);
|
||||
}
|
||||
|
||||
// 逻辑删除试题及其选项
|
||||
boolean deleted = questionMapper.deleteById(questionId) != 0;
|
||||
if (!deleted) {
|
||||
throw new IllegalArgumentException("试题不存在:id=" + questionId);
|
||||
throw new IllegalArgumentException("试卷试题关系不存在");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue