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.
udi-wms-java/src/main/resources/mybatis/mapper/basic/BasicCollectUserMapper.xml

43 lines
1.8 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">
11 months ago
<select id="filterList" resultType="com.glxp.api.res.basic.UserWorkResponse">
11 months ago
select bcu.id,
sw.workplaceName,
sw.invCode,
sw.workplaceId,
sw.constituencies,
sw.remake,
11 months ago
au.userName,
au.employeeName,
sw.createTime as createTime,
sw.workplaceStatus,
sw.workplaceType,
sw.invRemindNumber,
10 months ago
sw.workPlaceClass,
11 months ago
ad.name deptCodeName
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
left join auth_dept ad on ad.code = sw.deptCode
11 months ago
<where>
11 months ago
<if test="userId != null and userId != ''">
11 months ago
AND bcu.userId = #{userId}
</if>
11 months ago
<if test="workplaceCode != null and workplaceCode != ''">
AND bcu.workplaceCode = #{workplaceCode}
11 months ago
</if>
<if test="userKey != null and userKey != ''">
11 months ago
AND (au.employeeName like concat('%', #{userKey}, '%')
11 months ago
or au.userName like concat('%', #{userKey}, '%')
)
11 months ago
</if>
<if test="workKey != null and workKey != ''">
AND (sw.workplaceName like concat('%', #{workKey}, '%')
11 months ago
or sw.workplaceId like concat('%', #{workKey}, '%')
)
11 months ago
</if>
</where>
</select>
</mapper>