<?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>
|