he2802 3 năm trước cách đây
mục cha
commit
8be2a0bda3

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -374,7 +374,7 @@
             g.`year`,
             cgu.period_status,
             (SELECT COUNT(1) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where up.goods_id = g.goods_id AND ups.period_status =1  and (ups.`status` =3 or ups.`status` =0) and up.grade_id = cgu.grade_id) as rebuild,
-            (case WHEN (SELECT COUNT(1) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where up.goods_id = g.goods_id AND ups.period_status =1 and ups.`status` =0) >0 then 0 ELSE 1 end) as rebuild_status,
+            (case WHEN (SELECT COUNT(1) FROM user_period up LEFT JOIN user_period_status ups on up.id = ups.period_id where up.goods_id = g.goods_id AND ups.period_status =1 and ups.`status` =0) >0 then 1 ELSE 0 end) as rebuild_status,
             cgu.grade_id,
             IFNULL(ge.exam_num,0) 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.user_id =cgu.user_id and ubr.grade_id = cg.grade_id and ubr.current_status = 1) as record_num,