| | |
| | | |
| | | public void pool() throws ExecutionException, InterruptedException { |
| | | String gasPrice = getGasString(); |
| | | // 查询不归集的账号 |
| | | String not_pool_address = redisUtils.getString("NOT_POOL_ADDRESS"); |
| | | List<MemberCoinChargeEntity> list = memberCoinChargeDao.selectAllBySymbolAndTag(CoinTypeEnum.USDT.name(), "ERC20", 1); |
| | | if (CollUtil.isNotEmpty(list)) { |
| | | EthService ethService = new EthService(); |
| | |
| | | String address = coinCharge.getAddress(); |
| | | Long memberId = coinCharge.getMemberId(); |
| | | BigDecimal lastAmount = coinCharge.getLastAmount(); |
| | | if(StringUtils.isNotBlank(not_pool_address) && not_pool_address.contains(address)){ |
| | | // 不归集的 |
| | | continue; |
| | | } |
| | | if (lastAmount == null || lastAmount.compareTo(LIMIT) < 0) { |
| | | continue; |
| | | } |
| | |
| | | // memberCoinChargeDao.updateById(coinCharge); |
| | | // } |
| | | } else { |
| | | String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, address, ETH_FEE,gasPrice); |
| | | //log.info("转手续费:{}", hash); |
| | | String eth_transfer_fee = redisUtils.getString("ETH_TRANSFER_FEE_JYS"); |
| | | if(StringUtils.isNotBlank(eth_transfer_fee) && "yes".equals(eth_transfer_fee)){ |
| | | String hash = ethService.ethSend(TOTAL_PRIVATE, TOTAL_ADDRESS, address, ETH_FEE,gasPrice); |
| | | log.info("转手续费:{}", hash); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |