Commit 1f53a90b by 陈浩建

临时代理

parent cb9bac7b
...@@ -534,7 +534,7 @@ public class DankuanController { ...@@ -534,7 +534,7 @@ public class DankuanController {
// 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay // 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay
doc = doc =
Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay") Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay")
// .proxy("172.18.101.170", 3128) .proxy("172.18.101.170", 3128)
.data(map) .data(map)
.timeout(20000) .timeout(20000)
.ignoreContentType(true) .ignoreContentType(true)
......
...@@ -527,7 +527,7 @@ public class RongHeController { ...@@ -527,7 +527,7 @@ public class RongHeController {
// 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay // 新环境正式地址 https://gzctpay.mini189.cn/pay/orderPay/order-pay
doc = doc =
Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay") Jsoup.connect("https://gzctpay.mini189.cn/pay/orderPay/order-pay")
// .proxy("172.18.101.170", 3128) .proxy("172.18.101.170", 3128)
.data(map) .data(map)
.timeout(20000) .timeout(20000)
.ignoreContentType(true) .ignoreContentType(true)
......
...@@ -266,13 +266,13 @@ public class IntelligenceSendOrder { ...@@ -266,13 +266,13 @@ public class IntelligenceSendOrder {
private JSONObject getQueryOrderInfo( private JSONObject getQueryOrderInfo(
String orderNum, String currentTimeStr, int count) throws Exception { String orderNum, String currentTimeStr, int count) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(50000) .setSocketTimeout(50000)
.setConnectTimeout(50000) .setConnectTimeout(50000)
.setConnectionRequestTimeout(50000) .setConnectionRequestTimeout(50000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -359,7 +359,7 @@ public class IntelligenceSendOrder { ...@@ -359,7 +359,7 @@ public class IntelligenceSendOrder {
int count) int count)
throws Exception { throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(50000) .setSocketTimeout(50000)
...@@ -722,13 +722,13 @@ public class IntelligenceSendOrder { ...@@ -722,13 +722,13 @@ public class IntelligenceSendOrder {
private JSONObject getProductId(String currentTimeStr, int count) throws Exception { private JSONObject getProductId(String currentTimeStr, int count) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数 Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(50000) .setSocketTimeout(50000)
.setConnectTimeout(50000) .setConnectTimeout(50000)
.setConnectionRequestTimeout(50000) .setConnectionRequestTimeout(50000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -806,13 +806,13 @@ public class IntelligenceSendOrder { ...@@ -806,13 +806,13 @@ public class IntelligenceSendOrder {
throws Exception { throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数 Map<String, String> signMap = new HashMap<String, String>(); // 待签名参数
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(500000) .setSocketTimeout(500000)
.setConnectTimeout(500000) .setConnectTimeout(500000)
.setConnectionRequestTimeout(500000) .setConnectionRequestTimeout(500000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -1050,13 +1050,13 @@ public class IntelligenceSendOrder { ...@@ -1050,13 +1050,13 @@ public class IntelligenceSendOrder {
} }
} }
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(500000) .setSocketTimeout(500000)
.setConnectTimeout(500000) .setConnectTimeout(500000)
.setConnectionRequestTimeout(500000) .setConnectionRequestTimeout(500000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
...@@ -1581,13 +1581,13 @@ public class IntelligenceSendOrder { ...@@ -1581,13 +1581,13 @@ public class IntelligenceSendOrder {
} }
// 3、提交订单到智能平台 // 3、提交订单到智能平台
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig defaultRequestConfig =
RequestConfig.custom() RequestConfig.custom()
.setSocketTimeout(500000) .setSocketTimeout(500000)
.setConnectTimeout(500000) .setConnectTimeout(500000)
.setConnectionRequestTimeout(500000) .setConnectionRequestTimeout(500000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = CloseableHttpClient httpclient =
HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
......
...@@ -79,11 +79,11 @@ public class HttpUtil { ...@@ -79,11 +79,11 @@ public class HttpUtil {
} }
request.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8")); request.setEntity(new UrlEncodedFormEntity(nvps, "UTF-8"));
/** 超时时间 5s 重试次数 3 */ /** 超时时间 5s 重试次数 3 */
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000).setSocketTimeout(20000)
.build();
// RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000).setSocketTimeout(20000) // RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000).setSocketTimeout(20000)
// .setProxy(proxy).build(); // .build();
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(20000).setSocketTimeout(20000)
.setProxy(proxy).build();
request.setConfig(requestConfig); request.setConfig(requestConfig);
// 发�?�请�? // 发�?�请�?
log.info(request.getMethod()); log.info(request.getMethod());
......
...@@ -108,11 +108,11 @@ public class HTTPSClient { ...@@ -108,11 +108,11 @@ public class HTTPSClient {
HttpResponse res; HttpResponse res;
try { try {
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom(). RequestConfig requestConfig = RequestConfig.custom().
setSocketTimeout(200000). setSocketTimeout(200000).
setConnectTimeout(200000) setConnectTimeout(200000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
...@@ -159,11 +159,11 @@ public class HTTPSClient { ...@@ -159,11 +159,11 @@ public class HTTPSClient {
httpPost.setEntity(s); httpPost.setEntity(s);
HttpResponse res; HttpResponse res;
try { try {
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom() RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(200000) .setSocketTimeout(200000)
.setConnectTimeout(200000) .setConnectTimeout(200000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
...@@ -335,11 +335,11 @@ public class HTTPSClient { ...@@ -335,11 +335,11 @@ public class HTTPSClient {
CloseableHttpClient httpClient = HttpClients.createDefault(); CloseableHttpClient httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
try { try {
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom() RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(200000) .setSocketTimeout(200000)
.setConnectTimeout(200000) .setConnectTimeout(200000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
CloseableHttpResponse result = httpClient.execute(httpPost); CloseableHttpResponse result = httpClient.execute(httpPost);
......
...@@ -174,11 +174,11 @@ public class HttpHelper { ...@@ -174,11 +174,11 @@ public class HttpHelper {
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
try { try {
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig.custom() RequestConfig requestConfig = RequestConfig.custom()
.setSocketTimeout(200000). .setSocketTimeout(200000).
setConnectTimeout(200000) setConnectTimeout(200000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
...@@ -218,11 +218,11 @@ public class HttpHelper { ...@@ -218,11 +218,11 @@ public class HttpHelper {
HttpResponse res; HttpResponse res;
try { try {
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig requestConfig = RequestConfig RequestConfig requestConfig = RequestConfig
.custom().setSocketTimeout(200000) .custom().setSocketTimeout(200000)
.setConnectTimeout(200000) .setConnectTimeout(200000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
......
...@@ -247,10 +247,10 @@ public class StartSelectController { ...@@ -247,10 +247,10 @@ public class StartSelectController {
private JSONObject getOrderBYSRHInfo(Map<String, String[]> parameterMap, String currentTimeStr, String productId, Map<String,String> objectMap) throws Exception { private JSONObject getOrderBYSRHInfo(Map<String, String[]> parameterMap, String currentTimeStr, String productId, Map<String,String> objectMap) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000)
.setConnectTimeout(500000).setConnectionRequestTimeout(500000) .setConnectTimeout(500000).setConnectionRequestTimeout(500000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig) CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig)
...@@ -669,10 +669,10 @@ public class StartSelectController { ...@@ -669,10 +669,10 @@ public class StartSelectController {
private JSONObject getSaleId(String productId, String currentTimeStr) throws Exception { private JSONObject getSaleId(String productId, String currentTimeStr) throws Exception {
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
Map<String, String> signMap = new HashMap<String, String>();//待签名参数 Map<String, String> signMap = new HashMap<String, String>();//待签名参数
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(500000)
.setConnectTimeout(500000).setConnectionRequestTimeout(500000) .setConnectTimeout(500000).setConnectionRequestTimeout(500000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig) CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig)
.build(); .build();
......
...@@ -27,6 +27,7 @@ import net.sf.json.JSONArray; ...@@ -27,6 +27,7 @@ import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.client.config.RequestConfig; import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPost;
...@@ -1775,10 +1776,10 @@ public class OrderController extends BaseController { ...@@ -1775,10 +1776,10 @@ public class OrderController extends BaseController {
// 保存卡品认证信息 // 保存卡品认证信息
public String sendAitransOrder(Map<String, Object> map, int count) throws NoSuchAlgorithmException, UnsupportedEncodingException { public String sendAitransOrder(Map<String, Object> map, int count) throws NoSuchAlgorithmException, UnsupportedEncodingException {
// HttpHost proxy = new HttpHost("172.18.101.170", 3128); HttpHost proxy = new HttpHost("172.18.101.170", 3128);
RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(600000).setConnectTimeout(600000) RequestConfig defaultRequestConfig = RequestConfig.custom().setSocketTimeout(600000).setConnectTimeout(600000)
.setConnectionRequestTimeout(600000) .setConnectionRequestTimeout(600000)
// .setProxy(proxy) .setProxy(proxy)
.build(); .build();
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build(); CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(defaultRequestConfig).build();
......
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