From c0fac904e85b0b0131cde4c6b7f1e8de9f095089 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 04 Mar 2021 10:19:13 +0800
Subject: [PATCH] 20210304   添加跟单人数的日志打印

---
 src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
index e77cb45..116f51f 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/DocumentaryServiceImpl.java
@@ -60,6 +60,7 @@
 import com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity;
 import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
 import com.xcong.excoin.modules.documentary.service.DocumentaryService;
+import com.xcong.excoin.modules.documentary.vo.BeTraderConditionVo;
 import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderInfoVo;
 import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderSetInfoVo;
 import com.xcong.excoin.modules.documentary.vo.FollowFollowerNoticeVo;
@@ -1069,6 +1070,18 @@
         long id = outFollowInfoDto.getId();
         //获取【跟随者收益】
         FollowFollowerProfitEntity followFollowerProfitEntity = followFollowerProfitDao.selectById(id);
+        
+        //当前有跟单合约不允许移除
+        //获取【跟随者-订单关联表】
+        Map<String, Object> selectColumnMap = new HashMap<>();
+        selectColumnMap.put("member_id", followFollowerProfitEntity.getMemberId());
+        selectColumnMap.put("trade_member_id", memberId);
+        selectColumnMap.put("order_type", FollowFollowerOrderRelationEntity.ORDER_TYPE_HOLD);
+        List<FollowFollowerOrderRelationEntity> followFollowerOrderRelationEntitys = followFollowerOrderRelationDao.selectByMap(selectColumnMap);
+        if(CollUtil.isNotEmpty(followFollowerOrderRelationEntitys)) {
+        	return Result.fail(MessageSourceUtils.getString("documentary_service_0019"));
+        }
+        
         followFollowerProfitEntity.setIsFollow(FollowFollowerProfitEntity.IS_FOLLOW_N);
         followFollowerProfitDao.updateById(followFollowerProfitEntity);
 
@@ -1146,6 +1159,13 @@
 		}
 		return Result.ok(arrayList);
 	}
+
+	@Override
+	public Result beTraderCondition() {
+		String type = "apply_trader_rule";
+		List<BeTraderConditionVo> beTraderConditionVos = followTraderInfoDao.selectBeTraderCondition(type);
+		return Result.ok(beTraderConditionVos);
+	}
 	
 	
 	

--
Gitblit v1.9.1