| | |
| | | package com.xcong.excoin.modules.blackchain.service; |
| | | |
| | | import cn.hutool.core.math.MathUtil; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("num", num); |
| | | String param = JSON.toJSONString(map); |
| | | return postForEntity(url, param).getBody(); |
| | | // return postForEntity(url, param).getBody(); |
| | | return postForEntityHuTool(url, param).body(); |
| | | } |
| | | |
| | | |
| | |
| | | return result; |
| | | } |
| | | |
| | | private static HttpResponse postForEntityHuTool(String url, String param) { |
| | | System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2"); |
| | | return HttpUtil.createPost(url).body(param) |
| | | .timeout(20000).contentType("application/json") |
| | | .header("TRON-PRO-API-KEY", Trc20Service.API_KEY) |
| | | .execute(); |
| | | } |
| | | |
| | | /** |
| | | * 比对本地地址 同步充值USDT-TRC20 |
| | | * |