|
|
@@ -114,7 +114,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Tue Jun 16 16:45:09 CST 2020.
|
|
|
-->
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from financial_payment
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
@@ -145,9 +145,9 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Tue Jun 16 16:45:09 CST 2020.
|
|
|
-->
|
|
|
- insert into financial_payment (id, pid, party_amount,
|
|
|
+ insert into financial_payment (id, pid, party_amount,
|
|
|
payment_time, create_time)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL},
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{partyAmount,jdbcType=DECIMAL},
|
|
|
#{paymentTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.FinancialPayment">
|
|
|
@@ -192,8 +192,8 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.FinancialPayment" useGeneratedKeys="true">
|
|
|
insert into financial_payment
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -326,22 +326,22 @@
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectByPid" resultType="com.goafanti.organization.bo.outFinancialPayment">
|
|
|
- select id,pid,party_amount partyAmount,date_format(payment_time,'%Y-%m-%d') paymentTimes
|
|
|
+ select id,pid,party_amount partyAmount,date_format(payment_time,'%Y-%m-%d') paymentTimes
|
|
|
from financial_payment where pid= #{id}
|
|
|
</select>
|
|
|
<select id="selectBypidGetNotice" resultType="com.goafanti.organization.bo.NoticeInformationBo">
|
|
|
select b.id pid,d.order_no orderNo,d.salesman_id salesmanId,d.salesman_name salesmanName , d.buyer_name buyerName,
|
|
|
d.finance_id financeId,d.finance_name financeName,ta.name techName ,sa.email salesmanEmail,fa.email financeEmail,
|
|
|
- ta.email techEmail,ta.id techId from t_order_payment b left join t_order_task c on b.tid=c.id
|
|
|
- left join t_order_mid d on c.order_no=d.order_no left join admin sa on d.salesman_id=sa.id
|
|
|
+ ta.email techEmail,ta.id techId from t_order_payment b left join t_order_task c on b.tid=c.id
|
|
|
+ left join t_order_mid d on c.order_no=d.order_no left join admin sa on d.salesman_id=sa.id
|
|
|
left join admin fa on d.finance_id=fa.id left join admin ta on c.task_receiver=ta.id
|
|
|
where b.id= #{pid}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="updateOrderCost">
|
|
|
- update t_order_mid x ,(select a.id,a.tid,b.order_no from t_order_payment a left join t_order_task b on a.tid=b.id
|
|
|
- where a.id=#{pid})y,t_task_mid z set x.payment_amount= x.payment_amount+ #{partyAmount}, z.party_amount=z.party_amount+ #{partyAmount}
|
|
|
- where x.order_no=y.order_no and y.tid=z.tid
|
|
|
+ update t_order_payment a,t_task_mid z
|
|
|
+ set z.party_amount=z.party_amount+ #{partyAmount}
|
|
|
+ where a.id=#{pid} and a.tid=z.tid
|
|
|
</select>
|
|
|
-
|
|
|
-</mapper>
|
|
|
+
|
|
|
+</mapper>
|