diff --git a/src/main/java/club/joylink/rtss/services/completition/question/QuestionBankService.java b/src/main/java/club/joylink/rtss/services/completition/question/QuestionBankService.java index c021776b7..0216ee0db 100644 --- a/src/main/java/club/joylink/rtss/services/completition/question/QuestionBankService.java +++ b/src/main/java/club/joylink/rtss/services/completition/question/QuestionBankService.java @@ -177,8 +177,8 @@ public class QuestionBankService implements IQuestionBankService { questions.forEach(questionVO -> { BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue( - (Objects.equals(BusinessConsts.TheoryType.select, questionVO.getType()) || - Objects.equals(BusinessConsts.TheoryType.judge, questionVO.getType())) && + (Objects.equals(BusinessConsts.TheoryType.select.name(), questionVO.getType()) || + Objects.equals(BusinessConsts.TheoryType.judge.name(), questionVO.getType())) && questionVO.getOptionList().stream().filter(QuestionOptionVO::getCorrect).count() == 1, "单选或判断题正确答案有且只有一个!"); if ((Objects.equals(BusinessConsts.TheoryType.fill, questionVO.getType()) || Objects.equals(BusinessConsts.TheoryType.answer, questionVO.getType()))) {