From 1e0ffb4026328506fa3fe77fc6d9554dc667b681 Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期五, 08 十一月 2024 16:59:02 +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