liujie
2023-10-15 1707d15796d7dc78812f19b9c34868c8cb38a714
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?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.stylefeng.guns.modular.system.dao.WareHouseMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TWarehouse">
        <id column="id" property="id"/>
        <result column="location" property="location"/>
        <result column="code" property="code"/>
        <result column="type" property="type"/>
        <result column="address" property="address"/>
    </resultMap>
    <select id="getWarehouseFromId" resultType="com.stylefeng.guns.modular.system.model.TWarehouse">
        select * from t_warehouse where port_id =#{id}
        <if test="code != null and code !=''">
            and (code like concat ("%",#{code},"%") or state like concat ("%",#{code},"%") )
        </if>
    </select>
 
 
</mapper>