diff --git a/src/main/java/com/msdw/tms/service/impl/EvaluationRulesServiceImpl.java b/src/main/java/com/msdw/tms/service/impl/EvaluationRulesServiceImpl.java index 3977fd4..dd10e50 100644 --- a/src/main/java/com/msdw/tms/service/impl/EvaluationRulesServiceImpl.java +++ b/src/main/java/com/msdw/tms/service/impl/EvaluationRulesServiceImpl.java @@ -55,11 +55,11 @@ public class EvaluationRulesServiceImpl extends ServiceImpl singleChoice = this.list(queryWrapper.eq("question_type_no", + List singleChoice = this.list(queryWrapper.eq("question_type", Constant.QuestionType.SINGLE_CHOICE.getType())); set.addAll(getRandomList(singleNum, singleChoice)); } if (evaluationRules.getIsMultipleEnable().equals(Constant.IsEnable.ENABLE.getType())) { multipleNum = evaluationRules.getMultipleNum(); - List multipleChoice = this.list(queryWrapper.eq("question_type_no", + List multipleChoice = this.list(queryWrapper.eq("question_type", Constant.QuestionType.MULTIPLE_CHOICE.getType())); set.addAll(getRandomList(multipleNum, multipleChoice)); } if (evaluationRules.getIsJudgmentEnable().equals(Constant.IsEnable.ENABLE.getType())) { judgmentNum = evaluationRules.getJudgmentNum(); - List judgments = this.list(queryWrapper.eq("question_type_no", + List judgments = this.list(queryWrapper.eq("question_type", Constant.QuestionType.TRUE_OR_FALSE.getType())); set.addAll(getRandomList(judgmentNum, judgments)); } // 总题数等于各类题目数量之和 evaluation.setQuestionNum(singleNum + multipleNum + judgmentNum); } -// Set collect = set.stream().map(item -> { -// QuestionsVO questionsVO = new QuestionsVO(); -// BeanUtils.copyProperties(item, questionsVO); -// return questionsVO; -// }).collect(Collectors.toSet()); evaluation.setQuestions(set); return evaluation;