|
@@ -32,6 +32,9 @@ public class TicketApi {
|
|
|
@Value("${dfy.mp.apikey}")
|
|
|
private String apiKey;
|
|
|
|
|
|
+ @Value("${dfy.proxyHost}")
|
|
|
+ private String proxyHost ;
|
|
|
+
|
|
|
public TicketApi(ApiLogDao apiLogDao) {
|
|
|
this.apiLogDao = apiLogDao;
|
|
|
}
|
|
@@ -126,10 +129,10 @@ public class TicketApi {
|
|
|
String signature = Signature.getSignature(JSONUtil.parseObj(dfyRequestBase), secretKey);
|
|
|
dfyRequestBase.setSign(signature);
|
|
|
|
|
|
-// HttpRequest httpRequest = HttpRequest.post(host + url);
|
|
|
-// String post = httpRequest.setHttpProxy("8.137.106.193", 3128)
|
|
|
-// .timeout(-1).body(JSONUtil.toJsonStr(dfyRequestBase)).execute().body();
|
|
|
- String post = HttpUtil.post(host + url, JSONUtil.toJsonStr(dfyRequestBase));
|
|
|
+ HttpRequest httpRequest = HttpRequest.post(host + url);
|
|
|
+ String post = httpRequest.setHttpProxy(proxyHost, 3128)
|
|
|
+ .timeout(-1).body(JSONUtil.toJsonStr(dfyRequestBase)).execute().body();
|
|
|
+// String post = HttpUtil.post(host + url, JSONUtil.toJsonStr(dfyRequestBase));
|
|
|
ApiLog apiLog = new ApiLog();
|
|
|
apiLog.setSystem("difengyun");
|
|
|
apiLog.setService(url);
|