From dc67b1ffb8c2965a2af676738f022af53302e0b2 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 27 May 2021 10:38:28 +0800
Subject: [PATCH] 20210527 最多三个待付款
---
src/main/resources/mapper/otc/OtcEntrustOrderDao.xml | 40 +++++++++++++++++++++++++++++++++++-----
1 files changed, 35 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml b/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml
index a7a8c39..092789a 100644
--- a/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml
+++ b/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml
@@ -6,30 +6,59 @@
select
a.id,
b.id mbId
- ,b.nikename nickname
+ ,c.name nickname
,a.unit_price unitPrice
,a.remain_coin_amount amount
,a.limit_min_amount min
,a.limit_max_amount max
,b.total_order_cnt orderCnt
,b.finish_ratio finishRatio
+ ,d.payment_type payType
from otc_entrust_order a
- left join otc_market_bussiness b on a.mb_id=b.id
+ left join otc_market_bussiness b on a.member_id=b.member_id
+ left join member c on a.member_id=c.id
+ left join member_payment_method d on a.member_id=d.member_id and d.is_defualt=1
+<!-- inner join otc_black_list e on a.member_id!=e.black_member_id-->
+<!-- <if test="record.memberId != null">-->
+<!-- and e.member_id=#{record.memberId}-->
+<!-- </if>-->
<where>
- a.status=1
+ a.status=1 and a.remain_coin_amount > 0
<if test="record != null">
<if test="record.type != null and record.type!=''">
and order_type = #{record.type}
</if>
</if>
+ and a.member_id not in (select black_member_id from otc_black_list x where x.member_id=#{record.memberId})
</where>
+ order by a.create_time desc
</select>
<select id="selectEntrustOrderByOrderType" resultType="com.xcong.excoin.modules.otc.entity.OtcEntrustOrder">
+ select a.*, b.payment_type payType
+ from otc_entrust_order a
+ left join member_payment_method b on a.member_id=b.member_id and b.is_defualt=1
+ <where>
+ <if test="record.orderType != null and record.orderType != ''" >
+ and a.order_type = #{record.orderType}
+ </if>
+ <if test="record.memberId != null">
+ and a.member_id = #{record.memberId}
+ </if>
+ <if test="record.status != null and record.status == 3">
+ and a.status != #{record.status}
+ </if>
+ <if test="record.status != null and record.status != 3">
+ and a.status = #{record.status}
+ </if>
+ </where>
+ </select>
+
+ <select id="selectOwnEntrustListInPage" resultType="com.xcong.excoin.modules.otc.entity.OtcEntrustOrder">
select * from otc_entrust_order
<where>
<if test="record.orderType != null and record.orderType != ''" >
- and order_type = #{record.orderType}
+ and order_type = #{record.orderType}
</if>
<if test="record.memberId != null">
and member_id = #{record.memberId}
@@ -38,9 +67,10 @@
and status != #{record.status}
</if>
<if test="record.status != null and record.status != 3">
- and status == #{record.status}
+ and status = #{record.status}
</if>
</where>
+ order by create_time desc
</select>
<update id="updateRemainAmount">
--
Gitblit v1.9.1