|
@@ -110,12 +110,17 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findStudentVipGroups" resultMap="studentManageVipGroup">
|
|
<select id="findStudentVipGroups" resultMap="studentManageVipGroup">
|
|
- 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'
|
|
|
|
|
|
+ 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_student_payment cssp
|
|
|
|
+ LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
|
|
|
|
+ WHERE cssp.group_type_ = 'VIP'
|
|
<if test="vipGroupId != null">
|
|
<if test="vipGroupId != null">
|
|
AND cs.music_group_id_ = #{vipGroupId}
|
|
AND cs.music_group_id_ = #{vipGroupId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="studentId != null">
|
|
|
|
+ AND cssp.user_id_ = #{studentId}
|
|
|
|
+ </if>
|
|
<if test="classGroupName != null">
|
|
<if test="classGroupName != null">
|
|
AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
</if>
|
|
</if>
|
|
@@ -124,12 +129,16 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="countStudentVipGroups" resultType="java.lang.Integer">
|
|
<select id="countStudentVipGroups" resultType="java.lang.Integer">
|
|
- SELECT COUNT(cs.id_)
|
|
|
|
- FROM course_schedule cs
|
|
|
|
|
|
+ SELECT COUNT(cssp.id_)
|
|
|
|
+ FROM course_schedule_student_payment cssp
|
|
|
|
+ LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
|
|
WHERE cs.group_type_ = 'VIP'
|
|
WHERE cs.group_type_ = 'VIP'
|
|
<if test="vipGroupId != null">
|
|
<if test="vipGroupId != null">
|
|
AND cs.music_group_id_ = #{vipGroupId}
|
|
AND cs.music_group_id_ = #{vipGroupId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="studentId != null">
|
|
|
|
+ AND cssp.user_id_ = #{studentId}
|
|
|
|
+ </if>
|
|
<if test="classGroupName != null">
|
|
<if test="classGroupName != null">
|
|
AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
AND cs.name_ LIKE CONCAT('%',#{classGroupName},'%')
|
|
</if>
|
|
</if>
|