121 lines
7.8 KiB
XML
121 lines
7.8 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.bonus.canteen.core.ims.mapper.InspectGoodsDetailMapper">
|
||
|
|
<resultMap type="com.bonus.canteen.core.ims.domain.InspectGoodsDetail" id="InspectGoodsDetailResult">
|
||
|
|
<result property="inspectGoodsDetailId" column="inspect_goods_detail_id" />
|
||
|
|
<result property="inspectGoodsId" column="inspect_goods_id" />
|
||
|
|
<result property="inspectGoodsCode" column="inspect_goods_code" />
|
||
|
|
<result property="deliveryGoodsDetailId" column="delivery_goods_detail_id" />
|
||
|
|
<result property="materialId" column="material_id" />
|
||
|
|
<result property="unitPrice" column="unit_price" />
|
||
|
|
<result property="orderNum" column="order_num" />
|
||
|
|
<result property="deliveryNum" column="delivery_num" />
|
||
|
|
<result property="totalQualifiedNum" column="total_qualified_num" />
|
||
|
|
<result property="qualifiedNum" column="qualified_num" />
|
||
|
|
<result property="unqualifiedReason" column="unqualified_reason" />
|
||
|
|
<result property="checkPicUrls" column="check_pic_urls" />
|
||
|
|
<result property="createBy" column="create_by" />
|
||
|
|
<result property="createTime" column="create_time" />
|
||
|
|
<result property="updateBy" column="update_by" />
|
||
|
|
<result property="updateTime" column="update_time" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectInspectGoodsDetailVo">
|
||
|
|
select inspect_goods_detail_id, inspect_goods_id, inspect_goods_code, delivery_goods_detail_id, material_id, unit_price, order_num, delivery_num, total_qualified_num, qualified_num, unqualified_reason, check_pic_urls, create_by, create_time, update_by, update_time from ims_inspect_goods_detail
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectInspectGoodsDetailList" parameterType="com.bonus.canteen.core.ims.domain.InspectGoodsDetail" resultMap="InspectGoodsDetailResult">
|
||
|
|
<include refid="selectInspectGoodsDetailVo"/>
|
||
|
|
<where>
|
||
|
|
<if test="inspectGoodsId != null "> and inspect_goods_id = #{inspectGoodsId}</if>
|
||
|
|
<if test="inspectGoodsCode != null and inspectGoodsCode != ''"> and inspect_goods_code = #{inspectGoodsCode}</if>
|
||
|
|
<if test="deliveryGoodsDetailId != null "> and delivery_goods_detail_id = #{deliveryGoodsDetailId}</if>
|
||
|
|
<if test="materialId != null "> and material_id = #{materialId}</if>
|
||
|
|
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||
|
|
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||
|
|
<if test="deliveryNum != null "> and delivery_num = #{deliveryNum}</if>
|
||
|
|
<if test="totalQualifiedNum != null "> and total_qualified_num = #{totalQualifiedNum}</if>
|
||
|
|
<if test="qualifiedNum != null "> and qualified_num = #{qualifiedNum}</if>
|
||
|
|
<if test="unqualifiedReason != null and unqualifiedReason != ''"> and unqualified_reason = #{unqualifiedReason}</if>
|
||
|
|
<if test="checkPicUrls != null and checkPicUrls != ''"> and check_pic_urls = #{checkPicUrls}</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectInspectGoodsDetailByInspectGoodsDetailId" parameterType="Long" resultMap="InspectGoodsDetailResult">
|
||
|
|
<include refid="selectInspectGoodsDetailVo"/>
|
||
|
|
where inspect_goods_detail_id = #{inspectGoodsDetailId}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertInspectGoodsDetail" parameterType="com.bonus.canteen.core.ims.domain.InspectGoodsDetail" useGeneratedKeys="true" keyProperty="inspectGoodsDetailId">
|
||
|
|
insert into ims_inspect_goods_detail
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="inspectGoodsId != null">inspect_goods_id,</if>
|
||
|
|
<if test="inspectGoodsCode != null and inspectGoodsCode != ''">inspect_goods_code,</if>
|
||
|
|
<if test="deliveryGoodsDetailId != null">delivery_goods_detail_id,</if>
|
||
|
|
<if test="materialId != null">material_id,</if>
|
||
|
|
<if test="unitPrice != null">unit_price,</if>
|
||
|
|
<if test="orderNum != null">order_num,</if>
|
||
|
|
<if test="deliveryNum != null">delivery_num,</if>
|
||
|
|
<if test="totalQualifiedNum != null">total_qualified_num,</if>
|
||
|
|
<if test="qualifiedNum != null">qualified_num,</if>
|
||
|
|
<if test="unqualifiedReason != null">unqualified_reason,</if>
|
||
|
|
<if test="checkPicUrls != null">check_pic_urls,</if>
|
||
|
|
<if test="createBy != null">create_by,</if>
|
||
|
|
<if test="createTime != null">create_time,</if>
|
||
|
|
<if test="updateBy != null">update_by,</if>
|
||
|
|
<if test="updateTime != null">update_time,</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="inspectGoodsId != null">#{inspectGoodsId},</if>
|
||
|
|
<if test="inspectGoodsCode != null and inspectGoodsCode != ''">#{inspectGoodsCode},</if>
|
||
|
|
<if test="deliveryGoodsDetailId != null">#{deliveryGoodsDetailId},</if>
|
||
|
|
<if test="materialId != null">#{materialId},</if>
|
||
|
|
<if test="unitPrice != null">#{unitPrice},</if>
|
||
|
|
<if test="orderNum != null">#{orderNum},</if>
|
||
|
|
<if test="deliveryNum != null">#{deliveryNum},</if>
|
||
|
|
<if test="totalQualifiedNum != null">#{totalQualifiedNum},</if>
|
||
|
|
<if test="qualifiedNum != null">#{qualifiedNum},</if>
|
||
|
|
<if test="unqualifiedReason != null">#{unqualifiedReason},</if>
|
||
|
|
<if test="checkPicUrls != null">#{checkPicUrls},</if>
|
||
|
|
<if test="createBy != null">#{createBy},</if>
|
||
|
|
<if test="createTime != null">#{createTime},</if>
|
||
|
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="updateInspectGoodsDetail" parameterType="com.bonus.canteen.core.ims.domain.InspectGoodsDetail">
|
||
|
|
update ims_inspect_goods_detail
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="inspectGoodsId != null">inspect_goods_id = #{inspectGoodsId},</if>
|
||
|
|
<if test="inspectGoodsCode != null and inspectGoodsCode != ''">inspect_goods_code = #{inspectGoodsCode},</if>
|
||
|
|
<if test="deliveryGoodsDetailId != null">delivery_goods_detail_id = #{deliveryGoodsDetailId},</if>
|
||
|
|
<if test="materialId != null">material_id = #{materialId},</if>
|
||
|
|
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||
|
|
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||
|
|
<if test="deliveryNum != null">delivery_num = #{deliveryNum},</if>
|
||
|
|
<if test="totalQualifiedNum != null">total_qualified_num = #{totalQualifiedNum},</if>
|
||
|
|
<if test="qualifiedNum != null">qualified_num = #{qualifiedNum},</if>
|
||
|
|
<if test="unqualifiedReason != null">unqualified_reason = #{unqualifiedReason},</if>
|
||
|
|
<if test="checkPicUrls != null">check_pic_urls = #{checkPicUrls},</if>
|
||
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
</trim>
|
||
|
|
where inspect_goods_detail_id = #{inspectGoodsDetailId}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteInspectGoodsDetailByInspectGoodsDetailId" parameterType="Long">
|
||
|
|
delete from ims_inspect_goods_detail where inspect_goods_detail_id = #{inspectGoodsDetailId}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteInspectGoodsDetailByInspectGoodsDetailIds" parameterType="String">
|
||
|
|
delete from ims_inspect_goods_detail where inspect_goods_detail_id in
|
||
|
|
<foreach item="inspectGoodsDetailId" collection="array" open="(" separator="," close=")">
|
||
|
|
#{inspectGoodsDetailId}
|
||
|
|
</foreach>
|
||
|
|
</delete>
|
||
|
|
</mapper>
|