|
|
@@ -5,7 +5,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="tid" jdbcType="INTEGER" property="tid" />
|
|
|
@@ -18,12 +18,13 @@
|
|
|
<result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
|
|
|
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="tpc_id" jdbcType="INTEGER" property="tpcId" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
@@ -57,7 +58,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
@@ -91,16 +92,16 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
id, tid, node_id, payment_type, company_name, quantity, payment_status, status, payment_amount,
|
|
|
- remarks, create_time
|
|
|
+ remarks, create_time, tpc_id
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample" resultMap="BaseResultMap">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<if test="distinct">
|
|
|
@@ -119,7 +120,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -130,7 +131,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
delete from t_order_payment
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -139,7 +140,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
delete from t_order_payment
|
|
|
<if test="_parameter != null">
|
|
|
@@ -150,22 +151,24 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
insert into t_order_payment (id, tid, node_id,
|
|
|
payment_type, company_name, quantity,
|
|
|
payment_status, status, payment_amount,
|
|
|
- remarks, create_time)
|
|
|
+ remarks, create_time, tpc_id
|
|
|
+ )
|
|
|
values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{nodeId,jdbcType=INTEGER},
|
|
|
#{paymentType,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{quantity,jdbcType=INTEGER},
|
|
|
#{paymentStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{paymentAmount,jdbcType=DECIMAL},
|
|
|
- #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ #{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{tpcId,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderPayment">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
insert into t_order_payment
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -202,80 +205,8 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="tid != null">
|
|
|
- #{tid,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="nodeId != null">
|
|
|
- #{nodeId,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="paymentType != null">
|
|
|
- #{paymentType,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="companyName != null">
|
|
|
- #{companyName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="quantity != null">
|
|
|
- #{quantity,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="paymentStatus != null">
|
|
|
- #{paymentStatus,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- #{status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="paymentAmount != null">
|
|
|
- #{paymentAmount,jdbcType=DECIMAL},
|
|
|
- </if>
|
|
|
- <if test="remarks != null">
|
|
|
- #{remarks,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
-
|
|
|
- <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderPayment" useGeneratedKeys="true">
|
|
|
- insert into t_order_payment
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
- <if test="tid != null">
|
|
|
- tid,
|
|
|
- </if>
|
|
|
- <if test="nodeId != null">
|
|
|
- node_id,
|
|
|
- </if>
|
|
|
- <if test="paymentType != null">
|
|
|
- payment_type,
|
|
|
- </if>
|
|
|
- <if test="companyName != null">
|
|
|
- company_name,
|
|
|
- </if>
|
|
|
- <if test="quantity != null">
|
|
|
- quantity,
|
|
|
- </if>
|
|
|
- <if test="paymentStatus != null">
|
|
|
- payment_status,
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- status,
|
|
|
- </if>
|
|
|
- <if test="paymentAmount != null">
|
|
|
- payment_amount,
|
|
|
- </if>
|
|
|
- <if test="remarks != null">
|
|
|
- remarks,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
+ <if test="tpcId != null">
|
|
|
+ tpc_id,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
@@ -312,17 +243,16 @@
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="tpcId != null">
|
|
|
+ #{tpcId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
- <selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
- SELECT LAST_INSERT_ID()
|
|
|
- </selectKey>
|
|
|
</insert>
|
|
|
-
|
|
|
<select id="countByExample" parameterType="com.goafanti.common.model.TOrderPaymentExample" resultType="java.lang.Long">
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
select count(*) from t_order_payment
|
|
|
<if test="_parameter != null">
|
|
|
@@ -333,7 +263,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
update t_order_payment
|
|
|
<set>
|
|
|
@@ -370,6 +300,9 @@
|
|
|
<if test="record.createTime != null">
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="record.tpcId != null">
|
|
|
+ tpc_id = #{record.tpcId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
@@ -379,7 +312,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
update t_order_payment
|
|
|
set id = #{record.id,jdbcType=INTEGER},
|
|
|
@@ -392,7 +325,8 @@
|
|
|
status = #{record.status,jdbcType=INTEGER},
|
|
|
payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
|
|
|
remarks = #{record.remarks,jdbcType=VARCHAR},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ tpc_id = #{record.tpcId,jdbcType=INTEGER}
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
</if>
|
|
|
@@ -401,7 +335,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
update t_order_payment
|
|
|
<set>
|
|
|
@@ -435,6 +369,9 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="tpcId != null">
|
|
|
+ tpc_id = #{tpcId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -442,7 +379,7 @@
|
|
|
<!--
|
|
|
WARNING - @mbg.generated
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Tue Jun 16 10:29:03 CST 2020.
|
|
|
+ This element was generated on Fri Jun 19 15:35:38 CST 2020.
|
|
|
-->
|
|
|
update t_order_payment
|
|
|
set tid = #{tid,jdbcType=INTEGER},
|
|
|
@@ -454,9 +391,94 @@
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
payment_amount = #{paymentAmount,jdbcType=DECIMAL},
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ tpc_id = #{tpcId,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+
|
|
|
+
|
|
|
+ <insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderPayment" useGeneratedKeys="true">
|
|
|
+ insert into t_order_payment
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="tid != null">
|
|
|
+ tid,
|
|
|
+ </if>
|
|
|
+ <if test="nodeId != null">
|
|
|
+ node_id,
|
|
|
+ </if>
|
|
|
+ <if test="paymentType != null">
|
|
|
+ payment_type,
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ company_name,
|
|
|
+ </if>
|
|
|
+ <if test="quantity != null">
|
|
|
+ quantity,
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus != null">
|
|
|
+ payment_status,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
+ <if test="paymentAmount != null">
|
|
|
+ payment_amount,
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ remarks,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="tpcId != null">
|
|
|
+ tpc_id,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="tid != null">
|
|
|
+ #{tid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="nodeId != null">
|
|
|
+ #{nodeId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentType != null">
|
|
|
+ #{paymentType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ #{companyName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="quantity != null">
|
|
|
+ #{quantity,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus != null">
|
|
|
+ #{paymentStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paymentAmount != null">
|
|
|
+ #{paymentAmount,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="tpcId != null">
|
|
|
+ #{tpcId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
+ </insert>
|
|
|
<select id="selectByidGetDetails" resultType="com.goafanti.organization.bo.outOrderPayment">
|
|
|
select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
|
|
|
a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks , b.quantity NodeQuantity,
|
|
|
@@ -472,4 +494,18 @@
|
|
|
from t_order_payment a left join payment_node b on a.node_id=b.id
|
|
|
left join t_order_task c on b.tid=c.id left join t_order_mid d on c.order_no=d.order_no where a.tid= #{id}
|
|
|
</select>
|
|
|
+ <select id="selectList" resultType="com.goafanti.organization.bo.outOrderPayment">
|
|
|
+ select a.id,a.tid,a.node_id nodeId,a.payment_type paymentType,a.company_name companyName,a.quantity,
|
|
|
+ a.payment_status paymentStatus, a.status,a.payment_amount paymentAmount,a.remarks , b.quantity NodeQuantity,
|
|
|
+ b.party_amount NodePartyAmount,b.total_amount NodeTotalAmount,d.finance_name financeName ,c.order_no orderNo
|
|
|
+ from t_order_payment a left join payment_node b on a.node_id=b.id
|
|
|
+ left join t_order_task c on b.tid=c.id left join t_order_mid d on c.order_no=d.order_no where 1=1
|
|
|
+ <if test="tpcId != null">
|
|
|
+ and a.tpc_id= #{tpcId}
|
|
|
+ </if>
|
|
|
+ <if test="nodeId != null">
|
|
|
+ and a.node_id= #{nodeId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|