You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.4 KiB
XML
31 lines
1.4 KiB
XML
<?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.glxp.api.dao.basic.BasicCollectUserMapper">
|
|
<select id="filterList" resultType="com.glxp.api.res.basic.UserWorkResponse">
|
|
select bcu.id,sw.workplaceName,sw.invCode,sw.workplaceId,sw.constituencies,sw.operationType,sw.checkInsert,sw.warnType,sw.unitTittle,
|
|
au.userName,au.employeeName
|
|
from basic_collect_user bcu
|
|
left join auth_user au on bcu.userId = au.id
|
|
left join sys_workplace sw on bcu.workplaceCode = sw.workplaceId
|
|
<where>
|
|
<if test=" userId != null and userId != ''">
|
|
AND bcu.userId = #{userId}
|
|
</if>
|
|
<if test=" workplaceCode != null and workplaceCode != ''">
|
|
AND bcu.workplaceCode = #{workplaceCode}
|
|
</if>
|
|
<if test="userKey != null and userKey != ''">
|
|
AND (au.employeeName like concat('%', #{userKey}, '%')
|
|
or au.userName like concat('%', #{userKey}, '%')
|
|
)
|
|
</if>
|
|
<if test="workKey != null and workKey != ''">
|
|
AND (sw.workplaceName like concat('%', #{workKey}, '%')
|
|
or sw.workplaceId like concat('%', #{workKey}, '%')
|
|
)
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|