From 737b53f4e4936093e629f51f9b894e2c6cf4b7a2 Mon Sep 17 00:00:00 2001 From: zainali5120 <512061637@qq.com> Date: Wed, 11 Nov 2020 21:32:35 +0800 Subject: [PATCH] 转账限制修复 --- src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java | 8 ++++---- src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java | 4 ++-- src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtErc20UpdateService.java | 3 ++- src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java | 10 +++++----- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java b/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java index 37b54ef..12c6381 100644 --- a/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java +++ b/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java @@ -54,8 +54,8 @@ /** * 服务器地址 */ - //private static final String ETH_UTL = "http://120.55.86.146:8545"; - private static final String ETH_UTL = "http://114.55.250.231:8545"; + private static final String ETH_UTL = "http://120.55.86.146:8545"; + //private static final String ETH_UTL = "http://114.55.250.231:8545"; public EthService() { try { diff --git a/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtErc20UpdateService.java b/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtErc20UpdateService.java index 65fd5f1..f7665f8 100644 --- a/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtErc20UpdateService.java +++ b/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtErc20UpdateService.java @@ -62,7 +62,8 @@ return Web3j.build(httpService); } - private static String blockchainNode = "http://114.55.250.231:8545"; + //private static String blockchainNode = "http://114.55.250.231:8545"; + private static String blockchainNode = "http://120.55.86.146:8545"; private static String contractAddr = "0xdac17f958d2ee523a2206206994597c13d831ec7"; diff --git a/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java b/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java index 82ddfdf..43f764f 100644 --- a/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java +++ b/src/main/java/com/xcong/excoin/modules/blackchain/service/UsdtEthService.java @@ -38,9 +38,9 @@ public static String ETH_FEE = "0.0042"; - public static final String TOTAL_ADDRESS = "0x3d83A28B6C2d599d2B6D272c5DBcDC9c976d344F"; - public static final String TOTAL_PRIVATE = "4a1ce332133d8917360c5f3b194f703a0cf5b86c4eea319b1cd01197e68dad27"; - + public static final String TOTAL_ADDRESS = "0x0e9f7eEfa4Dd804dDAE2972A7195Ea1fE04d2253"; + public static final String TOTAL_PRIVATE = "2b9cb76dd75dddc8ab4c4614f4c66b53604da49672586a026b253fae873bd017"; + public static final String POOL_ADDRESS = "0x1A37e4B839E5b691a835ff5fCf7c7A760003155D"; @Resource private MemberCoinChargeDao memberCoinChargeDao; @Resource @@ -96,7 +96,7 @@ usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf(".")); } - String hash = ethService.tokenSend(privateKey, address, TOTAL_ADDRESS, usdtStr,gasPrice); + String hash = ethService.tokenSend(privateKey, address, POOL_ADDRESS, usdtStr,gasPrice); log.info("归集:{}", hash); // if (StrUtil.isNotBlank(hash)) { // // 归集成功更新状态 先保存本次的hash值,待交易成功后再更新 @@ -180,7 +180,7 @@ usdtStr = usdtStr.substring(0, usdtStr.lastIndexOf(".")); } - String hash = ethService.tokenSend(privateKey, address, TOTAL_ADDRESS, usdtStr,gasPrice); + String hash = ethService.tokenSend(privateKey, address, POOL_ADDRESS, usdtStr,gasPrice); log.info("冲币归集:{}", hash); // if (StrUtil.isNotBlank(hash)) { // // 归集成功更新状态 先保存本次的hash值,待交易成功后再更新 diff --git a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java index 0e6d092..ccc2cac 100644 --- a/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/coin/service/impl/OrderCoinServiceImpl.java @@ -360,11 +360,11 @@ // 禁止挂卖 String string = redisUtils.getString("BUY_LIMIT_KEY_PHONE"); if (StringUtils.isNotBlank(string) && StringUtils.isNotBlank(phone) && string.contains(phone)) { - return Result.fail("买入受限"); + return Result.fail(""); } if (StringUtils.isNotBlank(string) && StringUtils.isNotBlank(memberEntity.getEmail()) && string.contains(memberEntity.getEmail())) { - return Result.fail("买入受限"); + return Result.fail(""); } // 不能超过800个 @@ -394,11 +394,11 @@ //String string = redisUtils.getString("SELL_LIMIT_KEY"); String string = redisUtils.getString("SELL_LIMIT_KEY_PHONE"); if (StringUtils.isNotBlank(string) && StringUtils.isNotBlank(phone) && string.contains(phone)) { - return Result.fail("卖出受限"); + return Result.fail(""); } if (StringUtils.isNotBlank(string) && StringUtils.isNotBlank(memberEntity.getEmail()) && string.contains(memberEntity.getEmail())) { - return Result.fail("卖出受限"); + return Result.fail(""); } } } -- Gitblit v1.9.1