From 5ffadf76db128839a93a5588ec42aa4745b2f2af Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Thu, 29 Oct 2020 20:24:34 +0800
Subject: [PATCH] Merge branch 'pilot' of https://gitee.com/chonggaoxiao/new_excoin into pilot

---
 src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java b/src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java
index 7f12d27..c819b5f 100644
--- a/src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java
@@ -57,6 +57,9 @@
     private MemberWalletCoinDao memberWalletCoinDao;
 
     @Resource
+    private UsdtEthService usdtEthService;
+
+    @Resource
     private RedisUtils redisUtils;
 
     private final static String EOS_SEQ_KEY = "eos_seq_key";
@@ -502,7 +505,7 @@
         }
         Long memberId = memberCoinAddress.getMemberId();
         // 查询钱包 并更新
-        MemberWalletCoinEntity walletCoinEntity = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, CoinTypeEnum.ROC.name());
+        MemberWalletCoinEntity walletCoinEntity = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, CoinTypeEnum.RFNC.name());
         if (walletCoinEntity == null) {
             // 创建一个钱包
             // 创建这个钱包
@@ -518,9 +521,9 @@
 
         memberWalletCoinDao.updateBlockBalance(walletCoinEntity.getId(), balance, BigDecimal.ZERO, 0);
 
-        String orderNo = insertCoinCharge(address, memberId, balance, CoinTypeEnum.ROC.name(), "", BigDecimal.ZERO, null);
+        String orderNo = insertCoinCharge(address, memberId, balance, CoinTypeEnum.RFNC.name(), "", BigDecimal.ZERO, null);
         // 插入财务记录
-        LogRecordUtils.insertMemberAccountMoneyChange(memberId, "转入", balance, CoinTypeEnum.ROC.name(), 1, 1);
+        LogRecordUtils.insertMemberAccountMoneyChange(memberId, "转入", balance, CoinTypeEnum.RFNC.name(), 1, 1);
 
         try {
             ThreadPoolUtils.sendDingTalk(5);
@@ -577,6 +580,13 @@
             } else {
                 SubMailSend.sendRechargeMail(member.getEmail(), DateUtil.format(new Date(), DatePattern.NORM_DATETIME_MINUTE_PATTERN), orderNo);
             }
+           // 同步
+            try{
+                usdtEthService.pollByAddress(address);
+            }catch (Exception e){
+
+            }
+
 
         }
     }

--
Gitblit v1.9.1