You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spms-java/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrOrderImportDetailDao.xml

94 lines
4.4 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.glxp.sale.admin.dao.thrsys.ThrOrderImportDetailDao">
<select id="filterOrderdDetailImport" parameterType="com.glxp.sale.admin.req.basic.FilterUdiIpLogRequest"
resultType="com.glxp.sale.admin.entity.thrsys.ThrOrderImportDetailEntity">
SELECT * FROM thr_order_import_detail
<where>
<if test="genKey != '' and genKey != null">
AND genKeyFk = #{genKey}
</if>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="status != '' and status != null">
AND status = #{status}
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
</where>
</select>
<insert id="insertOrderdDetailImport" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.thrsys.ThrOrderImportDetailEntity">
insert INTO thr_order_import_detail
(
billNo,billdate,corpId,corpName,billType,billFlag,productId,productName,spec,batchNo,expireDate,
productDate,count,reCount,status,updateTime,remark,genKeyFk,thirdSysFk,originType
)
values
(
#{billNo},#{billdate},#{corpId},#{corpName},#{billType},#{billFlag},#{productId},#{productName},#{spec},
#{batchNo},#{expireDate},#{productDate},#{count},#{reCount},#{status},#{updateTime},#{remark},#{genKeyFk},#{thirdSysFk}
,#{originType}
)
</insert>
<insert id="insertOrderdDetailImports" keyProperty="id" parameterType="java.util.List">
insert INTO thr_order_import_detail
(
billNo,billdate,corpId,corpName,billType,billFlag,productId,productName,spec,
batchNo,expireDate,productDate,count,reCount,status,updateTime,remark,genKeyFk,thirdSysFk,originType
)
values
<foreach collection="orders" item="item" index="index"
separator=",">
(
#{item.billNo},#{item.billdate},#{item.corpId},#{item.corpName},#{item.billType},
#{item.billFlag},#{item.productId},#{item.productName},#{item.spec},#{item.batchNo},#{item.expireDate},#{item.productDate},
#{item.count},#{item.reCount},#{item.status},#{item.updateTime},#{item.remark},#{item.genKeyFk},#{item.thirdSysFk},
#{item.originType}
)
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM thr_order_import_detail WHERE id = #{id}
</delete>
<delete id="deleteByGenkey" parameterType="Map">
DELETE FROM thr_order_import_detail WHERE genKeyFk = #{genKey}
</delete>
<update id="updateOrderdDetailImport" parameterType="com.glxp.sale.admin.entity.thrsys.ThrOrderImportDetailEntity">
UPDATE thr_order_import_detail
<trim prefix="set" suffixOverrides=",">
<if test="billNo != null">billNo=#{billNo},</if>
<if test="billdate != null">billdate=#{billdate},</if>
<if test="corpId != null">corpId=#{corpId},</if>
<if test="corpName != null">corpName=#{corpName},</if>
<if test="billType != null">billType=#{billType},</if>
<if test="billFlag != null">billFlag=#{billFlag},</if>
<if test="productId != null">productId=#{productId},</if>
<if test="productName != null">productName=#{productName},</if>
<if test="spec != null">spec=#{spec},</if>
<if test="expireDate != null">expireDate=#{expireDate},</if>
<if test="batchNo != null">batchNo=#{batchNo},</if>
<if test="productDate != null">productDate=#{productDate},</if>
<if test="count != null">count=#{count},</if>
<if test="reCount != null">reCount=#{reCount},</if>
<if test="status != null">status=#{status},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="genKeyFk != null">genKeyFk=#{genKeyFk},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
<if test="originType != null">originType=#{originType},</if>
</trim>
WHERE id = #{id}
</update>
</mapper>