| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?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.yunfeiyun.agmp.fms.mapper.FmsLandHouseMapper">
- <sql id="selectFmsLandHouseVo">
- select landhouseId, landId, warehouseId from FmsLandHouse
- </sql>
- <select id="selectFmsLandHouseList" parameterType="FmsLandHouse" resultType="FmsLandHouse">
- <include refid="selectFmsLandHouseVo"/>
- <where>
- <if test="landId != null and landId != ''"> and landId = #{landId}</if>
- <if test="warehouseId != null and warehouseId != ''"> and warehouseId = #{warehouseId}</if>
- <if test="tid != null and tid != '-1'">and tid = #{tid}</if>
- </where>
- </select>
-
- <select id="selectFmsLandHouseByLandhouseId" parameterType="String" resultType="FmsLandHouse">
- <include refid="selectFmsLandHouseVo"/>
- where landhouseId = #{landhouseId}
- <if test="tid != null and tid !='' and tid != '-1'">
- and tid = #{tid}
- </if>
- </select>
- <select id="selectFmsLandHouseByWarehouseId" parameterType="String" resultType="FmsLandHouse">
- <include refid="selectFmsLandHouseVo"/>
- where tid = #{tid} and warehouseId in
- <foreach item="warehouseId" collection="array" open="(" separator="," close=")">
- #{warehouseId}
- </foreach>
- </select>
- <insert id="insertFmsLandHouse" parameterType="FmsLandHouse">
- insert into FmsLandHouse
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="landhouseId != null">landhouseId,</if>
- <if test="landId != null">landId,</if>
- <if test="warehouseId != null">warehouseId,</if>
- tid
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="landhouseId != null">#{landhouseId},</if>
- <if test="landId != null">#{landId},</if>
- <if test="warehouseId != null">#{warehouseId},</if>
- #{tid}
- </trim>
- </insert>
- <insert id="insertBatchFmsLandHouse" parameterType="FmsLandHouse">
- insert into FmsLandHouse (landhouseId, landId, warehouseId, tid)
- values
- <foreach collection="list" item="item" index="index" separator=",">
- (#{item.landhouseId}, #{item.landId}, #{item.warehouseId}, #{item.tid})
- </foreach>
- </insert>
- <update id="updateFmsLandHouse" parameterType="FmsLandHouse">
- update FmsLandHouse
- <trim prefix="SET" suffixOverrides=",">
- <if test="landId != null">landId = #{landId},</if>
- <if test="warehouseId != null">warehouseId = #{warehouseId},</if>
- </trim>
- where landhouseId = #{landhouseId}
- <if test="tid != null and tid !='' and tid != '-1'">
- and tid = #{tid}
- </if>
- </update>
- <delete id="deleteFmsLandHouseByLandhouseId" parameterType="String">
- delete from FmsLandHouse where landhouseId = #{landhouseId}
- <if test="tid != null and tid !='' and tid != '-1'">
- and tid = #{tid}
- </if>
- </delete>
- <delete id="deleteFmsLandHouseByLandhouseIds" parameterType="String">
- delete from FmsLandHouse where tid = #{tid} and landhouseId in
- <foreach item="landhouseId" collection="array" open="(" separator="," close=")">
- #{landhouseId}
- </foreach>
- </delete>
- <delete id="deleteFmsLandHouseByWarehouseId" parameterType="String">
- delete from FmsLandHouse where warehouseId = #{warehouseId} and tid = #{tid}
- </delete>
- <delete id="deleteBatchFmsLandHouseByWarehouseIds">
- delete from FmsLandHouse where tid = #{tid} and warehouseId in
- <foreach item="warehouseId" collection="array" open="(" separator="," close=")">
- #{warehouseId}
- </foreach>
- </delete>
- </mapper>
|