From f043c9f4b94cbe476ce378eaeb217ac88b9c6444 Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Wed, 26 Aug 2020 12:41:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E6=89=B9=E9=87=8F=E5=AF=BC=E5=85=A5=E8=AF=95=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E5=A4=8D=E6=A0=A1=E9=AA=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tms/service/impl/EvaluationRulesServiceImpl.java | 12 ++++++------ .../msdw/tms/service/impl/QuestionsServiceImpl.java | 11 +++-------- 2 files changed, 9 insertions(+), 14 deletions(-) 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;