|
@@ -243,10 +243,12 @@
|
|
<if test="userPhoto != null and userPhoto == 1">
|
|
<if test="userPhoto != null and userPhoto == 1">
|
|
up.key_value,
|
|
up.key_value,
|
|
</if>
|
|
</if>
|
|
- (SELECT COUNT(DISTINCT ubr.module_id,ubr.chapter_id,ubr.exam_id) FROM user_bank_record ubr where ubr.`status`=1 and ubr.report_status=1 and ubr.grade_id = cgu.grade_id and ubr.user_id = cgu.user_id and ubr.current_status = 1) as record_num,
|
|
|
|
- cgu.period_time as end_time,
|
|
|
|
|
|
+ cgu.period_time as end_time
|
|
|
|
+ <if test="userPhoto == null">
|
|
|
|
+ ,(SELECT COUNT(DISTINCT ubr.module_id,ubr.chapter_id,ubr.exam_id) FROM user_bank_record ubr where ubr.`status`=1 and ubr.report_status=1 and ubr.grade_id = cgu.grade_id and ubr.user_id = cgu.user_id and ubr.current_status = 1) as record_num,
|
|
(select COUNT(up.id) from user_period up LEFT JOIN user_period_status ups on up.id=ups.period_id where up.goods_id = (SELECT cgg.goods_id FROM class_grade_goods cgg where cg.grade_id=cgg.grade_id) and up.grade_id = cgu.grade_id and up.user_id = u.user_id
|
|
(select COUNT(up.id) from user_period up LEFT JOIN user_period_status ups on up.id=ups.period_id where up.goods_id = (SELECT cgg.goods_id FROM class_grade_goods cgg where cg.grade_id=cgg.grade_id) and up.grade_id = cgu.grade_id and up.user_id = u.user_id
|
|
and ups.period_status=0 and ups.`status`=0 and (SELECT COUNT(upss.id) from user_period_status upss where upss.id = ups.id and upss.period_status = 1 and upss.`status` = 2) > 0 ) as rebuild_num
|
|
and ups.period_status=0 and ups.`status`=0 and (SELECT COUNT(upss.id) from user_period_status upss where upss.id = ups.id and upss.period_status = 1 and upss.`status` = 2) > 0 ) as rebuild_num
|
|
|
|
+ </if>
|
|
FROM
|
|
FROM
|
|
class_grade_user cgu
|
|
class_grade_user cgu
|
|
LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
|
|
LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
|
|
@@ -295,6 +297,12 @@
|
|
<if test="periodStatus == 2 ">
|
|
<if test="periodStatus == 2 ">
|
|
order by cgu.period_wait_time,cgu.update_time desc
|
|
order by cgu.period_wait_time,cgu.update_time desc
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="studyStatus != null and studyStatus == 1 ">
|
|
|
|
+ and cgu.period_status = -1
|
|
|
|
+ </if>
|
|
|
|
+ <if test="studyStatus != null and studyStatus == 2 ">
|
|
|
|
+ and cgu.period_status != -1
|
|
|
|
+ </if>
|
|
<if test="periodStatus != 2 ">
|
|
<if test="periodStatus != 2 ">
|
|
order by cgu.update_time desc
|
|
order by cgu.update_time desc
|
|
</if>
|
|
</if>
|