From 40776beb224799d5dd51ca1d92ea2f5e883ff4f5 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 02 八月 2024 11:30:18 +0800
Subject: [PATCH] 增加增城东部粮油中心库配置信息
---
src/main/java/com/fzzy/push/shjdjw2023/Shjdjw2023HttpClientUtil.java | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/fzzy/push/shjdjw2023/Shjdjw2023HttpClientUtil.java b/src/main/java/com/fzzy/push/shjdjw2023/Shjdjw2023HttpClientUtil.java
index e33305d..438c5b2 100644
--- a/src/main/java/com/fzzy/push/shjdjw2023/Shjdjw2023HttpClientUtil.java
+++ b/src/main/java/com/fzzy/push/shjdjw2023/Shjdjw2023HttpClientUtil.java
@@ -32,7 +32,7 @@
HttpURLConnection connection = null;
OutputStream outputStream = null;
String rs = "";
- ShjdjwRespDto responseDto;
+ ShjdjwRespDto responseDto = null;
try {
connection = (HttpURLConnection) urls.openConnection();
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
@@ -68,12 +68,17 @@
rs = null;
return new ShjdjwRespDto(99,e.getMessage());
}
- log.info("---------鎺ュ彛杩斿洖锛�" + rs +"---------");
- if(StringUtils.isEmpty(rs)){
+ if(StringUtils.isNotEmpty(rs)){
+ rs = rs.replaceAll("\"", "");
+ log.info("---------鎺ュ彛杩斿洖锛岀鏂囷細" + rs +"---------");
+ rs = AESUtils.decrypt(rs, apiConfs.getPublicKey());
+ log.info("---------鎺ュ彛杩斿洖锛岃В鏋愬悗锛�" + rs +"---------");
+ responseDto = JSON.parseObject(rs, ShjdjwRespDto.class);
+ }
+ if(responseDto == null ) {
return new ShjdjwRespDto(99,"鎺ュ彛璇锋眰鍙戠敓鏈煡閿欒");
}
-// responseDto = JSON.parseObject(rs, ShjdjwRespDto.class);
- return new ShjdjwRespDto(1,"鎺ュ彛璇锋眰鍙戠敓鏈煡閿欒");
+ return responseDto;
} finally {
try {
outputStream.close();
--
Gitblit v1.9.3