zainali5120
2021-03-14 0f4df6c351d87054ded6bd54f0c6b9f6253ea56f
src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
@@ -34,12 +34,14 @@
import com.xcong.excoin.modules.member.entity.*;
import com.xcong.excoin.modules.platform.entity.PlatformTradeSettingEntity;
import com.xcong.excoin.rabbit.pricequeue.OrderModel;
import com.xcong.excoin.rabbit.producer.FollowProducer;
import com.xcong.excoin.rabbit.producer.OrderProducer;
import com.xcong.excoin.utils.CacheSettingUtils;
import com.xcong.excoin.utils.CalculateUtil;
import com.xcong.excoin.utils.LogRecordUtils;
import com.xcong.excoin.utils.ThreadPoolUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -84,6 +86,9 @@
    @Resource
    private MemberSettingDao memberSettingDao;
    @Autowired
    private FollowProducer followProducer;
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -92,11 +97,12 @@
        // 查询交易员订单
        ContractHoldOrderEntity holdOrderEntity = contractHoldOrderDao.selectById(id);
        while (holdOrderEntity == null) {
        if (holdOrderEntity == null) {
            try {
                log.info("等待事务提交:{}", id);
                Thread.sleep(200);
                holdOrderEntity = contractHoldOrderDao.selectById(id);
                followProducer.sendAddFollowOrder(id);
                return;
            } catch (InterruptedException e) {
                e.printStackTrace();
            }