Commit 296878ee authored by 张永's avatar 张永

去掉system.out.prinltn

parent 770e81c5
...@@ -144,13 +144,13 @@ public class HttpsUtil { ...@@ -144,13 +144,13 @@ public class HttpsUtil {
} }
public static String post(String requestUrl, Map<String, Object> parameters, Map<String, String> headers, SSLSocketFactory sslSocketFactory, Proxy proxy) throws HttpRequestException { public static String post(String requestUrl, Map<String, Object> parameters, Map<String, String> headers, SSLSocketFactory sslSocketFactory, Proxy proxy) throws HttpRequestException {
System.out.println("----"+HttpUtil.toQueryString(parameters));
return HttpsUtil.post(requestUrl, HttpUtil.toQueryString(parameters), headers, sslSocketFactory, proxy); return HttpsUtil.post(requestUrl, HttpUtil.toQueryString(parameters), headers, sslSocketFactory, proxy);
} }
public static String post(String requestUrl, String text, Map<String, String> headers, SSLSocketFactory sslSocketFactory, Proxy proxy) throws HttpRequestException { public static String post(String requestUrl, String text, Map<String, String> headers, SSLSocketFactory sslSocketFactory, Proxy proxy) throws HttpRequestException {
HttpsURLConnection connection = null; HttpsURLConnection connection = null;
try { try {
System.out.println("requestUrl--"+requestUrl);
byte[] bytes = text == null ? new byte[0] : text.getBytes(); byte[] bytes = text == null ? new byte[0] : text.getBytes();
URL POST_URL = new URL(requestUrl); URL POST_URL = new URL(requestUrl);
connection = (HttpsURLConnection) (proxy == null ? POST_URL.openConnection() : POST_URL.openConnection(proxy)); connection = (HttpsURLConnection) (proxy == null ? POST_URL.openConnection() : POST_URL.openConnection(proxy));
......
...@@ -26,7 +26,6 @@ public class MD5Util { ...@@ -26,7 +26,6 @@ public class MD5Util {
String k = (String)entry.getKey(); String k = (String)entry.getKey();
Object v = entry.getValue(); Object v = entry.getValue();
if(null != v && !"".equals(v)&& !"sign".equals(k) ) { if(null != v && !"".equals(v)&& !"sign".equals(k) ) {
System.out.println(k+"---"+v);
sb.append(k + "=" + v + "&"); sb.append(k + "=" + v + "&");
} }
} }
...@@ -78,12 +77,12 @@ public class MD5Util { ...@@ -78,12 +77,12 @@ public class MD5Util {
SortedMap<Object,Object> parameters = new TreeMap<Object,Object> (); SortedMap<Object,Object> parameters = new TreeMap<Object,Object> ();
parameters.put("AppID", "E34EAAAFCC714ABA"); parameters.put("AppID", "201909230001");
parameters.put("AppKey", "F7FC3382E34EAAAFCC714ABA172FD00C"); parameters.put("AppKey", "d0dd209596922ae29630ded8ba46f15f");
parameters.put("LangID", "936"); parameters.put("ServerID", "ThirdAgentOnStockAdd");
parameters.put("ServerID", "Scan_CheckMemPointCoupon"); parameters.put("ServerTypeID", 3);
parameters.put("ServerTypeID", 1); parameters.put("timestamp", "1569310600084");
parameters.put("timestamp", "1560474936524"); parameters.put("data", "{\"dataList_0\": [{\"AgentContractNO\": \"600022001\",\"AgentID\": 22,\"WarehouseNO\": \"002\"}],\"dataList_1\": [{\"AgentContractNO\": \"600022001\",\"GoodsID\": 22,\"StockQty\": \"002\",\"CostPrice\":0 },{\"AgentContractNO\": \"600022001\",\"GoodsID\": 22,\"StockQty\": \"002\",\"CostPrice\":0}]}");
System.out.println(parameters); System.out.println(parameters);
String createSign = MD5Util.createSign("UTF-8", parameters); String createSign = MD5Util.createSign("UTF-8", parameters);
System.out.println(createSign); System.out.println(createSign);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment