理论题导入bug修改

This commit is contained in:
joylink_zhangsai 2020-11-27 17:00:52 +08:00
parent 5d743425e5
commit 34c1616a4c

View File

@ -177,8 +177,8 @@ public class QuestionBankService implements IQuestionBankService {
questions.forEach(questionVO -> { questions.forEach(questionVO -> {
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue( BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(
(Objects.equals(BusinessConsts.TheoryType.select, questionVO.getType()) || (Objects.equals(BusinessConsts.TheoryType.select.name(), questionVO.getType()) ||
Objects.equals(BusinessConsts.TheoryType.judge, questionVO.getType())) && Objects.equals(BusinessConsts.TheoryType.judge.name(), questionVO.getType())) &&
questionVO.getOptionList().stream().filter(QuestionOptionVO::getCorrect).count() == 1, questionVO.getOptionList().stream().filter(QuestionOptionVO::getCorrect).count() == 1,
"单选或判断题正确答案有且只有一个!"); "单选或判断题正确答案有且只有一个!");
if ((Objects.equals(BusinessConsts.TheoryType.fill, questionVO.getType()) || Objects.equals(BusinessConsts.TheoryType.answer, questionVO.getType()))) { if ((Objects.equals(BusinessConsts.TheoryType.fill, questionVO.getType()) || Objects.equals(BusinessConsts.TheoryType.answer, questionVO.getType()))) {