dev-tmp1
luotaiqian 2026-08-19 17:33:20 +08:00
parent 6acb1a44d7
commit 77b6b97804
1 changed files with 1 additions and 7 deletions

View File

@ -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);
} }
} }