<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.mindskip.xzs.repository.UserConditionExamineMapper">
|
|
<select id="pageInfo" resultType="com.mindskip.xzs.domain.vo.UserConditionExamineVO">
|
SELECT
|
a.* ,
|
b1.real_name as userName,
|
b2.real_name as createUserName
|
FROM
|
t_user_condition_examine a
|
LEFT JOIN t_user b1 ON a.user_id = b1.id
|
LEFT JOIN t_user b2 ON a.create_user = b2.id
|
iNNER JOIN t_user_department c ON a.user_id = c.user_id
|
<if test="deptIds != null and deptIds.size() > 0">
|
AND c.department_id IN
|
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
|
#{deptId}
|
</foreach>
|
</if>
|
WHERE
|
a.deleted = 0
|
<if test="userName != null">
|
AND b1.real_name LIKE concat('%', #{userName}, '%')
|
</if>
|
GROUP BY a.id, a.create_time
|
ORDER BY a.create_time
|
</select>
|
</mapper>
|