From b787caa660c2aed5281d1429d5db2ec18ac8fa7c Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 25 May 2021 16:31:36 +0800
Subject: [PATCH] Merge branch 'otc' of http://120.27.238.55:7000/r/exchange into otc

---
 src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java b/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
index c422f84..0608424 100644
--- a/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
@@ -19,18 +19,12 @@
 import com.xcong.excoin.modules.member.entity.MemberEntity;
 import com.xcong.excoin.modules.member.entity.MemberPaymentMethodEntity;
 import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
-import com.xcong.excoin.modules.otc.dao.OtcEntrustOrderDao;
-import com.xcong.excoin.modules.otc.dao.OtcMarketBussinessDao;
-import com.xcong.excoin.modules.otc.dao.OtcOrderAppealDao;
+import com.xcong.excoin.modules.otc.dao.*;
 import com.xcong.excoin.modules.otc.dto.HasPayDto;
 import com.xcong.excoin.modules.otc.dto.OrderApealDto;
 import com.xcong.excoin.modules.otc.dto.OrderListDto;
 import com.xcong.excoin.modules.otc.dto.OtcOrderAddDto;
-import com.xcong.excoin.modules.otc.entity.OtcEntrustOrder;
-import com.xcong.excoin.modules.otc.entity.OtcMarketBussiness;
-import com.xcong.excoin.modules.otc.entity.OtcOrder;
-import com.xcong.excoin.modules.otc.dao.OtcOrderDao;
-import com.xcong.excoin.modules.otc.entity.OtcOrderAppeal;
+import com.xcong.excoin.modules.otc.entity.*;
 import com.xcong.excoin.modules.otc.service.OtcOrderService;
 import com.xcong.excoin.modules.otc.vo.BuyOrderDetailVo;
 import com.xcong.excoin.modules.otc.vo.OrderListVo;
@@ -57,6 +51,7 @@
     private final MemberWalletCoinDao memberWalletCoinDao;
     private final MemberDao memberDao;
     private final MemberPaymentMethodDao memberPaymentMethodDao;
+    private final OtcBlackListDao otcBlackListDao;
 
 
     @Override
@@ -316,6 +311,13 @@
         OtcOrder saleOrder = this.baseMapper.selectOrderByOrderNoAndType(otcOrder.getOrderNo(), OtcEntrustOrder.ORDER_TYPE_S);
         MemberEntity saleMember = memberDao.selectById(saleOrder.getMemberId());
 
+        OtcBlackList otcBlackList = otcBlackListDao.selectByMemberIdAndBlackMemberId(member.getId(), buyOrder.getEntrustMemberId());
+        if (otcBlackList != null) {
+            buyDetail.setIsBlack(1);
+        } else {
+            buyDetail.setIsBlack(2);
+        }
+
         buyDetail.setSaleName(saleMember.getName());
 
         buyDetail.setBankName(buyOrder.getBankName());
@@ -353,7 +355,6 @@
         }
         MemberEntity buyMember = memberDao.selectById(saleOrder.getOppositeMemberId());
 
-
         SaleOrderDetailVo saleDetail = new SaleOrderDetailVo();
         saleDetail.setOrderNo(saleOrder.getOrderNo());
         saleDetail.setUsdtAmount(saleOrder.getCoinAmount());
@@ -366,6 +367,12 @@
         saleDetail.setSaleName(buyMember.getName());
         saleDetail.setPayType(saleOrder.getPayType());
 
+        OtcBlackList otcBlackList = otcBlackListDao.selectByMemberIdAndBlackMemberId(member.getId(), saleOrder.getEntrustMemberId());
+        if (otcBlackList != null) {
+            saleDetail.setIsBlack(1);
+        } else {
+            saleDetail.setIsBlack(2);
+        }
         if (!saleOrder.getMemberId().equals(saleOrder.getEntrustMemberId())) {
             OtcMarketBussiness otcMb = otcMarketBussinessDao.selectMarketBussinessByMemberId(saleOrder.getEntrustMemberId());
             saleDetail.setMbId(otcMb.getId());
@@ -416,15 +423,12 @@
         if(StrUtil.isEmpty(reason)){
             return Result.fail("请填写申诉原因");
         }
-        String content = orderApealDto.getContent();
-        if(StrUtil.isEmpty(content)){
-            return Result.fail("请填写申诉内容");
-        }
+        List<String> content = orderApealDto.getContent();
         OtcOrderAppeal otcOrderAppeal = new OtcOrderAppeal();
         otcOrderAppeal.setMemberId(memberId);
         otcOrderAppeal.setOrderId(orderId);
         otcOrderAppeal.setReason(reason);
-        otcOrderAppeal.setContent(content);
+        otcOrderAppeal.setContent(content.toString());
         otcOrderAppeal.setStatus(OtcOrderAppeal.STATUS_ONE);
         otcOrderAppealDao.insert(otcOrderAppeal);
         return Result.ok("成功");

--
Gitblit v1.9.1