|
@@ -189,6 +189,9 @@
|
|
|
<if test="educationalTeacherId!=null">
|
|
|
AND vg.educational_teacher_id_=#{educationalTeacherId}
|
|
|
</if>
|
|
|
+ <if test="userId!=null">
|
|
|
+ AND cssp.user_id_ = #{userId}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
@@ -201,17 +204,24 @@
|
|
|
vip_group vg
|
|
|
LEFT JOIN sys_user su ON vg.user_id_=su.id_
|
|
|
LEFT JOIN vip_group_activity vga ON vg.vip_group_activity_id_=vga.id_
|
|
|
+ left join course_schedule_student_payment cssp on cssp.music_group_id_ = vg.id_ and cssp.group_type_ = 'VIP'
|
|
|
<include refid="vipGroupQueryCondition"/>
|
|
|
+ group by vg.id_
|
|
|
ORDER BY vg.id_ DESC
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
|
<select id="countVipGroupByOrgan" resultType="int">
|
|
|
+ select count(*) from
|
|
|
+ (
|
|
|
SELECT
|
|
|
- count(*)
|
|
|
+ count(distinct vg.id_)
|
|
|
FROM
|
|
|
vip_group vg
|
|
|
+ left join course_schedule_student_payment cssp on cssp.music_group_id_ = vg.id_ and cssp.group_type_ = 'VIP'
|
|
|
<include refid="vipGroupQueryCondition"/>
|
|
|
+ GROUP BY vg.id_
|
|
|
+ ) t
|
|
|
</select>
|
|
|
|
|
|
<!-- 向数据库增加一条记录 -->
|