|
@@ -179,6 +179,11 @@
|
|
|
LEFT JOIN `subject` sub ON sub.id_ = s.`subject_id_list_`
|
|
|
LEFT JOIN sys_user_tsign sut ON sut.user_id_ = s.user_id_
|
|
|
LEFT JOIN cooperation_organ co ON s.cooperation_organ_id_=co.id_
|
|
|
+ <if test="hasMember != null">
|
|
|
+ <if test="hasMember == 2">
|
|
|
+ LEFT JOIN cloud_teacher_order cto ON cto.student_id_ = s.user_id_
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<include refid="findStudentsByOrganIdSql"/>
|
|
|
ORDER BY su.create_time_ DESC
|
|
|
<include refid="global.limit"/>
|
|
@@ -219,6 +224,9 @@
|
|
|
<if test="hasMember == 1">
|
|
|
AND s.member_rank_setting_id_ IS NOT NULL
|
|
|
</if>
|
|
|
+ <if test="hasMember == 2">
|
|
|
+ AND cto.status_ = 1
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="teacherId != null">
|
|
|
AND s.teacher_id_ = #{teacherId}
|
|
@@ -244,6 +252,11 @@
|
|
|
<select id="countStudentByOrganId" resultType="java.lang.Integer">
|
|
|
SELECT COUNT(DISTINCT su.id_)
|
|
|
FROM `student` s LEFT JOIN `sys_user` su on s.`user_id_` = su.`id_`
|
|
|
+ <if test="hasMember != null">
|
|
|
+ <if test="hasMember == 2">
|
|
|
+ LEFT JOIN cloud_teacher_order cto ON cto.student_id_ = s.user_id_
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<include refid="findStudentsByOrganIdSql"/>
|
|
|
</select>
|
|
|
<select id="findStudentBaseInfoByUserID" resultMap="studentManageListDto">
|
|
@@ -474,6 +487,9 @@
|
|
|
<if test="hasMember == 1">
|
|
|
AND s.member_rank_setting_id_ IS NOT NULL
|
|
|
</if>
|
|
|
+ <if test="hasMember == 2">
|
|
|
+ AND cto.status_ = 1
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="search != null and search != ''">
|
|
|
AND (su.id_ = #{search} OR su.username_ LIKE CONCAT("%",#{search},"%") OR su.phone_ LIKE CONCAT("%",#{search},"%"))
|
|
@@ -570,6 +586,11 @@
|
|
|
<if test="classGroupId != null">
|
|
|
LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = sr.music_group_id_
|
|
|
</if>
|
|
|
+ <if test="hasMember != null">
|
|
|
+ <if test="hasMember == 2">
|
|
|
+ LEFT JOIN cloud_teacher_order cto ON cto.student_id_ = sr.user_id_
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<include refid="queryMusicGroupStudentSql"/>
|
|
|
ORDER BY sr.id_ DESC
|
|
|
<include refid="global.limit"/>
|
|
@@ -587,6 +608,11 @@
|
|
|
<if test="carePackage != null or comeOnPackage != null">
|
|
|
LEFT JOIN student stu ON sr.user_id_ = stu.user_id_
|
|
|
</if>
|
|
|
+ <if test="hasMember != null">
|
|
|
+ <if test="hasMember == 2">
|
|
|
+ LEFT JOIN cloud_teacher_order cto ON cto.student_id_ = sr.user_id_
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<include refid="queryMusicGroupStudentSql"/>
|
|
|
</select>
|
|
|
|