wms/nflg-wms-repository/src/main/resources/mapper/UserSupplierMapper.xml

30 lines
1.5 KiB
XML
Raw Normal View History

2025-06-27 18:04:24 +08:00
<?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">
2025-06-30 14:56:21 +08:00
<mapper namespace="com.nflg.wms.repository.mapper.UserSupplierMapper">
2025-06-27 18:04:24 +08:00
2025-06-30 14:56:21 +08:00
<select id="search" resultType="com.nflg.wms.common.pojo.vo.UserSupplierVO">
2025-09-19 08:55:38 +08:00
select a.id,user_id,supplier_code,supplier_name,abbreviation,abbreviation1,type_id,abbreviation2,
is_open_account,"state",pci_name,pci_phone,default_language,avatar,remark,
di.name AS type_name,a.create_by,a.create_time,a.update_by,a.update_time
from user_supplier a
LEFT JOIN dictionary_item di ON a.type_id = di.id
2025-06-27 18:04:24 +08:00
<where>
<if test="request.name!=null and request.name!=''">
2025-07-22 18:43:17 +08:00
and (supplier_name like concat('%', #{request.name}, '%')
2025-06-27 18:04:24 +08:00
or abbreviation like concat('%', #{request.name}, '%')
or abbreviation1 like concat('%', #{request.name}, '%')
or abbreviation2 like concat('%', #{request.name}, '%'))
</if>
<if test="request.code!=null and request.code!=''">
2025-07-22 18:43:17 +08:00
and supplier_code like concat('%', #{request.code}, '%')
2025-06-27 18:04:24 +08:00
</if>
<if test="request.startDate != null">
2025-09-19 08:55:38 +08:00
and a.create_time >= #{request.startDate}
2025-06-27 18:04:24 +08:00
</if>
<if test="request.endDate != null">
2025-09-19 08:55:38 +08:00
and a.create_time &lt;= #{request.endDate}
2025-06-27 18:04:24 +08:00
</if>
</where>
</select>
</mapper>