|
@@ -1440,6 +1440,19 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
|
|
|
+
|
|
|
+ <sql id="queryTeacherMusicIdsConditionV2">
|
|
|
+ <where>
|
|
|
+ csts.del_flag_=0 AND csts.group_type_='MUSIC' AND mg.del_flag_=0 AND mg.status_='PROGRESS' and csts.tenant_id_ = #{tenantId}
|
|
|
+ <if test="teacherId!=null">
|
|
|
+ AND csts.teacher_id_=#{teacherId}
|
|
|
+ </if>
|
|
|
+ <if test="search!=null and search!=''">
|
|
|
+ AND mg.name_ LIKE CONCAT('%', #{search}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+
|
|
|
<select id="queryTeacherMusicIds" resultType="string">
|
|
|
SELECT csts.music_group_id_
|
|
|
FROM course_schedule_teacher_salary csts
|
|
@@ -1459,6 +1472,23 @@
|
|
|
<include refid="queryTeacherMusicIdsCondition"></include>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryTeacherMusicIdsV2" resultType="string">
|
|
|
+ SELECT csts.music_group_id_
|
|
|
+ FROM course_schedule csts
|
|
|
+ LEFT JOIN music_group mg ON csts.music_group_id_=mg.id_
|
|
|
+ <include refid="queryTeacherMusicIdsConditionV2"></include>
|
|
|
+ GROUP BY csts.music_group_id_
|
|
|
+ ORDER BY mg.create_time_ DESC, mg.id_
|
|
|
+ <include refid="global.limit"></include>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="countTeacherMusicsV2" resultType="int">
|
|
|
+ SELECT COUNT(DISTINCT csts.music_group_id_)
|
|
|
+ FROM course_schedule csts
|
|
|
+ LEFT JOIN music_group mg ON csts.music_group_id_=mg.id_
|
|
|
+ <include refid="queryTeacherMusicIdsConditionV2"></include>
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getSimpleUser" resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
|
|
|
SELECT
|
|
|
su.id_ userId,
|