Parcourir la source

题库取题方法修改

小么熊🐻 il y a 3 ans
Parent
commit
65615f8268

+ 4 - 2
jpcj-service/src/main/java/com/miaxis/question/service/impl/QuestionInfoServiceImpl.java

@@ -177,9 +177,11 @@ public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, Que
         //全题库
         List<QuestionInfo> allList = new ArrayList<QuestionInfo>();
         int error = 0;
-        while (allList.size() != total && error < 10) {
-            System.out.println("error:" + error);
+        while (allList.size() != total) {
             allList = new ArrayList<QuestionInfo>();
+            if(error >= 10) {
+                return allList;
+            }
             //判断题
             List<QuestionInfo> judgeList = new ArrayList<QuestionInfo>();
             //选择题