|
@ -17,20 +17,19 @@ public class EpmetUtils { |
|
|
/** |
|
|
/** |
|
|
* 应用id |
|
|
* 应用id |
|
|
*/ |
|
|
*/ |
|
|
public static String appId; |
|
|
public String appId; |
|
|
/** |
|
|
/** |
|
|
* 客户id |
|
|
* 客户id |
|
|
*/ |
|
|
*/ |
|
|
private static String customerId; |
|
|
private String customerId; |
|
|
/** |
|
|
/** |
|
|
* 秘钥 |
|
|
* 秘钥 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
private String secret; |
|
|
private static String secret; |
|
|
|
|
|
/** |
|
|
/** |
|
|
* 地址 |
|
|
* 地址 |
|
|
*/ |
|
|
*/ |
|
|
private static String commonUrl; |
|
|
private String commonUrl; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 生成token |
|
|
* 生成token |
|
@ -38,7 +37,7 @@ public class EpmetUtils { |
|
|
|
|
|
|
|
|
* @return String |
|
|
* @return String |
|
|
*/ |
|
|
*/ |
|
|
public static String getToken (){ |
|
|
public String getToken (){ |
|
|
Map<String,Object> claims = new HashMap<String,Object>(); |
|
|
Map<String,Object> claims = new HashMap<String,Object>(); |
|
|
claims.put("appId",appId); |
|
|
claims.put("appId",appId); |
|
|
claims.put("customerId",customerId); |
|
|
claims.put("customerId",customerId); |
|
@ -52,7 +51,7 @@ public class EpmetUtils { |
|
|
* @param param |
|
|
* @param param |
|
|
* @return String |
|
|
* @return String |
|
|
*/ |
|
|
*/ |
|
|
public static String httpPost(String url,String param) { |
|
|
public String httpPost(String url,String param) { |
|
|
|
|
|
|
|
|
String requestUrl = commonUrl + url; |
|
|
String requestUrl = commonUrl + url; |
|
|
HttpResponse response = null; |
|
|
HttpResponse response = null; |
|
|