From 34c1616a4c2c381cf97780b1d8ef2e62174a759e Mon Sep 17 00:00:00 2001 From: joylink_zhangsai <1021828630@qq.com> Date: Fri, 27 Nov 2020 17:00:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=90=86=E8=AE=BA=E9=A2=98=E5=AF=BC=E5=85=A5bu?= =?UTF-8?q?g=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/completition/question/QuestionBankService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()))) {