Commit f89391bd authored by 张庆's avatar 张庆

新增挡板规则

parent 9c36f6fc
...@@ -33,14 +33,14 @@ public class AbcHttpClient { ...@@ -33,14 +33,14 @@ public class AbcHttpClient {
log.info("请求浙农加密数据:{}", JSON.toJSONString(request)); log.info("请求浙农加密数据:{}", JSON.toJSONString(request));
log.info("请求浙农url:{}", url); log.info("请求浙农url:{}", url);
HttpResponse response = HttpRequest.post(url).body(JSON.toJSONString(request)).setConnectionTimeout(5000).execute(); HttpResponse response = HttpRequest.post(url).body(JSON.toJSONString(request)).setConnectionTimeout(5000).execute();
log.info("浙农加密返回数据:{}", JSON.toJSONString(response.body())); log.info("请求浙农加密返回数据:{}", JSON.toJSONString(response.body()));
if (response.getStatus() == 200 && StringUtils.isNotBlank(response.body())) { if (response.getStatus() == 200 && StringUtils.isNotBlank(response.body())) {
final String body = response.body(); final String body = response.body();
JSONObject responseJson = JSONObject.parseObject(body); JSONObject responseJson = JSONObject.parseObject(body);
String content = responseJson.getString("content"); String content = responseJson.getString("content");
String sign = responseJson.getString("sign"); String sign = responseJson.getString("sign");
String responseParam = AbcRsaUtil.decodeParam(content, sign, privateKey, ypdPublicKey); String responseParam = AbcRsaUtil.decodeParam(content, sign, privateKey, ypdPublicKey);
log.info("浙农解密返回数据:{}", JSON.toJSONString(responseParam)); log.info("请求浙农解密返回数据:{}", JSON.toJSONString(responseParam));
return JSONObject.parseObject(responseParam, JsonResult.class); return JSONObject.parseObject(responseParam, JsonResult.class);
} else { } else {
throw new Exception("请求异常"); throw new Exception("请求异常");
......
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