From 9924cb338d1774e97c4b6baaf54c42a22f416c07 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 29 May 2023 11:28:11 +0800
Subject: [PATCH] twoCoin项目修改
---
src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java
index a904f0f..40979da 100644
--- a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java
@@ -1569,7 +1569,11 @@
return;
}
//金额
- BigDecimal amount = dappFundFlowEntity.getAmount();
+ BigDecimal amount = dappFundFlowEntity.getAmount().setScale(4,BigDecimal.ROUND_DOWN);
+ log.info("amount:{}",amount);
+ if(BigDecimal.ZERO.compareTo(amount) >= 0){
+ return;
+ }
Long memberId = dappFundFlowEntity.getMemberId();
DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId);
@@ -1579,7 +1583,7 @@
* 发起USDT转账
*/
log.info("amount:{},address:{}",amount,address);
- String hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL.name()).transfer(address, amount);
+ String hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL.name()).transfer(address, amount.negate());
if(StrUtil.isEmpty(hash)){
return;
}
@@ -1930,6 +1934,7 @@
}
log.info("{},{}",id,hash);
dappFundFlow.setFromHash(hash);
+ dappFundFlow.setStatus(2);
dappFundFlowDao.updateById(dappFundFlow);
}
--
Gitblit v1.9.1