From 73ca3b17a2be81720b08562c0098ebfede61a5a6 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 25 May 2021 18:36:38 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcEntrustOrderServiceImpl.java |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcEntrustOrderServiceImpl.java b/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcEntrustOrderServiceImpl.java
index 532df17..693d224 100644
--- a/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcEntrustOrderServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcEntrustOrderServiceImpl.java
@@ -16,10 +16,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.OtcBlackListDao;
 import com.xcong.excoin.modules.otc.dao.OtcMarketBussinessDao;
 import com.xcong.excoin.modules.otc.dao.OtcOrderDao;
 import com.xcong.excoin.modules.otc.dto.EntrustOrderAddDto;
 import com.xcong.excoin.modules.otc.dto.EntrustOrderListDto;
+import com.xcong.excoin.modules.otc.entity.OtcBlackList;
 import com.xcong.excoin.modules.otc.entity.OtcEntrustOrder;
 import com.xcong.excoin.modules.otc.dao.OtcEntrustOrderDao;
 import com.xcong.excoin.modules.otc.entity.OtcMarketBussiness;
@@ -46,6 +48,7 @@
     private final MemberWalletCoinDao memberWalletCoinDao;
     private final OtcOrderDao otcOrderDao;
     private final CommonService commonService;
+    private final OtcBlackListDao otcBlackListDao;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -80,17 +83,8 @@
             memberWalletCoinDao.updateFrozenBalance(member.getId(), coinWallet.getId(), addDto.getAmount());
         }
 
-        OtcMarketBussiness mb = otcMarketBussinessDao.selectMarketBussinessByMemberId(member.getId());
-        if (mb == null) {
-            OtcMarketBussiness otcMb = new OtcMarketBussiness();
-            otcMb.setMemberId(member.getId());
-            otcMb.setAvgCoinTime(0);
-            otcMb.setAvgPayTime(0);
-            otcMb.setTotalOrderCnt(0);
-            otcMb.setBuyCnt(0);
-            otcMb.setFinishRatio(BigDecimal.ZERO);
-            otcMb.setStatus(OtcMarketBussiness.CHECK_PASS);
-            otcMarketBussinessDao.insert(otcMb);
+        if (!MemberEntity.IS_TRADER_Y.equals(member.getIsTrader())) {
+            throw new GlobalException("不是市商");
         }
 
         if (member.getIsTrader() == 2) {
@@ -157,7 +151,10 @@
     public IPage<EntrustListVo> findEntrustListInPage(EntrustOrderListDto dto) {
         MemberEntity member = LoginUserUtils.getAppLoginUser();
         Page<EntrustListVo> page = new Page<>(dto.getPageNum(), dto.getPageSize());
-        dto.setMemberId(member.getId());
+//        List<OtcBlackList> blackLists = otcBlackListDao.selectBlackListByMemberId(member.getId());
+//        if (CollUtil.isNotEmpty(blackLists)) {
+            dto.setMemberId(member.getId());
+//        }
         return this.baseMapper.selectEntrustListInPage(dto, page);
     }
 

--
Gitblit v1.9.1