xiaoyong931011
2021-12-08 f5e6133809c553cfd9fb28ee61019927c547c374
src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java
@@ -55,6 +55,8 @@
    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();
@@ -64,6 +66,10 @@
                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;
                }
@@ -98,8 +104,12 @@
//                            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);
                        }
                    }
                }
            }