|
@@ -270,12 +270,25 @@ public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, Que
|
|
|
qt.setQuestionType(1); //判断题
|
|
|
qt.setNum(easyJudge); //题数
|
|
|
List<QuestionInfo> easyJudgeList = this.selectTestQuestionInfoList(qt);
|
|
|
+ if (easyJudge != easyJudgeList.size()) { //简单题不够的情况下,加到难题上
|
|
|
+ System.out.println("easyJudge != easyJudgeList.size()");
|
|
|
+ int easyJudgeQ = easyJudge - easyJudgeList.size();
|
|
|
+ d = d + easyJudgeQ;
|
|
|
+ qt.setNum(easyJudgeList.size());
|
|
|
+ }
|
|
|
//单选简单
|
|
|
qt.setChapterId(er.getChapterId()); //章节ID
|
|
|
qt.setDiffDegree(easyDegree); //简单难度
|
|
|
qt.setQuestionType(2); //判断题
|
|
|
qt.setNum(easyChoice); //题数
|
|
|
List<QuestionInfo> easyChoiceList = this.selectTestQuestionInfoList(qt);
|
|
|
+ if (easyChoice != easyChoiceList.size()) { //简单题不够的情况下,加到难题上
|
|
|
+ System.out.println("easyChoice != easyChoiceList.size()");
|
|
|
+ int easyChoiceQ = easyChoice - easyChoiceList.size();
|
|
|
+ d = d + easyChoiceQ;
|
|
|
+ qt.setNum(easyChoiceList.size());
|
|
|
+ }
|
|
|
+
|
|
|
//多选简单
|
|
|
qt.setChapterId(er.getChapterId()); //章节ID
|
|
|
qt.setDiffDegree(easyDegree); //简单难度
|