|
@@ -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>
|