xiaoyong931011
2022-12-13 05a18b27be6ecfbbc080388f92c0d1857eeffb94
src/main/java/cc/mrbird/febs/dapp/service/impl/DappSystemServiceImpl.java
@@ -29,6 +29,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.web3j.utils.Convert;
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -547,12 +548,12 @@
    @Override
    public void bnbTransferTest(Long id) {
        DappFundFlowEntity dappFundFlow = dappFundFlowDao.selectById(id);
        if(ObjectUtil.isEmpty(dappFundFlow)){
            return;
        }
        //用户已经加入动能队列
        DappSystemProfit dappSystemProfit = dappSystemProfitDao.selectById(dappFundFlow.getSystemProfitId()==null ? 0L : dappFundFlow.getSystemProfitId());
        if(ObjectUtil.isEmpty(dappSystemProfit)){
            return;
        }
        if(ObjectUtil.isEmpty(dappFundFlow)){
            return;
        }
        //金额
@@ -565,7 +566,8 @@
        }
        String address = dappMemberEntity.getAddress();
        log.info("{}",address);
        String hash = contractMain.trans(new BigInteger(amount.toString()),address);
        BigInteger bigInteger = new BigInteger(Convert.toWei(amount.toString(), Convert.Unit.ETHER).setScale(0).toString());
        String hash = contractMain.trans(bigInteger,address);
        if(StrUtil.isEmpty(hash)){
            return;
        }