|
@@ -304,7 +304,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
cgu.official_status,
|
|
cgu.official_status,
|
|
|
cgu.learn_status,
|
|
cgu.learn_status,
|
|
|
(SELECT COUNT(m.id) FROM course_menu_exam m LEFT JOIN goods_course c on m.course_id=c.course_id LEFT JOIN class_grade_goods cgg on cgg.goods_id = c.goods_id where cg.grade_id=cgg.grade_id and m.type = 1 ) as exam_num,
|
|
(SELECT COUNT(m.id) FROM course_menu_exam m LEFT JOIN goods_course c on m.course_id=c.course_id LEFT JOIN class_grade_goods cgg on cgg.goods_id = c.goods_id where cg.grade_id=cgg.grade_id and m.type = 1 ) as exam_num,
|
|
|
- (SELECT COUNT(DISTINCT 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.user_id = u.user_id and ubr.grade_id = cgu.grade_id and ubr.report_status=1) as record_num,
|
|
|
|
|
|
|
+ (SELECT COUNT(DISTINCT 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.user_id = u.user_id and ubr.grade_id = cgu.grade_id and ubr.report_status=1 and ubr.current_status = 1) as record_num,
|
|
|
(og.study_count) as study_count,
|
|
(og.study_count) as study_count,
|
|
|
og.order_goods_id,
|
|
og.order_goods_id,
|
|
|
og.rebuy
|
|
og.rebuy
|
|
@@ -329,8 +329,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and cge.`status`=1 and cgur.`status` =1)> 0
|
|
and cge.`status`=1 and cgur.`status` =1)> 0
|
|
|
AND (SELECT COUNT(cgde.grade_id) FROM class_grade cgde where cgde.grade_id = cg.grade_id and (unix_timestamp(now()) < cgde.class_end_time or cgde.class_start_time is null)) =0
|
|
AND (SELECT COUNT(cgde.grade_id) FROM class_grade cgde where cgde.grade_id = cg.grade_id and (unix_timestamp(now()) < cgde.class_end_time or cgde.class_start_time is null)) =0
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="studyCountMore != null and studyCountMore == 2 ">
|
|
|
|
|
+ AND og.study_count > 0 AND cgu.change_grade = 0
|
|
|
|
|
+ </if>
|
|
|
<if test="studyCountMore != null and studyCountMore == 1 ">
|
|
<if test="studyCountMore != null and studyCountMore == 1 ">
|
|
|
- AND og.study_count > 0
|
|
|
|
|
|
|
+ AND og.study_count > 0 AND cgu.change_grade = 1
|
|
|
</if>
|
|
</if>
|
|
|
<if test="studyCountMore != null and studyCountMore == 0 ">
|
|
<if test="studyCountMore != null and studyCountMore == 0 ">
|
|
|
AND og.study_count = 0
|
|
AND og.study_count = 0
|