he2802 3 år sedan
förälder
incheckning
617487a545

+ 1 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/grade/ClassGradeController.java

@@ -435,4 +435,5 @@ public class ClassGradeController extends BaseController {
     public AjaxResult<Long> checkGoodsChange(UserPeriodQueryBo bo) {
         return AjaxResult.success(iUserPeriodService.checkGoodsChange(bo));
     }
+
 }

+ 12 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeUserMapper.xml

@@ -313,7 +313,9 @@
         SELECT
         IFNULL(ge.exam_num,0) as exam_num,
         (SELECT COUNT(DISTINCT ubr.module_id,ubr.chapter_id,ubr.exam_id) FROM user_bank_record ubr LEFT JOIN class_grade_goods cgg on cgg.goods_id
-        = ubr.goods_id where ubr.`status`=1 and ubr.report_status=1 and ubr.grade_id = cg.grade_id and ubr.user_id = cgu.user_id and ubr.current_status = 1) as record_num
+        = ubr.goods_id where ubr.`status`=1 and ubr.report_status=1 and ubr.grade_id = cg.grade_id and ubr.user_id = cgu.user_id and ubr.current_status = 1) as record_num,
+        cgu.user_id,
+        cgg.goods_id
         FROM
         class_grade_user cgu
         LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
@@ -599,6 +601,9 @@
         WHERE
         ccs.chapter_id = cc.chapter_id
         AND usr.current_status = 1
+        <if test="moduleId != null and moduleId !='' ">
+            AND usr.module_id=#{moduleId}
+        </if>
         <if test="goodsId != null and goodsId !='' ">
             AND usr.goods_id=#{goodsId}
         </if>
@@ -621,6 +626,9 @@
         WHERE
         ccs.chapter_id = cc.chapter_id
         AND usr.current_status = 1
+        <if test="moduleId != null and moduleId !='' ">
+            AND usr.module_id=#{moduleId}
+        </if>
         <if test="goodsId != null and goodsId !='' ">
             AND usr.goods_id=#{goodsId}
         </if>
@@ -642,6 +650,9 @@
         LEFT JOIN course_menu_exam cme ON cme.exam_id = ubr.exam_id and cme.chapter_id  = ubr.chapter_id
         WHERE 1=1
         AND ubr.current_status = 1
+        <if test="moduleId != null and moduleId !='' ">
+            AND ubr.module_id=#{moduleId}
+        </if>
         <if test="goodsId != null and goodsId !='' ">
             AND ubr.goods_id=#{goodsId}
         </if>