From 412d065591cd71821f2d07d23b64dc9fcde2554d Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 07 Jul 2020 10:52:49 +0800
Subject: [PATCH] 中英文
---
src/main/java/com/xcong/excoin/modules/coin/service/impl/BlockCoinServiceImpl.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 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 5ed9ee2..b1c3301 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
@@ -52,7 +52,7 @@
String address = addressEntity.getAddress();
Long memberId = addressEntity.getMemberId();
- if (StrUtil.isNotBlank(address)) {
+ if (StrUtil.isBlank(address)) {
continue;
}
@@ -76,9 +76,11 @@
if (balance.compareTo(early) > 0) {
BigDecimal newBalance = balance.subtract(early);
- memberWalletCoinDao.updateBlockBalance(memberId, newBalance, balance, 0);
+ memberWalletCoinDao.updateBlockBalance(walletCoinEntity.getId(), newBalance, balance, 0);
insertCoinCharge(address, memberId, newBalance, CoinTypeEnum.USDT.name(), "ERC20", balance);
+ // 插入财务记录
+ LogRecordUtils.insertMemberAccountMoneyChange(memberId, "转入", newBalance, CoinTypeEnum.USDT.name(), 1, 1);
// TODO 钉钉发送, 短信提醒
}
}
@@ -117,7 +119,7 @@
log.info("#ETH更新:{},{},{}#", memberId, balance, early);
BigDecimal newBalance = balance.subtract(early);
- memberWalletCoinDao.updateBlockBalance(memberId, newBalance, balance, 0);
+ memberWalletCoinDao.updateBlockBalance(walletCoin.getId(), newBalance, balance, 0);
insertCoinCharge(address, memberId, newBalance, CoinTypeEnum.ETH.name(), null, balance);
// 插入财务记录
@@ -159,7 +161,7 @@
if (balance.compareTo(early) > 0) {
BigDecimal newBalance = balance.subtract(early);
- memberWalletCoinDao.updateBlockBalance(memberId, newBalance, balance, 0);
+ memberWalletCoinDao.updateBlockBalance(walletCoin.getId(), newBalance, balance, 0);
insertCoinCharge(address, memberId, newBalance, CoinTypeEnum.USDT.name(), "OMNI", balance);
// TODO 钉钉消息, 短信提醒
@@ -199,7 +201,7 @@
if (balance.compareTo(early) > 0) {
log.info("#btc同步:{}, {}, {}#", memberId, balance, early);
BigDecimal newBalance = balance.subtract(early);
- memberWalletCoinDao.updateBlockBalance(memberId, newBalance, balance, 0);
+ memberWalletCoinDao.updateBlockBalance(walletCoin.getId(), newBalance, balance, 0);
insertCoinCharge(address, memberId, newBalance, CoinTypeEnum.BTC.name(), null, balance);
LogRecordUtils.insertMemberAccountMoneyChange(memberId, "转入", newBalance, CoinTypeEnum.BTC.name(), 1, 1);
--
Gitblit v1.9.1