|
@@ -0,0 +1,97 @@
|
|
|
|
+<?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.iamberry.rst.service.approval.mapper.ApplyPickItemMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="ApplyPickItem" >
|
|
|
|
+ <result column="apply_item_id" property="applyItemId" />
|
|
|
|
+ <result column="apply_pick_id" property="applyPickId" />
|
|
|
|
+ <result column="apply_item_product_id" property="applyItemProductId" />
|
|
|
|
+ <result column="apply_item_color_id" property="applyItemColorId" />
|
|
|
|
+ <result column="apply_item_product_name" property="applyItemProductName" />
|
|
|
|
+ <result column="apply_item_color_name" property="applyItemColorName" />
|
|
|
|
+ <result column="apply_item_product_num" property="applyItemProductNum" />
|
|
|
|
+ <result column="apply_item_create_time" property="applyItemCreateTime" />
|
|
|
|
+ <result column="apply_item_update_time" property="applyItemUpdateTime" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="Base_List" >
|
|
|
|
+ t.apply_item_id,
|
|
|
|
+ t.apply_pick_id,
|
|
|
|
+ t.apply_item_product_id,
|
|
|
|
+ t.apply_item_color_id,
|
|
|
|
+ t.apply_item_product_name,
|
|
|
|
+ t.apply_item_color_name,
|
|
|
|
+ t.apply_item_product_num,
|
|
|
|
+ t.apply_item_create_time,
|
|
|
|
+ t.apply_item_update_time
|
|
|
|
+ </sql>
|
|
|
|
+ <select id="getApplyPickItemList" resultMap="BaseResultMap" parameterType="ApplyPickItem" >
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_List" />
|
|
|
|
+ from tb_rst_approval_apply_pick_item t
|
|
|
|
+ <where>
|
|
|
|
+ <if test="applyItemId != null ">
|
|
|
|
+ AND t.apply_item_id = #{applyItemId}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyPickId != null ">
|
|
|
|
+ AND t.apply_pick_id = #{applyPickId}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyItemProductId != null ">
|
|
|
|
+ AND t.apply_item_product_id = #{applyItemProductId}
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyItemColorId != null ">
|
|
|
|
+ AND t.apply_item_color_id = #{applyItemColorId}
|
|
|
|
+ </if >
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+ <select id="getApplyPickItemById" resultMap="BaseResultMap" parameterType="Integer" >
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_List" />
|
|
|
|
+ from tb_rst_approval_apply_pick_item t
|
|
|
|
+ where t.apply_item_id= #{applyItemId}
|
|
|
|
+ </select>
|
|
|
|
+ <insert id="save" parameterType="ApplyPickItem" >
|
|
|
|
+ insert into
|
|
|
|
+ tb_rst_approval_apply_pick_item
|
|
|
|
+ (
|
|
|
|
+ apply_pick_id,
|
|
|
|
+ apply_item_product_id,
|
|
|
|
+ apply_item_color_id,
|
|
|
|
+ apply_item_product_name,
|
|
|
|
+ apply_item_color_name,
|
|
|
|
+ apply_item_product_num
|
|
|
|
+ )
|
|
|
|
+ values
|
|
|
|
+ (
|
|
|
|
+ #{applyPickId},
|
|
|
|
+ #{applyItemProductId},
|
|
|
|
+ #{applyItemColorId},
|
|
|
|
+ #{applyItemProductName},
|
|
|
|
+ #{applyItemColorName},
|
|
|
|
+ #{applyItemProductNum}
|
|
|
|
+ )
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="update" parameterType="ApplyPickItem" >
|
|
|
|
+ update
|
|
|
|
+ tb_rst_approval_apply_pick_item
|
|
|
|
+ <set >
|
|
|
|
+ <if test="applyPickId != null ">
|
|
|
|
+ apply_pick_id = #{applyPickId},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyItemProductId != null ">
|
|
|
|
+ apply_item_product_id = #{applyItemProductId},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyItemColorId != null ">
|
|
|
|
+ apply_item_color_id = #{applyItemColorId},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyItemProductName != null and applyItemProductName != ''">
|
|
|
|
+ apply_item_product_name = #{applyItemProductName},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyItemColorName != null and applyItemColorName != ''">
|
|
|
|
+ apply_item_color_name = #{applyItemColorName},
|
|
|
|
+ </if >
|
|
|
|
+ <if test="applyItemProductNum != null ">
|
|
|
|
+ apply_item_product_num = #{applyItemProductNum},
|
|
|
|
+ </if >
|
|
|
|
+ </set >
|
|
|
|
+ where apply_item_id= #{applyItemId}
|
|
|
|
+ </update>
|
|
|
|
+</mapper>
|