From 36d59c12794849c1b6fbbcbd41f97ea2fe71b09c Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 04 Mar 2021 11:10:19 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
index c208aa5..c721255 100644
--- a/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
@@ -88,11 +88,20 @@
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void addFollowerOrder(Long id) {
-        log.info("进入跟单处理逻辑:{}", id);
+        log.info("进入跟单处理逻辑 : {}", id);
         // 查询交易员订单
         ContractHoldOrderEntity holdOrderEntity = contractHoldOrderDao.selectById(id);
-        log.info("----->{}", holdOrderEntity);
-        log.info("---->{}", holdOrderEntity.getMemberId());
+
+        while (holdOrderEntity == null) {
+            try {
+                log.info("等待事务提交");
+                Thread.sleep(200);
+                holdOrderEntity = contractHoldOrderDao.selectById(id);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+        }
+
         List<FollowFollowerSettingEntity> followerSettings = followFollowerSettingDao.selectAllFollowerSettingByTradeMemberId(holdOrderEntity.getMemberId());
         log.info("进入跟单处理逻辑---跟单人数"+followerSettings.size());
         // 开仓价

--
Gitblit v1.9.1