diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/ApiService.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/ApiService.java index 49d8394..dd1344e 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/ApiService.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/mservice/ApiService.java @@ -54,8 +54,8 @@ public class ApiService { try { // 发送请求 Request request = buildRequest(urlString); - logger.info("getBIPToken → 获取返回数据:{}", request); Response response = client.newCall(request).execute(); + logger.info("getBIPToken → 获取返回数据:{}", response); token = handleResponse(response); } catch (Exception e) { logger.error("getBIPToken → 请求失败: ", e); @@ -76,7 +76,7 @@ public class ApiService { private static String handleResponse(Response response) throws IOException { if (response.isSuccessful()) { - String responseBody = response.body().toString(); + String responseBody = response.body().string(); logger.info("handleResponse → 响应内容: {}", responseBody); JSONObject jsonObject = JSONObject.parseObject(responseBody); JSONObject data = jsonObject.getJSONObject("data");