From 973032dc914e84cec5ab18c4c23784a77599b2bc Mon Sep 17 00:00:00 2001
From: hjg <hjg@123.com>
Date: 星期五, 17 一月 2025 16:53:48 +0800
Subject: [PATCH] Revert "CRM>分单系统销售退货单同步"

---
 JavaSource/com/mandi/common/Wxhtmethod.java |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/JavaSource/com/mandi/common/Wxhtmethod.java b/JavaSource/com/mandi/common/Wxhtmethod.java
index 3023f90..5549a56 100644
--- a/JavaSource/com/mandi/common/Wxhtmethod.java
+++ b/JavaSource/com/mandi/common/Wxhtmethod.java
@@ -12,6 +12,7 @@
 
 import org.apache.http.HttpEntity;
 import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
@@ -112,6 +113,8 @@
 		 JsonObject jo=new JsonObject();
 		 CloseableHttpClient httpclient = HttpClients.createDefault();
 		 HttpPost hp=new HttpPost(url);
+		RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build();
+		hp.setConfig(config);
 		 String re=null;
 		 List<NameValuePair> fps=new ArrayList<NameValuePair>();
 		 UrlEncodedFormEntity entity=null;
@@ -176,6 +179,8 @@
 //			 s.setContentEncoding("UTF-8");
 //			 hp.setEntity(s);
 			 HttpPost hp=new HttpPost(url);
+			 RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build();
+			 hp.setConfig(config);
 			 StringEntity se=new StringEntity(jsonStr, Charset.forName("utf-8"));
 			 se.setContentType("application/json");
 			 hp.setEntity(se);
@@ -276,6 +281,8 @@
 	{
 		 CloseableHttpClient httpclient = HttpClients.createDefault();
 		 HttpPost hp=new HttpPost(url);
+		RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build();
+		hp.setConfig(config);
 		 String re=null;
 		 List<NameValuePair> fps=new ArrayList<NameValuePair>();
 		 UrlEncodedFormEntity entity=null;
@@ -314,6 +321,8 @@
 		 CloseableHttpClient httpclient=nssl();
 		// CloseableHttpClient httpclient = HttpClients.createDefault();
 		 HttpPost hp=new HttpPost(url);
+		RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build();
+		hp.setConfig(config);
 		 String re=null;
 		 List<NameValuePair> fps=new ArrayList<NameValuePair>();
 		 UrlEncodedFormEntity entity=null;
@@ -352,6 +361,8 @@
 	{
 		 CloseableHttpClient httpclient=nssl();
 		 HttpPost hp=new HttpPost(url);
+		RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build();
+		hp.setConfig(config);
 		 MultipartEntityBuilder me=MultipartEntityBuilder.create();
 		 me.addBinaryBody(upfilename, file);
 		 if(params!=null)
@@ -386,6 +397,8 @@
 	{
 		 CloseableHttpClient httpclient=nssl();
 		 HttpPost hp=new HttpPost(url);
+		RequestConfig config = RequestConfig.custom().setConnectTimeout(10000).setSocketTimeout(30000).build();
+		hp.setConfig(config);
 		 StringEntity se=new StringEntity(body, Charset.forName("utf-8"));
 		 hp.setEntity(se);
 		 String re=null;

--
Gitblit v1.9.3