陶杰
2024-08-22 ee9032d9baf5f33e376d2d2699136e0a7b26bec7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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.mzl.flower.mapper.warehouse.WarehouseLocationMapper">
 
    <select id="findAll" resultType="com.mzl.flower.dto.response.warehouse.WarehouseLocationDTO">
        select wl.*,w.name as warehouseName from t_warehouse_location wl left join t_warehouse w on wl.warehouse_id = w.id where wl.deleted = 0 and w.deleted = 0
        <if test="warehouseId != null">
            and wl.warehouse_id = #{warehouseId}
        </if>
        <if test="code != null and code != ''">
            and wl.code = #{code}
        </if>
        order by w.seq asc,wl.seq ASC
    </select>
    <select id="findById" resultType="com.mzl.flower.dto.response.warehouse.WarehouseLocationDTO"
            parameterType="java.lang.Long">
        select wl.*,w.name as warehouseName from t_warehouse_location wl left join t_warehouse w on wl.warehouse_id = w.id where wl.deleted = 0 and w.deleted = 0
        <if test="id != null">
            and wl.id = #{id}
        </if>
    </select>
</mapper>