From 895ba20f445645dd300e381d7d6faba344f9dfa4 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 31 May 2021 18:05:58 +0800
Subject: [PATCH] 20210531
---
src/main/resources/mapper/otc/OtcEntrustOrderDao.xml | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml b/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml
index ea0a2c6..7d64025 100644
--- a/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml
+++ b/src/main/resources/mapper/otc/OtcEntrustOrderDao.xml
@@ -11,17 +11,19 @@
,a.remain_coin_amount amount
,a.limit_min_amount min
,a.limit_max_amount max
- ,b.total_order_cnt orderCnt
- ,b.finish_ratio finishRatio
+ ,case when a.order_type = 'B' then b.total_order_cnt
+ when a.order_type = 'S' then b.sale_order_cnt end orderCnt
+ ,case when a.order_type = 'B' then b.finish_ratio
+ when a.order_type = 'S' then b.sale_finish_ratio end finishRatio
,d.payment_type payType
from otc_entrust_order a
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>
+<!-- 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 and a.remain_coin_amount > 0
<if test="record != null">
@@ -29,8 +31,9 @@
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
+ order by a.unit_price desc
</select>
<select id="selectEntrustOrderByOrderType" resultType="com.xcong.excoin.modules.otc.entity.OtcEntrustOrder">
@@ -50,6 +53,10 @@
<if test="record.status != null and record.status != 3">
and a.status = #{record.status}
</if>
+
+ <if test="record.isDefualt != null">
+ and b.is_defualt = #{record.isDefualt}
+ </if>
</where>
</select>
--
Gitblit v1.9.1