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

67 lines
2.5 KiB
XML
Raw Normal View History

2025-07-02 11:38:49 +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-07-02 12:05:31 +08:00
<mapper namespace="com.nflg.wms.repository.mapper.WmsWarehouseMapper">
2025-07-02 11:38:49 +08:00
<select id="search" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
select w.*,di.name as factory_name
2025-07-02 12:05:31 +08:00
from wms_warehouse w
2025-07-02 11:38:49 +08:00
left join dictionary_item di on w.factory_id=di.id
<where>
2025-08-22 18:52:00 +08:00
<if test="request.enable != null">
and w.enable=#{request.enable}
</if>
2025-07-02 11:38:49 +08:00
<if test="request.no != null and request.no != ''">
2025-09-22 17:47:51 +08:00
and w.no ilike concat('%',#{request.no},'%')
2025-07-02 11:38:49 +08:00
</if>
<if test="request.name != null and request.name != ''">
2025-09-22 17:47:51 +08:00
and w.name ilike concat('%',#{request.name},'%')
2025-07-02 11:38:49 +08:00
</if>
</where>
</select>
<select id="getList" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
select w.*,di.name as factory_name
2025-07-02 12:05:31 +08:00
from wms_warehouse w
2025-07-02 11:38:49 +08:00
left join dictionary_item di on w.factory_id=di.id
where w.id in
<foreach item="item" collection="ids" separator="," open="(" close=")">
#{item}
</foreach>
</select>
2025-07-16 11:13:56 +08:00
<select id="searchNonPage" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
select w.*,di.name as factory_name
from wms_warehouse w
left join dictionary_item di on w.factory_id=di.id
<where>
<if test="request.no != null and request.no != ''">
2025-09-22 17:47:51 +08:00
and w.no ilike concat('%',#{request.no},'%')
2025-07-16 11:13:56 +08:00
</if>
<if test="request.name != null and request.name != ''">
2025-09-22 17:47:51 +08:00
and w.name ilike concat('%',#{request.name},'%')
2025-07-16 11:13:56 +08:00
</if>
</where>
</select>
2025-08-08 14:04:10 +08:00
<select id="getEnableList" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
select w.*, di.name as factory_name
from wms_warehouse w
left join dictionary_item di on w.factory_id = di.id
where w.enable
2025-08-31 21:03:30 +08:00
<if test="factoryNo!=null and factoryNo!=''">
and di.code=#{factoryNo}
</if>
2025-08-22 18:52:00 +08:00
order by w.id
2025-08-08 14:04:10 +08:00
</select>
<select id="getListByIds" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
select w.*, di.name as factory_name
from wms_warehouse w
left join dictionary_item di on w.factory_id = di.id
where w.id in
<foreach item="item" collection="list" separator="," open="(" close=")">
#{item}
</foreach>
</select>
2025-07-02 11:38:49 +08:00
</mapper>