|
@@ -23,7 +23,6 @@ import java.io.InputStreamReader;
|
|
|
import java.io.PrintWriter;
|
|
|
import java.net.URI;
|
|
|
import java.net.URL;
|
|
|
-import java.net.URLDecoder;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.sql.Connection;
|
|
|
import java.sql.ResultSet;
|
|
@@ -32,16 +31,14 @@ import java.sql.Statement;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
-import static javax.xml.transform.OutputKeys.ENCODING;
|
|
|
-
|
|
|
|
|
|
* @author kl
|
|
|
* @email koul@usoftchina.com
|
|
|
* @date 2020-01-02 8:53
|
|
|
*/
|
|
|
public class HttpClient {
|
|
|
- private static final String testUrl = "prm-sit.goodix.com";
|
|
|
- private static final String url = "prm.goodix.com";
|
|
|
+ private static final String testUrl = "https://api-uat.goodix.com/prm-uat/goodix/agent/aDelivery/agentAutoDelivery";
|
|
|
+ private static final String url = "https://api.goodix.com/prm-api/goodix/agent/aDelivery/agentAutoDelivery";
|
|
|
private static final String serviceUrl = "/goodix/agent/aDelivery/agentAutoDelivery";
|
|
|
|
|
|
|
|
@@ -54,9 +51,13 @@ public class HttpClient {
|
|
|
|
|
|
|
|
|
|
|
|
- sendPost("HUAXK_P", "SZhuaxinke", "HXK1234");
|
|
|
- sendPost("HXK_SU_P", "SZhuaxinke", "HXK1234");
|
|
|
- sendPost("LHWX_HK_P", "XGlianheWX", "HXK1234");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ sendPost("HUAXK_P", "SZHuaXK_I", "SZHuaXK_I*");
|
|
|
+ sendPost("HXK_SU_P", "SZHuaXK_I", "SZHuaXK_I*");
|
|
|
+ sendPost("LHWX_HK_P", "XGlhwx_I", "XGlhwx_I**");
|
|
|
}
|
|
|
|
|
|
private static List<Map<String, String>> getDate(Statement statement, String sob) {
|
|
@@ -308,7 +309,7 @@ public class HttpClient {
|
|
|
for (NameValuePair nv:params) {
|
|
|
s = s +nv.getName()+"="+URLEncoder.encode(nv.getValue(), "UTF-8") + "&" ;
|
|
|
}
|
|
|
- String ss = ur + "?" +s.substring(0,s.length()-1);
|
|
|
+ String ss = url + "?" +s.substring(0,s.length()-1);
|
|
|
URL realUrl = new URL(ss);
|
|
|
HttpsURLConnection conn = (HttpsURLConnection) realUrl.openConnection();
|
|
|
conn.setSSLSocketFactory(ssf);
|