|
@@ -110,41 +110,29 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findStudentVipGroups" resultMap="studentManageVipGroup">
|
|
<select id="findStudentVipGroups" resultMap="studentManageVipGroup">
|
|
- SELECT cs.teach_mode_,su.real_name_,cg.student_num_,cg.total_class_times_,cg.current_class_times_,
|
|
|
|
- CONCAT(cs.class_date_," ",cs.start_class_time_) course_date_,cg.id_ class_group_id_,cg.name_ class_group_name_,cs.status_ course_status_
|
|
|
|
- FROM vip_group vg
|
|
|
|
- LEFT JOIN class_group cg ON cg.music_group_id_ = vg.id_
|
|
|
|
- LEFT JOIN course_schedule cs ON cs.music_group_id_ = vg.id_
|
|
|
|
- LEFT JOIN sys_user su ON su.id_ = cs.actual_teacher_id_
|
|
|
|
- LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = vg.id_
|
|
|
|
- <where>
|
|
|
|
- vg.audit_status_ = 'PASS' AND cs.id_ IS NOT NULL AND cgsm.status_ != 'QUIT' AND cg.group_type_ = 'VIP'
|
|
|
|
- <if test="studentId != null">
|
|
|
|
- AND cgsm.user_id_ = #{studentId}
|
|
|
|
- </if>
|
|
|
|
- <if test="classGroupName != null">
|
|
|
|
- AND cg.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
- ORDER BY cs.class_date_,cs.start_class_time_
|
|
|
|
|
|
+ SELECT CONCAT(cs.class_date_," ",cs.start_class_time_) course_date_,cs.teach_mode_,cs.status_ course_status_,cs.name_ class_group_name_
|
|
|
|
+ FROM course_schedule cs
|
|
|
|
+ WHERE cs.group_type_ = 'VIP'
|
|
|
|
+ <if test="vipGroupId != null">
|
|
|
|
+ AND cs.music_group_id_ = #{vipGroupId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="classGroupName != null">
|
|
|
|
+ AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY course_date_
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="countStudentVipGroups" resultType="java.lang.Integer">
|
|
<select id="countStudentVipGroups" resultType="java.lang.Integer">
|
|
SELECT COUNT(cs.id_)
|
|
SELECT COUNT(cs.id_)
|
|
- FROM vip_group vg
|
|
|
|
- LEFT JOIN class_group cg ON cg.music_group_id_ = vg.id_
|
|
|
|
- LEFT JOIN course_schedule cs ON cs.music_group_id_ = vg.id_
|
|
|
|
- LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = vg.id_
|
|
|
|
- <where>
|
|
|
|
- vg.audit_status_ = 'PASS' AND cs.id_ IS NOT NULL AND cgsm.status_ != 'QUIT' AND cg.group_type_ = 'VIP'
|
|
|
|
- <if test="studentId != null">
|
|
|
|
- AND cgsm.user_id_ = #{studentId}
|
|
|
|
- </if>
|
|
|
|
- <if test="classGroupName != null">
|
|
|
|
- AND cg.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
|
|
+ FROM course_schedule cs
|
|
|
|
+ WHERE cs.group_type_ = 'VIP'
|
|
|
|
+ <if test="vipGroupId != null">
|
|
|
|
+ AND cs.music_group_id_ = #{vipGroupId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="classGroupName != null">
|
|
|
|
+ AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 全查询 -->
|
|
<!-- 全查询 -->
|