|
@@ -617,4 +617,34 @@
|
|
|
AND su.real_name_ LIKE CONCAT('%',#{teacherName},'%')
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <select id="countTeacherName" resultType="java.lang.Integer">
|
|
|
+ SELECT COUNT(su.id_) FROM teacher t
|
|
|
+ LEFT JOIN sys_user su ON t.id_ = su.id_
|
|
|
+ WHERE su.del_flag_ != 1
|
|
|
+ <include refid="queryPageNameSql"/>
|
|
|
+ </select>
|
|
|
+ <sql id="queryPageNameSql">
|
|
|
+ <if test="organId != null">
|
|
|
+ AND FIND_IN_SET(t.organ_id_,#{organId})
|
|
|
+ </if>
|
|
|
+ <if test="subjectIds != null">
|
|
|
+ AND INTE_ARRAY(t.subject_id_,#{subjectIds})
|
|
|
+ </if>
|
|
|
+ <if test="jobNature != null">
|
|
|
+ AND t.job_nature_ = #{jobNature}
|
|
|
+ </if>
|
|
|
+ <if test="teacherId != null">
|
|
|
+ AND t.id_ = #{teacherId}
|
|
|
+ </if>
|
|
|
+ <if test="search != null">
|
|
|
+ AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
+ <select id="queryPageName" resultMap="TeacherBasicDto">
|
|
|
+ SELECT su.id_,su.real_name_ FROM teacher t
|
|
|
+ LEFT JOIN sys_user su ON t.id_ = su.id_
|
|
|
+ WHERE su.del_flag_ != 1
|
|
|
+ <include refid="queryPageNameSql"/>
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
</mapper>
|