From 6d0ddcd0ebfa8e17ecd0403f055e89b82c68cf41 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 14 May 2021 16:04:26 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/modules/yunding/service/Impl/XchProfitServiceImpl.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/XchProfitServiceImpl.java b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/XchProfitServiceImpl.java index 8b530e4..1796454 100644 --- a/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/XchProfitServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/yunding/service/Impl/XchProfitServiceImpl.java @@ -16,6 +16,7 @@ import com.xcong.excoin.modules.yunding.entity.YdOrderEntity; import com.xcong.excoin.modules.yunding.entity.YdProductEntity; import com.xcong.excoin.modules.yunding.service.XchProfitService; +import com.xcong.excoin.rabbit.producer.YunDingProducter; import com.xcong.excoin.utils.LogRecordUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -44,6 +45,9 @@ @Autowired private YdBasicLevelSettingDao ydBasicLevelSettingDao; + @Autowired + private YunDingProducter yunDingProducter; + @Override @Transactional(rollbackFor = Exception.class) public void autoBeAgent(Long id) { @@ -68,7 +72,7 @@ update.setAgentLevel(2); memberDao.updateById(update); } - } else if (memberEntity.getAgentLevel() != null && member.getAgentLevel() == 2){ + } else if (memberEntity.getAgentLevel() != null && memberEntity.getAgentLevel() == 2){ // 判断是否达到总代标准 if(becomeZd(memberEntity, settings.get(0))) { update.setAgentLevel(1); @@ -147,6 +151,8 @@ public void usdtProfitDistributorByOrderId(Long id) { YdOrderEntity ydOrderEntity = ydOrderDao.selectById(id); usdtProfitDistributor(ydOrderEntity); + + yunDingProducter.sendYunDingAutoAgent(ydOrderEntity.getMemberId()); } private void usdtProfitDistributor(YdOrderEntity order) { @@ -262,6 +268,7 @@ LogRecordUtils.insertMemberAccountMoneyChangeWithId(order.getMemberId(), content, remainProfit, "XCH", 1, 4, order.getId()); MemberWalletCoinEntity walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(order.getMemberId(), "XCH"); + ydOrderDao.updateOrderProfit(remainProfit, order.getId()); memberWalletCoinDao.updateBlockBalance(walletCoin.getId(), remainProfit, BigDecimal.ZERO, 0); } } -- Gitblit v1.9.1