| | |
| | | |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL_CONTRACT.name()).transferUSDT(address, amount); |
| | | if(StrUtil.isEmpty(hash)){ |
| | | hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL.name()).transfer(address, amount); |
| | | // return; |
| | | } |
| | | if(StrUtil.isEmpty(hash)){ |
| | | // hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL.name()).transfer(address, amount); |
| | | return; |
| | | } |
| | | // if(StrUtil.isEmpty(hash)){ |
| | | // return; |
| | | // } |
| | | log.info("{},{}",id,hash); |
| | | dappFundFlowEntity.setFromHash(hash); |
| | | dappFundFlowEntity.setStatus(2); |
| | |
| | | * 紧急提现方法 |
| | | */ |
| | | public static void main(String[] args) { |
| | | BigDecimal amount = new BigDecimal("1"); |
| | | BigDecimal amount = new BigDecimal("0.01"); |
| | | String address = "0xB3cF9669F398f444DfCAebbAd2A49bF32ba41fE3"; |
| | | |
| | | String hash = ChainService.getInstance(ChainEnum.BSC_USDT_W_POOL_CONTRACT.name()).transferUSDT(address, amount); |
| | |
| | | PoolEnum.COIN_A_CNT.getType(), |
| | | PoolEnum.COIN_A_CNT.getCode()); |
| | | BigDecimal coinACnt = new BigDecimal(coinACntDic.getValue()); |
| | | coinACnt = coinACnt.subtract(totalCnt); |
| | | coinACnt = coinACnt.subtract(totalCnt.multiply(new BigDecimal(0.8))); |
| | | coinACntDic.setValue(coinACnt.toString()); |
| | | dataDictionaryCustomMapper.updateById(coinACntDic); |
| | | |
| | |
| | | ); |
| | | //A币金本位底池-usdt数量 |
| | | BigDecimal coinAUsdtPriceDicCnt = new BigDecimal(coinAUsdtPriceDic.getValue()); |
| | | coinAUsdtPriceDicCnt = coinAUsdtPriceDicCnt.add(amount); |
| | | coinAUsdtPriceDicCnt = coinAUsdtPriceDicCnt.add(amount.multiply(new BigDecimal(0.8))); |
| | | coinAUsdtPriceDic.setValue(coinAUsdtPriceDicCnt.toString()); |
| | | dataDictionaryCustomMapper.updateById(coinAUsdtPriceDic); |
| | | |