|
@@ -821,6 +821,9 @@
|
|
|
WHERE cgsm.group_type_ = 'VIP' AND cgsm.status_ != 'QUIT'
|
|
|
AND vg.educational_teacher_id_ = #{teacherId}
|
|
|
AND vg.group_status_ IN (0,1,2,5)
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (su.id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
GROUP BY cgsm.user_id_
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
@@ -833,6 +836,9 @@
|
|
|
WHERE cgsm.group_type_ = 'PRACTICE' AND cgsm.status_ != 'QUIT'
|
|
|
AND pg.educational_teacher_id_ = #{teacherId}
|
|
|
AND pg.group_status_ NOT IN ('FINISH','CANCEL')
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (su.id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
GROUP BY cgsm.user_id_
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
@@ -841,17 +847,25 @@
|
|
|
SELECT COUNT(DISTINCT cgsm.user_id_) FROM
|
|
|
vip_group vg
|
|
|
LEFT JOIN class_group_student_mapper cgsm ON vg.id_ = cgsm.music_group_id_
|
|
|
+ LEFT JOIN sys_user su ON cgsm.user_id_ = su.id_
|
|
|
WHERE cgsm.group_type_ = 'VIP' AND cgsm.status_ != 'QUIT'
|
|
|
AND vg.educational_teacher_id_ = #{teacherId}
|
|
|
AND vg.group_status_ IN (0,1,2,5)
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (su.id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="countPracticeGroupStudents" resultType="int">
|
|
|
SELECT COUNT(DISTINCT cgsm.user_id_) FROM
|
|
|
practice_group pg
|
|
|
LEFT JOIN class_group_student_mapper cgsm ON pg.id_ = cgsm.music_group_id_
|
|
|
+ LEFT JOIN sys_user su ON cgsm.user_id_ = su.id_
|
|
|
WHERE cgsm.group_type_ = 'PRACTICE' AND cgsm.status_ != 'QUIT'
|
|
|
AND pg.educational_teacher_id_ = #{teacherId}
|
|
|
AND pg.group_status_ NOT IN ('FINISH','CANCEL')
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (su.id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
</select>
|
|
|
</mapper>
|