29 lines
1.1 KiB
XML
29 lines
1.1 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.nflg.wms.repository.mapper.WarehouseMapper">
|
||
|
|
|
||
|
|
<select id="search" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
|
||
|
|
select w.*,di.name as factory_name
|
||
|
|
from warehouse w
|
||
|
|
left join dictionary_item di on w.factory_id=di.id
|
||
|
|
<where>
|
||
|
|
<if test="request.no != null and request.no != ''">
|
||
|
|
and w.no like concat('%',#{request.no},'%')
|
||
|
|
</if>
|
||
|
|
<if test="request.name != null and request.name != ''">
|
||
|
|
and w.name like concat('%',#{request.name},'%')
|
||
|
|
</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="getList" resultType="com.nflg.wms.common.pojo.vo.WarehouseVO">
|
||
|
|
select w.*,di.name as factory_name
|
||
|
|
from warehouse w
|
||
|
|
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>
|
||
|
|
</mapper>
|