zainali5120
2020-10-13 09c7e370124e4c2fed21f35cea98f4626d2715e7
roc人工提币
1 files modified
28 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 28 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -536,20 +536,20 @@
            // 如果是ROC  则自动转
            String transfer = RocService.transfer(amount, address, "ROC");
        }else if("USDT".equals(symbol) && !"Y".equals(selectById.getIsInside())){
            EthService ethService = new EthService();
            // 查询余额是否足够
            BigDecimal bigDecimal = ethService.tokenGetBalance(EthService.TOTAL_ADDRESS);
            if(bigDecimal==null ||bigDecimal.compareTo(amount)<0 ){
                FebsResponse fail = new FebsResponse().fail();
                fail.message("总钱包余额不足");
                return fail;
            }
            amount = amount.multiply(new BigDecimal("1000000"));
            String usdtStr = amount.toPlainString();
            if (usdtStr.contains(".")) {
                usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf("."));
            }
            String s = ethService.tokenSend(address, usdtStr, null);
//            EthService ethService = new EthService();
//            // 查询余额是否足够
//            BigDecimal bigDecimal = ethService.tokenGetBalance(EthService.TOTAL_ADDRESS);
//            if(bigDecimal==null ||bigDecimal.compareTo(amount)<0 ){
//                FebsResponse fail = new FebsResponse().fail();
//                fail.message("总钱包余额不足");
//                return fail;
//            }
//            amount = amount.multiply(new BigDecimal("1000000"));
//            String usdtStr = amount.toPlainString();
//            if (usdtStr.contains(".")) {
//                usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf("."));
//            }
//            String s = ethService.tokenSend(address, usdtStr, null);
        }
        /**