|
@@ -209,6 +209,7 @@
|
|
|
t.job_nature_,t.is_probation_period_,GROUP_CONCAT(s.name_) subject_name_,su.del_flag_
|
|
|
FROM teacher t LEFT JOIN sys_user su ON t.id_ = su.id_
|
|
|
LEFT JOIN `subject` s ON FIND_IN_SET(s.id_,t.subject_id_)
|
|
|
+ WHERE su.del_flag_ = 0
|
|
|
<include refid="queryPageMap"/>
|
|
|
GROUP BY t.id_
|
|
|
ORDER BY t.update_time_ DESC
|
|
@@ -218,30 +219,29 @@
|
|
|
<select id="queryCount" resultType="int">
|
|
|
SELECT COUNT(DISTINCT t.id_)
|
|
|
FROM teacher t LEFT JOIN sys_user su ON t.id_ = su.id_
|
|
|
+ WHERE su.del_flag_ = 0
|
|
|
<include refid="queryPageMap"/>
|
|
|
</select>
|
|
|
|
|
|
<sql id="queryPageMap">
|
|
|
- <where>
|
|
|
- <if test="lockFlag != null">
|
|
|
- AND su.lock_flag_ = #{lockFlag}
|
|
|
- </if>
|
|
|
- <if test="subjectId != null">
|
|
|
- AND FIND_IN_SET(#{subjectId},t.subject_id_)
|
|
|
- </if>
|
|
|
- <if test="organId != null">
|
|
|
- AND FIND_IN_SET(su.organ_id_,#{organId})
|
|
|
- </if>
|
|
|
- <if test="search != null">
|
|
|
- AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
- </if>
|
|
|
- <if test="jobNature != null">
|
|
|
- AND t.job_nature_ = #{jobNature}
|
|
|
- </if>
|
|
|
- <if test="isProbationPeriod != null">
|
|
|
- AND t.is_probation_period_ = #{isProbationPeriod}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ <if test="lockFlag != null">
|
|
|
+ AND su.lock_flag_ = #{lockFlag}
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null">
|
|
|
+ AND FIND_IN_SET(#{subjectId},t.subject_id_)
|
|
|
+ </if>
|
|
|
+ <if test="organId != null">
|
|
|
+ AND FIND_IN_SET(su.organ_id_,#{organId})
|
|
|
+ </if>
|
|
|
+ <if test="search != null">
|
|
|
+ AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="jobNature != null">
|
|
|
+ AND t.job_nature_ = #{jobNature}
|
|
|
+ </if>
|
|
|
+ <if test="isProbationPeriod != null">
|
|
|
+ AND t.is_probation_period_ = #{isProbationPeriod}
|
|
|
+ </if>
|
|
|
</sql>
|
|
|
|
|
|
<!-- 根据证件号查询老师 -->
|
|
@@ -346,6 +346,7 @@
|
|
|
LEFT JOIN class_group_teacher_mapper cgtm ON t.id_ = cgtm.user_id_
|
|
|
LEFT JOIN class_group cg ON cg.id_ = cgtm.class_group_id_
|
|
|
LEFT JOIN sys_user su ON t.id_ = su.id_
|
|
|
+ WHERE cg.del_flag_ != '1'
|
|
|
<include refid="queryMusicGroupTeachersSql"/>
|
|
|
GROUP BY t.id_
|
|
|
<include refid="global.limit"/>
|
|
@@ -356,21 +357,20 @@
|
|
|
LEFT JOIN class_group_teacher_mapper cgtm ON t.id_ = cgtm.user_id_
|
|
|
LEFT JOIN class_group cg ON cg.id_ = cgtm.class_group_id_
|
|
|
LEFT JOIN sys_user su ON t.id_ = su.id_
|
|
|
+ WHERE cg.del_flag_ != '1'
|
|
|
<include refid="queryMusicGroupTeachersSql"/>
|
|
|
</select>
|
|
|
<sql id="queryMusicGroupTeachersSql">
|
|
|
- <where>
|
|
|
- <if test="search != null and search != ''">
|
|
|
- AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%') OR
|
|
|
- su.id_=#{search})
|
|
|
- </if>
|
|
|
- <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
- AND cgtm.music_group_id_ = #{musicGroupId}
|
|
|
- </if>
|
|
|
- <if test="classGroupId != null">
|
|
|
- AND cg.id_ = #{classGroupId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%') OR
|
|
|
+ su.id_=#{search})
|
|
|
+ </if>
|
|
|
+ <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
+ AND cgtm.music_group_id_ = #{musicGroupId}
|
|
|
+ </if>
|
|
|
+ <if test="classGroupId != null">
|
|
|
+ AND cg.id_ = #{classGroupId}
|
|
|
+ </if>
|
|
|
</sql>
|
|
|
|
|
|
<select id="findSignNum" resultType="java.util.Map">
|