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.
udiwms-java/api-admin/src/main/resources/mybatis/mapper/thrsys/ThrOrderDao.xml

117 lines
5.0 KiB
XML

4 years ago
<?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.api.admin.dao.thrsys.ThrOrderDao">
<select id="filterThrOrder" parameterType="com.glxp.api.admin.req.thrsys.FilterThrOrderRequest"
resultType="com.glxp.api.admin.entity.thrsys.ThrOrderEntity">
SELECT * FROM thr_order
<where>
<if test="billNo != '' and billNo != null">
AND billNo = #{billNo}
4 years ago
</if>
<if test="id != '' and id !=null">
AND id = #{id}
</if>
<if test="billAction != '' and billAction !=null">
AND billType = #{billAction}
</if>
<if test="billFlag != '' and billFlag !=null">
AND billFlag = #{billFlag}
4 years ago
</if>
<if test="thirdSysFk != '' and thirdSysFk != null">
AND thirdSysFk = #{thirdSysFk}
</if>
4 years ago
<if test="corpName != '' and corpName != null">
AND corpName like concat('%',#{corpName},'%')
</if>
<if test="startDate!=null and startDate!=''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d')>= DATE_FORMAT(#{startDate}, '%Y-%m-%d') ]]>
</if>
<if test="endDate!=null and endDate!=''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d') ]]>
</if>
4 years ago
</where>
4 years ago
ORDER BY updateTime DESC
4 years ago
</select>
<insert id="insertThrOrder" keyProperty="id" parameterType="com.glxp.api.admin.entity.thrsys.ThrOrderEntity">
replace INTO thr_order
(billNo, billdate, corpId, corpName, billType, billFlag, thirdSysFk, updateTime, originType,
startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2,
remark3)
values (#{billNo},
#{billdate},
#{corpId},
#{corpName},
#{billType},
#{billFlag},
#{thirdSysFk}, #{updateTime}, #{originType},
#{startDate}, #{endDate}, #{createUser}, #{reviewUser},
#{address}, #{linkMan}, #{linkTel}, #{remark}, #{remark1},
#{remark2}, #{remark3})
4 years ago
</insert>
<insert id="insertThrOrders" keyProperty="id" parameterType="java.util.List">
replace INTO thr_order
(
billNo,billdate,corpId,corpName,billType,billFlag,thirdSysFk,updateTime,originType,
startDate, endDate, createUser, reviewUser, address, linkMan, linkTel, remark, remark1, remark2,
remark3
4 years ago
)
values
<foreach collection="thrOrderEntities" item="item" index="index"
separator=",">
(
#{item.billNo},
#{item.billdate},
#{item.corpId},
#{item.corpName},
#{item.billType},
#{item.billFlag},
4 years ago
#{item.thirdSysFk},#{item.updateTime},#{item.originType}
#{item.startDate}, #{item.endDate}, #{item.createUser}, #{item.reviewUser},
#{item.address}, #{item.linkMan}, #{item.linkTel}, #{item.remark}, #{item.remark1},
#{item.remark2}, #{item.remark3})
4 years ago
</foreach>
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM thr_order WHERE id = #{id}
</delete>
<delete id="deleteAll">
DELETE FROM thr_order
</delete>
4 years ago
<update id="updateThrOrder" parameterType="com.glxp.api.admin.entity.thrsys.ThrOrderEntity">
UPDATE thr_order
<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="thirdSysFk != null">thirdSysFk=#{thirdSysFk},</if>
4 years ago
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="originType != null">originType=#{originType},</if>
<if test="startDate != null">startDate=#{startDate},</if>
<if test="endDate != null">endDate=#{endDate},</if>
<if test="createUser != null">createUser=#{createUser},</if>
<if test="reviewUser != null">reviewUser=#{reviewUser},</if>
<if test="address != null">address=#{address},</if>
<if test="linkMan != null">linkMan=#{linkMan},</if>
<if test="linkTel != null">linkTel=#{linkTel},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="remark1 != null">remark1=#{remark1},</if>
<if test="remark2 != null">remark2=#{remark2},</if>
<if test="remark3 != null">remark3=#{remark3},</if>
4 years ago
</trim>
WHERE id = #{id}
</update>
</mapper>