|
@@ -144,6 +144,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="studyStartTime" column="study_start_time"/>
|
|
|
<result property="studyEndTime" column="study_end_time"/>
|
|
|
<result property="studyCount" column="study_count"/>
|
|
|
+ <result property="rebuy" column="rebuy"/>
|
|
|
+ <result property="orderGoodsId" column="order_goods_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
@@ -303,7 +305,9 @@ 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
|
|
|
+ (g.study_count-1) as study_count,
|
|
|
+ og.order_goods_id,
|
|
|
+ og.rebuy
|
|
|
FROM
|
|
|
class_grade_user cgu
|
|
|
LEFT JOIN class_grade cg ON cgu.grade_id = cg.grade_id
|
|
@@ -328,6 +332,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="studyCountMore != null and studyCountMore == 1 ">
|
|
|
AND g.study_count > 1
|
|
|
</if>
|
|
|
+ <if test="studyCountMore != null and studyCountMore == 0 ">
|
|
|
+ AND g.study_count = 1
|
|
|
+ </if>
|
|
|
order by cgu.create_time desc
|
|
|
</select>
|
|
|
|