|
@@ -73,6 +73,10 @@
|
|
<result property="studyEndTime" column="study_end_time"/>
|
|
<result property="studyEndTime" column="study_end_time"/>
|
|
<result property="rebuildNum" column="rebuild_num"/>
|
|
<result property="rebuildNum" column="rebuild_num"/>
|
|
<result property="profileStatus" column="profile_status"/>
|
|
<result property="profileStatus" column="profile_status"/>
|
|
|
|
+ <result property="className" column="class_name"/>
|
|
|
|
+ <result property="goodsName" column="goods_name"/>
|
|
|
|
+ <result property="standPrice" column="stand_price"/>
|
|
|
|
+ <result property="goodsCode" column="goods_code"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodUserVo" id="ClassPeriodUserVo">
|
|
<resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodUserVo" id="ClassPeriodUserVo">
|
|
@@ -221,15 +225,16 @@
|
|
cgu.grade_id,
|
|
cgu.grade_id,
|
|
u.telphone,
|
|
u.telphone,
|
|
up.`status` as profile_status,
|
|
up.`status` as profile_status,
|
|
- (SELECT g.class_hours FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where
|
|
|
|
- cg.grade_id = cgg.grade_id) as class_hours,
|
|
|
|
- (SELECT g.study_start_time FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where
|
|
|
|
- cg.grade_id = cgg.grade_id) as study_start_time,
|
|
|
|
- (SELECT g.study_end_time FROM goods g LEFT JOIN class_grade_goods cgg on cgg.goods_id = g.goods_id where
|
|
|
|
- cg.grade_id = cgg.grade_id) as study_end_time,
|
|
|
|
|
|
+ g.class_hours as class_hours,
|
|
|
|
+ g.study_start_time as study_start_time,
|
|
|
|
+ g.study_end_time as study_end_time,
|
|
|
|
+ g.goods_name,
|
|
|
|
+ g.code as goods_code,
|
|
|
|
+ g.stand_price,
|
|
cgu.period_status,
|
|
cgu.period_status,
|
|
cg.class_start_time,
|
|
cg.class_start_time,
|
|
cg.class_end_time,
|
|
cg.class_end_time,
|
|
|
|
+ cg.class_name,
|
|
cgu.period_plush,
|
|
cgu.period_plush,
|
|
(SELECT COUNT(m.id) FROM course_menu_exam m LEFT JOIN goods_course c on m.course_id=c.course_id LEFT JOIN
|
|
(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,
|
|
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,
|
|
@@ -244,14 +249,33 @@
|
|
LEFT JOIN class_grade_goods cgg on cg.grade_id=cgg.grade_id
|
|
LEFT JOIN class_grade_goods cgg on cg.grade_id=cgg.grade_id
|
|
LEFT JOIN `user` u ON u.user_id = cgu.user_id
|
|
LEFT JOIN `user` u ON u.user_id = cgu.user_id
|
|
LEFT JOIN user_profile up on u.user_id =up.user_id and up.goods_id = cgg.goods_id and up.type_status=1 and up.current_status = 1
|
|
LEFT JOIN user_profile up on u.user_id =up.user_id and up.goods_id = cgg.goods_id and up.type_status=1 and up.current_status = 1
|
|
|
|
+ LEFT JOIN goods g on cgg.goods_id = g.goods_id
|
|
where 1=1
|
|
where 1=1
|
|
and cgu.`status` =1
|
|
and cgu.`status` =1
|
|
|
|
+ <if test="profileStatus != null and profileStatus != ''">
|
|
|
|
+ AND up.status = #{profileStatus}
|
|
|
|
+ </if>
|
|
<if test="gradeId != null and gradeId !='' ">
|
|
<if test="gradeId != null and gradeId !='' ">
|
|
and cgu.grade_id = #{gradeId}
|
|
and cgu.grade_id = #{gradeId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
|
+ AND g.business_id = #{businessId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="schoolId != null and schoolId != ''">
|
|
|
|
+ AND g.school_id = #{schoolId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="majorId != null and majorId != ''">
|
|
|
|
+ AND g.major_id = #{majorId}
|
|
|
|
+ </if>
|
|
<if test="periodStatus != null ">
|
|
<if test="periodStatus != null ">
|
|
and cgu.period_status = #{periodStatus}
|
|
and cgu.period_status = #{periodStatus}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="classStartTime != null and classStartTime != '' ">
|
|
|
|
+ AND cg.class_start_time > #{classStartTime}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="classEndTime != null and classEndTime != '' ">
|
|
|
|
+ AND #{classEndTime} > cg.class_end_time
|
|
|
|
+ </if>
|
|
<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>
|