xiaoyong931011
2021-01-15 292a4634d9c52ce193eca9de356d65960bdc35f4
src/main/java/com/xcong/excoin/utils/TRC20ApiUtils.java
@@ -16,8 +16,9 @@
 **/
@Slf4j
public class TRC20ApiUtils {
    private static final String TRC20_API = "http://27.50.59.35:5002/";
    private static final String SIGN_STR = "w@a!llokmet";
    private static final String TRC20_API = "http://101.132.189.0:5002/";
  //public static final String SIGN_STR = "w@a!llokmet";
    public static final String SIGN_STR = "51F40C224CACE2204A998DAB85D5618EE4F3";
    /**
     * 提币申请
@@ -55,6 +56,7 @@
    }
    public static void createWallet(Long userId, String userName, String symbol, String address) {
        log.info("创建钱包开始:{}", System.currentTimeMillis());
        Map<String, Object> param = new HashMap<>();
        param.put("userId", userId);
        param.put("symbol", symbol);
@@ -63,6 +65,7 @@
        param.put("accountFlag", 1);
        param.put("sign", SecureUtil.md5(userId + symbol + address + SIGN_STR));
        String body = HttpRequest.post(TRC20_API + "account/created").body(JSONObject.toJSONString(param)).execute().body();
        log.info("创建钱包结束:{}", System.currentTimeMillis());
        if (!"200".equals(JSONObject.parseObject(body).getString("code"))) {
            log.error("TRC20创建钱包失败:{}, {}, {}", userId, address, body);
            throw new GlobalException("获取订单失败");