From be16384de2a6cd2cd78e090abf5535a846be8b47 Mon Sep 17 00:00:00 2001 From: Owen <595466820@qq.com> Date: Tue, 4 Mar 2025 15:48:27 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=E6=B9=96=E5=8D=97=E7=94=B5=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/module/haoka/api/hunandianxin/HuNanDXApi.java | 8 ++++---- .../service/api/strategy/HuNanDxApiDealStrategy.java | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/api/hunandianxin/HuNanDXApi.java b/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/api/hunandianxin/HuNanDXApi.java index 490c2e84e8..85023c2ab3 100644 --- a/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/api/hunandianxin/HuNanDXApi.java +++ b/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/api/hunandianxin/HuNanDXApi.java @@ -152,14 +152,14 @@ public class HuNanDXApi { try (CloseableHttpClient httpClient = createHttpClientIgnoreSSL()) { String baseUrl = config.getBaseUrl(); logVO.setUrl(baseUrl); - logVO.setParam(JSON.toJSONString(requestBody)); + String jsonString = JSON.toJSONString(requestBody); + logVO.setParam(jsonString); HttpPost httpPost = new HttpPost(baseUrl); httpPost.setHeader("Content-Type", "application/json; charset=UTF-8"); - httpPost.setEntity(new StringEntity(new ObjectMapper().writeValueAsString(requestBody))); - + httpPost.setEntity(new StringEntity(jsonString,"utf-8")); CloseableHttpResponse response = httpClient.execute(httpPost); - String string = EntityUtils.toString(response.getEntity()); + String string = EntityUtils.toString(response.getEntity(),"utf-8"); logVO.setResponse(JSON.toJSONString(string)); httpClient.close(); return string; diff --git a/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/api/strategy/HuNanDxApiDealStrategy.java b/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/api/strategy/HuNanDxApiDealStrategy.java index 56a3526c09..12d308f171 100644 --- a/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/api/strategy/HuNanDxApiDealStrategy.java +++ b/yudao-module-haoka/yudao-module-haoka-biz/src/main/java/cn/iocoder/yudao/module/haoka/service/api/strategy/HuNanDxApiDealStrategy.java @@ -124,7 +124,8 @@ public class HuNanDxApiDealStrategy implements ApiDealStrategy { } - HaiNanDxInfo.ResponseInfo checked = apiHuNanDXService.checkInternetCardQualification(logVO, haokaSuperiorApiId,cardQualificationParam); + HaiNanDxInfo.ResponseInfo checked = + apiHuNanDXService.checkInternetCardQualification(logVO, haokaSuperiorApiId,cardQualificationParam); OrderApiCreateResp superApiResponse = new OrderApiCreateResp(); if (!"00000".equals(checked.getRes_code())) { logVO.setResponse(JSON.toJSONString(checked));