diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/common/ApiEntity.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/common/ApiEntity.java index aef4957..658bbc7 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/common/ApiEntity.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/common/ApiEntity.java @@ -70,6 +70,17 @@ public class ApiEntity { this.requestBody = requestBody; } + @Override + public String toString() { + return "ApiEntity{" + + "URL='" + URL + '\'' + + ", method='" + method + '\'' + + ", queryParams=" + queryParams + + ", headers=" + headers + + ", requestBody=" + requestBody + + '}'; + } + public ApiEntity() { } diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java index 2b6737c..648c97c 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/ApiMappingBillPlugin.java @@ -230,6 +230,7 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin { if ("shkd_testapi".equals(itemKey)) { //域名 String domainName = dataEntity.getString("shkd_domainname"); + //url String url = dataEntity.getString("shkd_url"); ApiEntity apiEntity = new ApiEntity(); apiEntity.setURL(domainName + url); @@ -239,10 +240,12 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin { apiEntity.setHeaders(headMap); Map paramsMap = new HashMap<>(); Map resultMap = ApiService.getBIPToken(domainName); + logger.info("getBIPToken → 获取返回token:{}", resultMap.get("token")); paramsMap.put("access_token", resultMap.get("token")); apiEntity.setQueryParams(paramsMap); apiEntity.setRequestBody(codeEdit.getText()); JSONObject responseBody = ApiEntity.getResponseBody(apiEntity); + logger.info("调用接口实体对象apiEntity → 返回结果:{}", apiEntity); this.getView().showTipNotification("返回结果:" + responseBody.toJSONString()); } }