上传文件至 'op-modules/op-sap/src/main/resources/mapper'
parent
e2b549ac5a
commit
45f0745fae
@ -0,0 +1,132 @@
|
||||
<?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.op.sap.mapper.SapBaseFileMapper">
|
||||
|
||||
<resultMap type="SapBaseFile" id="BaseFileResult">
|
||||
<result property="fileId" column="file_id" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="fileAddress" column="file_address" />
|
||||
<result property="sourceId" column="source_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectBaseFileVo">
|
||||
select file_id, file_name, file_address, source_id, remark, attr1,
|
||||
attr2, attr3, attr4, create_by, create_time, update_by,
|
||||
update_time from base_file
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseFileList" parameterType="SapBaseFile" resultMap="BaseFileResult">
|
||||
<include refid="selectBaseFileVo"/>
|
||||
<where>
|
||||
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="fileAddress != null and fileAddress != ''"> and file_address = #{fileAddress}</if>
|
||||
<if test="sourceId != null and sourceId != ''"> and source_id = #{sourceId}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null "> and attr3 = #{attr3}</if>
|
||||
<if test="attr4 != null "> and attr4 = #{attr4}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseFileByFileId" parameterType="String" resultMap="BaseFileResult">
|
||||
<include refid="selectBaseFileVo"/>
|
||||
where file_id = #{fileId}
|
||||
</select>
|
||||
<select id="getBaseFileBatch" resultMap="BaseFileResult">
|
||||
<include refid="selectBaseFileVo"/>
|
||||
where source_id = #{sourceId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseFile" parameterType="SapBaseFile">
|
||||
insert into base_file
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="fileId != null">file_id,</if>
|
||||
<if test="fileName != null">file_name,</if>
|
||||
<if test="fileAddress != null">file_address,</if>
|
||||
<if test="sourceId != null">source_id,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</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="fileId != null">#{fileId},</if>
|
||||
<if test="fileName != null">#{fileName},</if>
|
||||
<if test="fileAddress != null">#{fileAddress},</if>
|
||||
<if test="sourceId != null">#{sourceId},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</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>
|
||||
<insert id="insertBaseFileBatch">
|
||||
INSERT INTO base_file(file_id, file_name, file_address, source_id, remark, create_by, create_time)
|
||||
VALUES
|
||||
<foreach collection="baseFiles" index="" item="baseFile" separator=",">
|
||||
(
|
||||
#{baseFile.fileId},
|
||||
#{baseFile.fileName},
|
||||
#{baseFile.fileAddress},
|
||||
#{baseFile.sourceId},
|
||||
#{baseFile.remark},
|
||||
#{baseFile.createBy},
|
||||
#{baseFile.createTime}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseFile" parameterType="SapBaseFile">
|
||||
update base_file
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="fileName != null">file_name = #{fileName},</if>
|
||||
<if test="fileAddress != null">file_address = #{fileAddress},</if>
|
||||
<if test="sourceId != null">source_id = #{sourceId},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</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 file_id = #{fileId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseFileByFileId" parameterType="String">
|
||||
delete from base_file where file_id = #{fileId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseFileByFileIds" parameterType="String">
|
||||
delete from base_file where file_id in
|
||||
<foreach item="fileId" collection="array" open="(" separator="," close=")">
|
||||
#{fileId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deleteBaseFileBySourceId">
|
||||
delete from base_file where source_id = #{sourceId}
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,260 @@
|
||||
<?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.op.sap.mapper.SapBaseProductMapper">
|
||||
|
||||
<resultMap type="SapBaseProduct" id="BaseProductResult">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productCode" column="product_code" />
|
||||
<result property="productDescZh" column="product_desc_zh" />
|
||||
<result property="productModel" column="product_model" />
|
||||
<result property="productDescEn" column="product_desc_en" />
|
||||
<result property="ruleCode" column="rule_code" />
|
||||
<result property="oldProductCode" column="old_product_code" />
|
||||
<result property="partsProductCode" column="parts_product_code" />
|
||||
<result property="skuBarcode" column="sku_barcode" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="grossWeight" column="gross_weight" />
|
||||
<result property="netWeight" column="net_weight" />
|
||||
<result property="tareWeight" column="tare_weight" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="unitPrice" column="unit_price" />
|
||||
<result property="productGroup" column="product_group" />
|
||||
<result property="productGroupName" column="product_group_name" />
|
||||
<result property="userDefined1" column="user_defined1" />
|
||||
<result property="userDefined2" column="user_defined2" />
|
||||
<result property="userDefined3" column="user_defined3" />
|
||||
<result property="userDefined4" column="user_defined4" />
|
||||
<result property="userDefined5" column="user_defined5" />
|
||||
<result property="userDefined6" column="user_defined6" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
<result property="activeFlag" column="active_flag" />
|
||||
<result property="syncFlag" column="sync_flag" />
|
||||
<result property="primaryUom" column="primary_uom" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="bstme" column="bstme" />
|
||||
<result property="basicOrder" column="basic_order" />
|
||||
<result property="convOrder" column="conv_order" />
|
||||
<result property="ausme" column="ausme" />
|
||||
<result property="basicIssue" column="basic_issue" />
|
||||
<result property="convIssue" column="conv_issue" />
|
||||
<result property="appendFlag" column="append_flag" />
|
||||
<result property="appendPercent" column="append_percent" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseProductVo">
|
||||
select product_id, product_code, product_desc_zh, product_model,product_desc_en, rule_code, old_product_code, parts_product_code, sku_barcode, length, width, height, gross_weight, net_weight, tare_weight, volume, unit_price, product_group, product_group_name, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, create_by, create_time, update_by, update_time, factory_code, active_flag, sync_flag, primary_uom, del_flag, bstme, basic_order, conv_order, ausme, basic_issue, conv_issue, append_flag, append_percent from base_product
|
||||
</sql>
|
||||
|
||||
<select id="selectSBaseProductList" parameterType="SapBaseProduct" resultMap="BaseProductResult">
|
||||
<include refid="selectBaseProductVo"/>
|
||||
<where>
|
||||
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if>
|
||||
<if test="productDescZh != null and productDescZh != ''"> and product_desc_zh = #{productDescZh}</if>
|
||||
<if test="productModel != null and productModel != ''"> and product_model = #{productModel}</if>
|
||||
<if test="productDescEn != null and productDescEn != ''"> and product_desc_en = #{productDescEn}</if>
|
||||
<if test="ruleCode != null and ruleCode != ''"> and rule_code = #{ruleCode}</if>
|
||||
<if test="oldProductCode != null and oldProductCode != ''"> and old_product_code = #{oldProductCode}</if>
|
||||
<if test="partsProductCode != null and partsProductCode != ''"> and parts_product_code = #{partsProductCode}</if>
|
||||
<if test="skuBarcode != null and skuBarcode != ''"> and sku_barcode = #{skuBarcode}</if>
|
||||
<if test="length != null "> and length = #{length}</if>
|
||||
<if test="width != null "> and width = #{width}</if>
|
||||
<if test="height != null "> and height = #{height}</if>
|
||||
<if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
|
||||
<if test="netWeight != null "> and net_weight = #{netWeight}</if>
|
||||
<if test="tareWeight != null "> and tare_weight = #{tareWeight}</if>
|
||||
<if test="volume != null "> and volume = #{volume}</if>
|
||||
<if test="unitPrice != null "> and unit_price = #{unitPrice}</if>
|
||||
<if test="productGroup != null and productGroup != ''"> and product_group = #{productGroup}</if>
|
||||
<if test="productGroupName != null and productGroupName != ''"> and product_group_name like concat('%', #{productGroupName}, '%')</if>
|
||||
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
|
||||
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
|
||||
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
|
||||
<if test="userDefined4 != null and userDefined4 != ''"> and user_defined4 = #{userDefined4}</if>
|
||||
<if test="userDefined5 != null and userDefined5 != ''"> and user_defined5 = #{userDefined5}</if>
|
||||
<if test="userDefined6 != null and userDefined6 != ''"> and user_defined6 = #{userDefined6}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
||||
<if test="syncFlag != null and syncFlag != ''"> and sync_flag = #{syncFlag}</if>
|
||||
<if test="primaryUom != null and primaryUom != ''"> and primary_uom = #{primaryUom}</if>
|
||||
<if test="bstme != null and bstme != ''"> and bstme = #{bstme}</if>
|
||||
<if test="basicOrder != null "> and basic_order = #{basicOrder}</if>
|
||||
<if test="convOrder != null "> and conv_order = #{convOrder}</if>
|
||||
<if test="ausme != null and ausme != ''"> and ausme = #{ausme}</if>
|
||||
<if test="basicIssue != null "> and basic_issue = #{basicIssue}</if>
|
||||
<if test="convIssue != null "> and conv_issue = #{convIssue}</if>
|
||||
<if test="appendFlag != null and appendFlag != ''"> and append_flag = #{appendFlag}</if>
|
||||
<if test="appendPercent != null and appendPercent != ''"> and append_percent = #{appendPercent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseProductByProductId" parameterType="String" resultMap="BaseProductResult">
|
||||
<include refid="selectBaseProductVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
<select id="selectBaseProductIDByProductCode" parameterType="String" resultType="String">
|
||||
select product_id
|
||||
from base_product where product_code = #{productCode}
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseProduct" parameterType="SapBaseProduct">
|
||||
insert into base_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productCode != null and productCode != ''">product_code,</if>
|
||||
<if test="productDescZh != null">product_desc_zh,</if>
|
||||
<if test="productModel != null">product_model,</if>
|
||||
<if test="productDescEn != null">product_desc_en,</if>
|
||||
<if test="ruleCode != null">rule_code,</if>
|
||||
<if test="oldProductCode != null">old_product_code,</if>
|
||||
<if test="partsProductCode != null">parts_product_code,</if>
|
||||
<if test="skuBarcode != null">sku_barcode,</if>
|
||||
<if test="length != null">length,</if>
|
||||
<if test="width != null">width,</if>
|
||||
<if test="height != null">height,</if>
|
||||
<if test="grossWeight != null">gross_weight,</if>
|
||||
<if test="netWeight != null">net_weight,</if>
|
||||
<if test="tareWeight != null">tare_weight,</if>
|
||||
<if test="volume != null">volume,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="productGroup != null">product_group,</if>
|
||||
<if test="productGroupName != null">product_group_name,</if>
|
||||
<if test="userDefined1 != null">user_defined1,</if>
|
||||
<if test="userDefined2 != null">user_defined2,</if>
|
||||
<if test="userDefined3 != null">user_defined3,</if>
|
||||
<if test="userDefined4 != null">user_defined4,</if>
|
||||
<if test="userDefined5 != null">user_defined5,</if>
|
||||
<if test="userDefined6 != null">user_defined6,</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>
|
||||
<if test="factoryCode != null">factory_code,</if>
|
||||
<if test="activeFlag != null">active_flag,</if>
|
||||
<if test="syncFlag != null">sync_flag,</if>
|
||||
<if test="primaryUom != null">primary_uom,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="bstme != null">bstme,</if>
|
||||
<if test="basicOrder != null">basic_order,</if>
|
||||
<if test="convOrder != null">conv_order,</if>
|
||||
<if test="ausme != null">ausme,</if>
|
||||
<if test="basicIssue != null">basic_issue,</if>
|
||||
<if test="convIssue != null">conv_issue,</if>
|
||||
<if test="appendFlag != null">append_flag,</if>
|
||||
<if test="appendPercent != null">append_percent,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productCode != null and productCode != ''">#{productCode},</if>
|
||||
<if test="productDescZh != null">#{productDescZh},</if>
|
||||
<if test="productModel != null">#{productModel},</if>
|
||||
<if test="productDescEn != null">#{productDescEn},</if>
|
||||
<if test="ruleCode != null">#{ruleCode},</if>
|
||||
<if test="oldProductCode != null">#{oldProductCode},</if>
|
||||
<if test="partsProductCode != null">#{partsProductCode},</if>
|
||||
<if test="skuBarcode != null">#{skuBarcode},</if>
|
||||
<if test="length != null">#{length},</if>
|
||||
<if test="width != null">#{width},</if>
|
||||
<if test="height != null">#{height},</if>
|
||||
<if test="grossWeight != null">#{grossWeight},</if>
|
||||
<if test="netWeight != null">#{netWeight},</if>
|
||||
<if test="tareWeight != null">#{tareWeight},</if>
|
||||
<if test="volume != null">#{volume},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="productGroup != null">#{productGroup},</if>
|
||||
<if test="productGroupName != null">#{productGroupName},</if>
|
||||
<if test="userDefined1 != null">#{userDefined1},</if>
|
||||
<if test="userDefined2 != null">#{userDefined2},</if>
|
||||
<if test="userDefined3 != null">#{userDefined3},</if>
|
||||
<if test="userDefined4 != null">#{userDefined4},</if>
|
||||
<if test="userDefined5 != null">#{userDefined5},</if>
|
||||
<if test="userDefined6 != null">#{userDefined6},</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>
|
||||
<if test="factoryCode != null">#{factoryCode},</if>
|
||||
<if test="activeFlag != null">#{activeFlag},</if>
|
||||
<if test="syncFlag != null">#{syncFlag},</if>
|
||||
<if test="primaryUom != null">#{primaryUom},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="bstme != null">#{bstme},</if>
|
||||
<if test="basicOrder != null">#{basicOrder},</if>
|
||||
<if test="convOrder != null">#{convOrder},</if>
|
||||
<if test="ausme != null">#{ausme},</if>
|
||||
<if test="basicIssue != null">#{basicIssue},</if>
|
||||
<if test="convIssue != null">#{convIssue},</if>
|
||||
<if test="appendFlag != null">#{appendFlag},</if>
|
||||
<if test="appendPercent != null">#{appendPercent},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseProduct" parameterType="SapBaseProduct">
|
||||
update base_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if>
|
||||
<if test="productDescZh != null">product_desc_zh = #{productDescZh},</if>
|
||||
<if test="productModel != null">product_model = #{productModel},</if>
|
||||
<if test="productDescEn != null">product_desc_en = #{productDescEn},</if>
|
||||
<if test="ruleCode != null">rule_code = #{ruleCode},</if>
|
||||
<if test="oldProductCode != null">old_product_code = #{oldProductCode},</if>
|
||||
<if test="partsProductCode != null">parts_product_code = #{partsProductCode},</if>
|
||||
<if test="skuBarcode != null">sku_barcode = #{skuBarcode},</if>
|
||||
<if test="length != null">length = #{length},</if>
|
||||
<if test="width != null">width = #{width},</if>
|
||||
<if test="height != null">height = #{height},</if>
|
||||
<if test="grossWeight != null">gross_weight = #{grossWeight},</if>
|
||||
<if test="netWeight != null">net_weight = #{netWeight},</if>
|
||||
<if test="tareWeight != null">tare_weight = #{tareWeight},</if>
|
||||
<if test="volume != null">volume = #{volume},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="productGroup != null">product_group = #{productGroup},</if>
|
||||
<if test="productGroupName != null">product_group_name = #{productGroupName},</if>
|
||||
<if test="userDefined1 != null">user_defined1 = #{userDefined1},</if>
|
||||
<if test="userDefined2 != null">user_defined2 = #{userDefined2},</if>
|
||||
<if test="userDefined3 != null">user_defined3 = #{userDefined3},</if>
|
||||
<if test="userDefined4 != null">user_defined4 = #{userDefined4},</if>
|
||||
<if test="userDefined5 != null">user_defined5 = #{userDefined5},</if>
|
||||
<if test="userDefined6 != null">user_defined6 = #{userDefined6},</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>
|
||||
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||
<if test="activeFlag != null">active_flag = #{activeFlag},</if>
|
||||
<if test="syncFlag != null">sync_flag = #{syncFlag},</if>
|
||||
<if test="primaryUom != null">primary_uom = #{primaryUom},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="bstme != null">bstme = #{bstme},</if>
|
||||
<if test="basicOrder != null">basic_order = #{basicOrder},</if>
|
||||
<if test="convOrder != null">conv_order = #{convOrder},</if>
|
||||
<if test="ausme != null">ausme = #{ausme},</if>
|
||||
<if test="basicIssue != null">basic_issue = #{basicIssue},</if>
|
||||
<if test="convIssue != null">conv_issue = #{convIssue},</if>
|
||||
<if test="appendFlag != null">append_flag = #{appendFlag},</if>
|
||||
<if test="appendPercent != null">append_percent = #{appendPercent},</if>
|
||||
</trim>
|
||||
where product_id = #{productId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseProductByProductId" parameterType="String">
|
||||
delete from base_product where product_id = #{productId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseProductByProductIds" parameterType="String">
|
||||
delete from base_product where product_id in
|
||||
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,120 @@
|
||||
<?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.op.sap.mapper.SapProProcessContentMapper">
|
||||
|
||||
<resultMap type="SapProProcessContent" id="ProProcessContentResult">
|
||||
<result property="contentId" column="content_id" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="contentText" column="content_text" />
|
||||
<result property="device" column="device" />
|
||||
<result property="material" column="material" />
|
||||
<result property="docUrl" column="doc_url" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectProProcessContentVo">
|
||||
select content_id, process_id, order_num, content_text, device, material, doc_url, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_process_content
|
||||
</sql>
|
||||
|
||||
<select id="selectProProcessContentList" parameterType="SapProProcessContent" resultMap="ProProcessContentResult">
|
||||
<include refid="selectProProcessContentVo"/>
|
||||
<where>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="contentText != null and contentText != ''"> and content_text = #{contentText}</if>
|
||||
<if test="device != null and device != ''"> and device = #{device}</if>
|
||||
<if test="material != null and material != ''"> and material = #{material}</if>
|
||||
<if test="docUrl != null and docUrl != ''"> and doc_url = #{docUrl}</if>
|
||||
</where>
|
||||
order by order_num asc
|
||||
</select>
|
||||
|
||||
<select id="selectProProcessContentByContentId" parameterType="String" resultMap="ProProcessContentResult">
|
||||
<include refid="selectProProcessContentVo"/>
|
||||
where content_id = #{contentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertProProcessContent" parameterType="SapProProcessContent" useGeneratedKeys="true" keyProperty="contentId">
|
||||
insert into pro_process_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
content_id,
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="contentText != null">content_text,</if>
|
||||
<if test="device != null">device,</if>
|
||||
<if test="material != null">material,</if>
|
||||
<if test="docUrl != null">doc_url,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</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=",">
|
||||
#{contentId},
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="contentText != null">#{contentText},</if>
|
||||
<if test="device != null">#{device},</if>
|
||||
<if test="material != null">#{material},</if>
|
||||
<if test="docUrl != null">#{docUrl},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</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="updateProProcessContent" parameterType="SapProProcessContent">
|
||||
update pro_process_content
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="contentText != null">content_text = #{contentText},</if>
|
||||
<if test="device != null">device = #{device},</if>
|
||||
<if test="material != null">material = #{material},</if>
|
||||
<if test="docUrl != null">doc_url = #{docUrl},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</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 content_id = #{contentId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProcessContentByContentId" parameterType="String">
|
||||
delete from pro_process_content where content_id = #{contentId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProcessContentByContentIds" parameterType="String">
|
||||
delete from pro_process_content where content_id in
|
||||
<foreach item="contentId" collection="array" open="(" separator="," close=")">
|
||||
#{contentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue