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

27 lines
1.0 KiB
XML
Raw Normal View History

2025-07-02 14:20:32 +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">
<mapper namespace="com.nflg.wms.repository.mapper.WmsBinMapper">
<select id="search" resultType="com.nflg.wms.common.pojo.vo.BinVO">
select *, wh.no as warehouse_no, wh.name as warehouse_name
from wms_bin bin
left join wms_warehouse wh on bin.warehouse_id=wh.id
<where>
<if test="request.warehouseId != null">
and bin.warehouse_id=#{warehouseId}
</if>
</where>
order by bin.id desc
</select>
<select id="getList" resultType="com.nflg.wms.common.pojo.vo.BinVO">
select *, wh.no as warehouse_no, wh.name as warehouse_name
from wms_bin bin
left join wms_warehouse wh on bin.warehouse_id=wh.id
where bin.id in
<foreach item="item" collection="ids" separator="," open="(" close=")">
#{item}
</foreach>
</select>
</mapper>