74 lines
3.3 KiB
XML
74 lines
3.3 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.ruoyi.bas.warehousePort.mapper.BasWarehousePortMapper">
|
|
|
|
<resultMap type="BasWarehousePort" id="BasWarehousePortResult">
|
|
<result property="id" column="id" />
|
|
<result property="warehouseId" column="warehouse_id" />
|
|
<result property="portCode" column="port_code" />
|
|
<result property="portName" column="port_name" />
|
|
<result property="portType" column="port_type" />
|
|
</resultMap>
|
|
|
|
<sql id="selectBasWarehousePortVo">
|
|
select id, warehouse_id, port_code, port_name, port_type from bas_warehouse_port
|
|
</sql>
|
|
|
|
<select id="selectBasWarehousePortList" parameterType="BasWarehousePort" resultMap="BasWarehousePortResult">
|
|
<include refid="selectBasWarehousePortVo"/>
|
|
<where>
|
|
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id like concat('%', #{warehouseId}, '%')</if>
|
|
<if test="portCode != null and portCode != ''"> and port_code like concat('%', #{portCode}, '%')</if>
|
|
<if test="portName != null and portName != ''"> and port_name like concat('%', #{portName}, '%')</if>
|
|
<if test="portType != null and portType != ''"> and port_type like concat('%', #{portType}, '%')</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectBasWarehousePortById" parameterType="Long" resultMap="BasWarehousePortResult">
|
|
<include refid="selectBasWarehousePortVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertBasWarehousePort" parameterType="BasWarehousePort">
|
|
insert into bas_warehouse_port
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="warehouseId != null">warehouse_id,</if>
|
|
<if test="portCode != null">port_code,</if>
|
|
<if test="portName != null">port_name,</if>
|
|
<if test="portType != null">port_type,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="warehouseId != null">#{warehouseId},</if>
|
|
<if test="portCode != null">#{portCode},</if>
|
|
<if test="portName != null">#{portName},</if>
|
|
<if test="portType != null">#{portType},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateBasWarehousePort" parameterType="BasWarehousePort">
|
|
update bas_warehouse_port
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
|
<if test="portCode != null">port_code = #{portCode},</if>
|
|
<if test="portName != null">port_name = #{portName},</if>
|
|
<if test="portType != null">port_type = #{portType},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteBasWarehousePortById" parameterType="Long">
|
|
delete from bas_warehouse_port where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteBasWarehousePortByIds" parameterType="String">
|
|
delete from bas_warehouse_port where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|