|
@@ -206,10 +206,9 @@
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="Teacher" parameterType="map">
|
|
|
SELECT t.id_,su.real_name_,su.lock_flag_,t.subject_id_,su.phone_,su.organ_id_,
|
|
|
- t.job_nature_,t.is_probation_period_,GROUP_CONCAT(s.name_) subject_name_
|
|
|
+ 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.user_type_ = 'TEACHER' AND su.del_flag_ = 0
|
|
|
<include refid="queryPageMap"/>
|
|
|
GROUP BY t.id_
|
|
|
ORDER BY t.update_time_ DESC
|
|
@@ -219,29 +218,30 @@
|
|
|
<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.user_type_ LIKE '%TEACHER%' AND su.del_flag_ = 0
|
|
|
<include refid="queryPageMap"/>
|
|
|
</select>
|
|
|
|
|
|
<sql id="queryPageMap">
|
|
|
- <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>
|
|
|
+ </where>
|
|
|
</sql>
|
|
|
|
|
|
<!-- 根据证件号查询老师 -->
|