he2802 3 years ago
parent
commit
0b6ed22bd6

+ 5 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/bank/QuestionModuleController.java

@@ -1,8 +1,10 @@
 package com.zhongzheng.controller.bank;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Arrays;
 
+import cn.hutool.core.lang.Validator;
 import com.zhongzheng.modules.bank.bo.*;
 import com.zhongzheng.modules.bank.domain.QuestionBusiness;
 import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
@@ -138,6 +140,8 @@ public class QuestionModuleController extends BaseController {
     @GetMapping("/chapter/list")
     public AjaxResult<List<QuestionChapterVo>> chapterList(QuestionModuleChapterQueryBo bo) {
         List<QuestionChapterVo> list = iQuestionModuleChapterService.getList(bo);
-        return AjaxResult.success(list);
+        System.out.println(list);
+        return AjaxResult.success((new ArrayList<QuestionChapterVo>()));
+    //    return AjaxResult.success(Validator.isNotNull(list)?list:(new ArrayList<QuestionChapterVo>()));
     }
 }

+ 3 - 1
zhongzheng-system/src/main/resources/mapper/modules/bank/ExamMapper.xml

@@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="projectId" column="project_id"/>
         <result property="subjectName" column="subject_name"/>
         <result property="doType" column="do_type"/>
+        <result property="questionNum" column="question_num"/>
         <collection property="goodsList" column="exam_id" select="findGoodsList"/>
     </resultMap>
 
@@ -80,7 +81,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         cet.education_name,
         cpt.project_name,
         cb.business_name,
-        cs.subject_name
+        cs.subject_name,
+        (SELECT count(*)  from exam_question where exam_id = e.exam_id ) question_num
         FROM
             exam e
                 LEFT JOIN question_business qb ON e.exam_id = qb.major_id