|
|
@@ -100,8 +100,8 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Wed Feb 19 08:54:03 CST 2020.
|
|
|
-->
|
|
|
- bill_no, order_no, creater, create_time, update_time, payee_id, payer_id, transaction_amount,
|
|
|
- transaction_subject, transaction_channel, remarks, confirm_sign, delete_sign, financial_pay_no,
|
|
|
+ bill_no, order_no, creater, create_time, update_time, payee_id, payer_id, transaction_amount,
|
|
|
+ transaction_subject, transaction_channel, remarks, confirm_sign, delete_sign, financial_pay_no,
|
|
|
financial_pay_time, type, delete_time, refund_time
|
|
|
</sql>
|
|
|
<select id="selectByExample" parameterType="com.goafanti.common.model.TOrderBillNewExample" resultMap="BaseResultMap">
|
|
|
@@ -129,7 +129,7 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Wed Feb 19 08:54:03 CST 2020.
|
|
|
-->
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from t_order_bill_new
|
|
|
where bill_no = #{billNo,jdbcType=VARCHAR}
|
|
|
@@ -160,18 +160,18 @@
|
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
This element was generated on Wed Feb 19 08:54:03 CST 2020.
|
|
|
-->
|
|
|
- insert into t_order_bill_new (bill_no, order_no, creater,
|
|
|
- create_time, update_time, payee_id,
|
|
|
- payer_id, transaction_amount, transaction_subject,
|
|
|
- transaction_channel, remarks, confirm_sign,
|
|
|
- delete_sign, financial_pay_no, financial_pay_time,
|
|
|
+ insert into t_order_bill_new (bill_no, order_no, creater,
|
|
|
+ create_time, update_time, payee_id,
|
|
|
+ payer_id, transaction_amount, transaction_subject,
|
|
|
+ transaction_channel, remarks, confirm_sign,
|
|
|
+ delete_sign, financial_pay_no, financial_pay_time,
|
|
|
type, delete_time, refund_time
|
|
|
)
|
|
|
- values (#{billNo,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{creater,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{payeeId,jdbcType=VARCHAR},
|
|
|
- #{payerId,jdbcType=VARCHAR}, #{transactionAmount,jdbcType=DECIMAL}, #{transactionSubject,jdbcType=INTEGER},
|
|
|
- #{transactionChannel,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, #{confirmSign,jdbcType=INTEGER},
|
|
|
- #{deleteSign,jdbcType=TINYINT}, #{financialPayNo,jdbcType=VARCHAR}, #{financialPayTime,jdbcType=TIMESTAMP},
|
|
|
+ values (#{billNo,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{creater,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{payeeId,jdbcType=VARCHAR},
|
|
|
+ #{payerId,jdbcType=VARCHAR}, #{transactionAmount,jdbcType=DECIMAL}, #{transactionSubject,jdbcType=INTEGER},
|
|
|
+ #{transactionChannel,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, #{confirmSign,jdbcType=INTEGER},
|
|
|
+ #{deleteSign,jdbcType=TINYINT}, #{financialPayNo,jdbcType=VARCHAR}, #{financialPayTime,jdbcType=TIMESTAMP},
|
|
|
#{type,jdbcType=INTEGER}, #{deleteTime,jdbcType=TIMESTAMP}, #{refundTime,jdbcType=TIMESTAMP}
|
|
|
)
|
|
|
</insert>
|
|
|
@@ -497,26 +497,26 @@
|
|
|
</select>
|
|
|
<!-- 根据流水编号获得流水详情 -->
|
|
|
<select id="getOneRefundFlow" parameterType="java.lang.String" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
- select
|
|
|
- b.bill_no as billNo, b.order_no as orderNo, b.creater, b.create_time as createTime, b.update_time as updateTime,
|
|
|
- b.payee_id as payeeId, b.payer_id as payerId, b.transaction_amount as transactionAmount,
|
|
|
- b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
- b.remarks, b.confirm_sign confirmSign, b.delete_sign deleteSign, b.financial_pay_no as financialPayNo,
|
|
|
+ select
|
|
|
+ b.bill_no as billNo, b.order_no as orderNo, b.creater, b.create_time as createTime, b.update_time as updateTime,
|
|
|
+ b.payee_id as payeeId, b.payer_id as payerId, b.transaction_amount as transactionAmount,
|
|
|
+ b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
+ b.remarks, b.confirm_sign confirmSign, b.delete_sign deleteSign, b.financial_pay_no as financialPayNo,
|
|
|
b.financial_pay_time as financialPayTimes, u.nickname as payerName, a.nickname as payeeName
|
|
|
- from t_order_bill_new b
|
|
|
+ from t_order_bill_new b
|
|
|
left join `user` u on b.payer_id = u.id
|
|
|
left join `user` a on b.payee_id = a.id
|
|
|
where b.delete_sign = 0 and bill_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<!-- 根据订单编号查看该订单相关的所有流水 -->
|
|
|
<select id="getOneOrderAllRefundFlow" parameterType="java.lang.String" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
- select
|
|
|
- b.bill_no as billNo, b.order_no as orderNo, b.creater, b.create_time as createTime, b.update_time as updateTime,
|
|
|
- b.payee_id as payeeId, b.payer_id as payerId, b.transaction_amount as transactionAmount,
|
|
|
- b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
- b.remarks, b.confirm_sign confirmSign, b.delete_sign deleteSign, b.financial_pay_no as financialPayNo,
|
|
|
+ select
|
|
|
+ b.bill_no as billNo, b.order_no as orderNo, b.creater, b.create_time as createTime, b.update_time as updateTime,
|
|
|
+ b.payee_id as payeeId, b.payer_id as payerId, b.transaction_amount as transactionAmount,
|
|
|
+ b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
+ b.remarks, b.confirm_sign confirmSign, b.delete_sign deleteSign, b.financial_pay_no as financialPayNo,
|
|
|
b.financial_pay_time as financialPayTimes, u.nickname as payerName, a.nickname as payeeName
|
|
|
- from t_order_bill_new b
|
|
|
+ from t_order_bill_new b
|
|
|
left join `user` u on b.payer_id = u.id
|
|
|
left join `user` a on b.payee_id = a.id
|
|
|
where b.delete_sign = 0 and order_no = #{_parameter,jdbcType=VARCHAR}
|
|
|
@@ -529,16 +529,16 @@
|
|
|
b.transaction_channel as transactionChannel, b.delete_sign deleteSign, date_format(b.financial_pay_time, '%Y-%m-%d') as financialPayTimes,
|
|
|
b.financial_pay_no as financialPayNo, date_format(b.refund_time, '%Y-%m-%d') refundTimes, b.creater, ad.name as createrName,
|
|
|
tm.salesman_name saleName, b.type, date_format(b.delete_time, '%Y-%m-%d %H:%I:%S') as deleteTimes
|
|
|
- from t_order_bill_new b
|
|
|
- left join `user` u on b.payer_id = u.id
|
|
|
- left join `user` a on b.payee_id = a.id
|
|
|
+ from t_order_bill_new b FORCE index(t_order_bill_new_create_time_IDX)
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join `user` a on b.payee_id = a.id
|
|
|
left join admin ad on b.creater = ad.id
|
|
|
left join t_order_new o on o.order_no = b.order_no
|
|
|
left join t_order_mid tm on tm.order_no=b.order_no
|
|
|
left join department d on o.order_dep = d.id
|
|
|
- where 1=1
|
|
|
+ where 1=1
|
|
|
<if test="fids != null and fids.size() > 0">
|
|
|
- and d.finance_id in
|
|
|
+ and d.finance_id in
|
|
|
<foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
@@ -572,16 +572,15 @@
|
|
|
</select>
|
|
|
<select id="myBillCount" parameterType="Map" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
- from t_order_bill_new b
|
|
|
- left join `user` u on b.payer_id = u.id
|
|
|
- left join `user` a on b.payee_id = a.id
|
|
|
- left join admin ad on b.creater = ad.id
|
|
|
+ from t_order_bill_new b
|
|
|
+ left join `user` u on b.payer_id = u.id
|
|
|
+ left join `user` a on b.payee_id = a.id
|
|
|
left join t_order_new o on o.order_no = b.order_no
|
|
|
left join t_order_mid tm on tm.order_no=b.order_no
|
|
|
left join department d on o.order_dep = d.id
|
|
|
- where 1=1
|
|
|
+ where 1=1
|
|
|
<if test="fids != null and fids.size() > 0">
|
|
|
- and d.finance_id in
|
|
|
+ and d.finance_id in
|
|
|
<foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
@@ -617,10 +616,10 @@
|
|
|
left join `user` u on b.payer_id = u.id
|
|
|
left join `user` a on b.payee_id = a.id
|
|
|
left join t_order_new o on o.order_no = b.order_no
|
|
|
- left join admin oa on oa.id = o.salesman_id
|
|
|
+ left join admin oa on oa.id = o.salesman_id
|
|
|
left join department d on oa.department_id = d.id
|
|
|
- where
|
|
|
- b.delete_sign = 0
|
|
|
+ where
|
|
|
+ b.delete_sign = 0
|
|
|
<if test="payerName != null and payerName != """>
|
|
|
<bind name="nn" value="'%' + payerName + '%'" />
|
|
|
and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
@@ -637,10 +636,10 @@
|
|
|
</select>
|
|
|
<!-- 获得流水记录 -->
|
|
|
<select id="getBillData" parameterType="com.goafanti.common.model.TOrderBillNew" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
- select
|
|
|
+ select
|
|
|
b.bill_no as billNo, b.order_no as orderNo, b.transaction_amount as transactionAmount,
|
|
|
- u.nickname as payerName, a.nickname as payeeName,
|
|
|
- b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
+ u.nickname as payerName, a.nickname as payeeName,
|
|
|
+ b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel,
|
|
|
b.financial_pay_time as financialPayTimes,b.financial_pay_no as financialPayNo,
|
|
|
b.creater, ad.name as createrName, oa.name as saleName, b.create_time as createTime
|
|
|
from t_order_bill_new b
|
|
|
@@ -649,7 +648,7 @@
|
|
|
left join admin ad on b.creater = ad.id
|
|
|
left join t_order_new o on o.order_no = b.order_no
|
|
|
left join admin oa on oa.id = o.salesman_id
|
|
|
- where b.delete_sign = 0
|
|
|
+ where b.delete_sign = 0
|
|
|
<if test="payerName != null and payerName != """>
|
|
|
<bind name="nn" value="'%' + payerName + '%'" />
|
|
|
and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
@@ -673,24 +672,24 @@
|
|
|
where a.order_no= #{orderNo,jdbcType=VARCHAR};
|
|
|
</select>
|
|
|
<select id="selectByOrderNo" resultType="com.goafanti.order.bo.BillBo">
|
|
|
- select date_format(a.financial_pay_time,'%Y-%m-%d') payTime,a.transaction_amount transactionAmount,b.name aName from t_order_bill_new a
|
|
|
+ select date_format(a.financial_pay_time,'%Y-%m-%d') payTime,a.transaction_amount transactionAmount,b.name aName from t_order_bill_new a
|
|
|
left join admin b on a.creater=b.id
|
|
|
-where order_no= #{orderNo,jdbcType=VARCHAR};
|
|
|
+where order_no= #{orderNo,jdbcType=VARCHAR};
|
|
|
</select>
|
|
|
<insert id="insertBatch" parameterType="com.goafanti.common.model.TOrderBillNew">
|
|
|
- insert into t_order_bill_new (bill_no, order_no, creater,
|
|
|
- create_time, update_time, payee_id,
|
|
|
- payer_id, transaction_amount, transaction_subject,
|
|
|
- transaction_channel, remarks, confirm_sign,
|
|
|
- delete_sign, financial_pay_no, financial_pay_time,
|
|
|
- type)values
|
|
|
+ insert into t_order_bill_new (bill_no, order_no, creater,
|
|
|
+ create_time, update_time, payee_id,
|
|
|
+ payer_id, transaction_amount, transaction_subject,
|
|
|
+ transaction_channel, remarks, confirm_sign,
|
|
|
+ delete_sign, financial_pay_no, financial_pay_time,
|
|
|
+ type)values
|
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
|
- (#{item.billNo,jdbcType=VARCHAR}, #{item.orderNo,jdbcType=VARCHAR}, #{item.creater,jdbcType=VARCHAR},
|
|
|
- #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.payeeId,jdbcType=VARCHAR},
|
|
|
- #{item.payerId,jdbcType=VARCHAR}, #{item.transactionAmount,jdbcType=DECIMAL}, #{item.transactionSubject,jdbcType=INTEGER},
|
|
|
- #{item.transactionChannel,jdbcType=INTEGER}, #{item.remarks,jdbcType=VARCHAR}, #{item.confirmSign,jdbcType=INTEGER},
|
|
|
- #{item.deleteSign,jdbcType=TINYINT}, #{item.financialPayNo,jdbcType=VARCHAR}, #{item.financialPayTime,jdbcType=TIMESTAMP},
|
|
|
+ (#{item.billNo,jdbcType=VARCHAR}, #{item.orderNo,jdbcType=VARCHAR}, #{item.creater,jdbcType=VARCHAR},
|
|
|
+ #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.payeeId,jdbcType=VARCHAR},
|
|
|
+ #{item.payerId,jdbcType=VARCHAR}, #{item.transactionAmount,jdbcType=DECIMAL}, #{item.transactionSubject,jdbcType=INTEGER},
|
|
|
+ #{item.transactionChannel,jdbcType=INTEGER}, #{item.remarks,jdbcType=VARCHAR}, #{item.confirmSign,jdbcType=INTEGER},
|
|
|
+ #{item.deleteSign,jdbcType=TINYINT}, #{item.financialPayNo,jdbcType=VARCHAR}, #{item.financialPayTime,jdbcType=TIMESTAMP},
|
|
|
#{item.type,jdbcType=INTEGER})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
-</mapper>
|
|
|
+</mapper>
|