|
|
@@ -523,19 +523,25 @@
|
|
|
</select>
|
|
|
<!-- 查看自己创建的流水数据 -->
|
|
|
<select id="myBillList" parameterType="Map" resultType="com.goafanti.common.model.TOrderBillNew">
|
|
|
- select
|
|
|
- b.bill_no as billNo, b.order_no as orderNo, b.transaction_amount as transactionAmount,date_format(b.create_time,'%Y-%m-%d %H:%I:%S') as createTimes,
|
|
|
- b.payer_id as payerId, b.payee_id as payeeId, u.nickname as payerName, a.nickname as payeeName, b.remarks,o.contract_no contractNo,
|
|
|
- b.transaction_subject as transactionSubject, 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, o.salesman_id as saleId, oa.name as 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
|
|
|
- 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 1=1
|
|
|
+ select b.bill_no as billNo, b.order_no as orderNo, b.transaction_amount as transactionAmount,
|
|
|
+ date_format(b.create_time, '%Y-%m-%d %H:%I:%S') as createTimes, b.payer_id as payerId, b.payee_id as payeeId,
|
|
|
+ tm.buyer_name as payerName, b.remarks, o.contract_no contractNo, b.transaction_subject as transactionSubject,
|
|
|
+ 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
|
|
|
+ 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
|
|
|
+ where 1=1
|
|
|
+ <if test="fids != null and fids.size > 0">
|
|
|
+ and ,o.finance_id in
|
|
|
+ <foreach collection="fids" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="b.orderNo != null and b.orderNo != """>
|
|
|
and b.order_no = #{b.orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -547,7 +553,7 @@
|
|
|
</if>
|
|
|
<if test="b.payerName != null and b.payerName != """>
|
|
|
<bind name="nn" value="'%' + b.payerName + '%'" />
|
|
|
- and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
+ and tm.buyer_name like #{nn,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="b.payeeName != null and b.payeeName != """>
|
|
|
<bind name="n" value="'%' + b.payeeName + '%'" />
|
|
|
@@ -567,13 +573,20 @@
|
|
|
</if>
|
|
|
</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 t_order_new o on o.order_no = b.order_no
|
|
|
- left join admin oa on oa.id = o.salesman_id
|
|
|
- where 1=1
|
|
|
+ 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
|
|
|
+ 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
|
|
|
+ where 1=1
|
|
|
+ <if test="fids != null and fids.size > 0">
|
|
|
+ and ,o.finance_id in
|
|
|
+ <foreach collection="fids" item="id" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="b.orderNo != null and b.orderNo != """>
|
|
|
and b.order_no = #{b.orderNo,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
@@ -585,7 +598,7 @@
|
|
|
</if>
|
|
|
<if test="b.payerName != null and b.payerName != """>
|
|
|
<bind name="nn" value="'%' + b.payerName + '%'" />
|
|
|
- and u.nickname like #{nn,jdbcType=VARCHAR}
|
|
|
+ and tm.buyer_name like #{nn,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="b.payeeName != null and b.payeeName != """>
|
|
|
<bind name="n" value="'%' + b.payeeName + '%'" />
|