|
@@ -305,7 +305,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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(DISTINCT 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,
|
|
|
- (g.study_count-1) as study_count,
|
|
|
+ (og.study_count-1) as study_count,
|
|
|
og.order_goods_id,
|
|
|
og.rebuy
|
|
|
FROM
|
|
@@ -330,10 +330,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
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 test="studyCountMore != null and studyCountMore == 1 ">
|
|
|
- AND g.study_count > 1
|
|
|
+ AND og.study_count > 1
|
|
|
</if>
|
|
|
<if test="studyCountMore != null and studyCountMore == 0 ">
|
|
|
- AND g.study_count = 1
|
|
|
+ AND og.study_count = 1
|
|
|
</if>
|
|
|
order by cgu.create_time desc
|
|
|
</select>
|