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