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

26 lines
1.2 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=" workplaceId != null and workplaceId != ''">
AND bcu.workplaceCode = #{workplaceId}
</if>
<if test="userKey != null and userKey != ''">
AND (bcp.name like concat('%', #{userKey}, '%')
or bcp.code like concat('%', #{userKey}, '%')
)
</if>
</where>
</select>
</mapper>