SOP
This commit is contained in:
@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ktg.mes.md.mapper.MdProductSopMapper">
|
||||
|
||||
<resultMap type="MdProdutSop" id="MdProdutSopResult">
|
||||
<resultMap type="MdProductSop" id="MdProductSopResult">
|
||||
<result property="sopId" column="sop_id" />
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
@@ -25,12 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMdProdutSopVo">
|
||||
select sop_id, item_id, order_num, process_id, process_code, process_name, sop_title, sop_description, sop_url, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from md_produt_sop
|
||||
<sql id="selectMdProductSopVo">
|
||||
select sop_id, item_id, order_num, process_id, process_code, process_name, sop_title, sop_description, sop_url, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from md_product_sop
|
||||
</sql>
|
||||
|
||||
<select id="selectMdProdutSopList" parameterType="MdProdutSop" resultMap="MdProdutSopResult">
|
||||
<include refid="selectMdProdutSopVo"/>
|
||||
<select id="selectMdProductSopList" parameterType="MdProductSop" resultMap="MdProductSopResult">
|
||||
<include refid="selectMdProductSopVo"/>
|
||||
<where>
|
||||
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
@@ -43,13 +43,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMdProdutSopBySopId" parameterType="Long" resultMap="MdProdutSopResult">
|
||||
<include refid="selectMdProdutSopVo"/>
|
||||
<select id="selectMdProductSopBySopId" parameterType="Long" resultMap="MdProductSopResult">
|
||||
<include refid="selectMdProductSopVo"/>
|
||||
where sop_id = #{sopId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMdProdutSop" parameterType="MdProdutSop" useGeneratedKeys="true" keyProperty="sopId">
|
||||
insert into md_produt_sop
|
||||
<insert id="insertMdProductSop" parameterType="MdProductSop" useGeneratedKeys="true" keyProperty="sopId">
|
||||
insert into md_product_sop
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
@@ -90,8 +90,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMdProdutSop" parameterType="MdProdutSop">
|
||||
update md_produt_sop
|
||||
<update id="updateMdProductSop" parameterType="MdProductSop">
|
||||
update md_product_sop
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="itemId != null">item_id = #{itemId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
@@ -114,12 +114,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where sop_id = #{sopId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMdProdutSopBySopId" parameterType="Long">
|
||||
delete from md_produt_sop where sop_id = #{sopId}
|
||||
<delete id="deleteMdProductSopBySopId" parameterType="Long">
|
||||
delete from md_product_sop where sop_id = #{sopId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMdProdutSopBySopIds" parameterType="String">
|
||||
delete from md_produt_sop where sop_id in
|
||||
<delete id="deleteMdProductSopBySopIds" parameterType="String">
|
||||
delete from md_product_sop where sop_id in
|
||||
<foreach item="sopId" collection="array" open="(" separator="," close=")">
|
||||
#{sopId}
|
||||
</foreach>
|
||||
|
||||
Reference in New Issue
Block a user