From 5145886b08c5bbd66f8420df88350d6e6d1ef0f9 Mon Sep 17 00:00:00 2001 From: qiuyt Date: Mon, 3 Mar 2025 11:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=BF=E9=87=8C=E8=AE=BF=E9=97=AE=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=A7=BB=E5=8A=A8=E5=88=B0=E7=BB=9F=E4=B8=80=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E5=8C=85=E9=87=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/util/alihealth/AlihealthUtils.java | 3 --- .../util/alihealth/AlihealthYljgUtils.java | 21 ++++++------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/glxp/api/util/alihealth/AlihealthUtils.java b/src/main/java/com/glxp/api/util/alihealth/AlihealthUtils.java index f4a13a45..31438fdd 100644 --- a/src/main/java/com/glxp/api/util/alihealth/AlihealthUtils.java +++ b/src/main/java/com/glxp/api/util/alihealth/AlihealthUtils.java @@ -46,9 +46,6 @@ import java.util.*; @Component public class AlihealthUtils { @Resource - private AlihealthUtils alihealthUtils; - @Value("${ALIHEALTH_URL:http://gw.api.taobao.com/router/rest}") - private String alihealthUrl; private AlihealthClient alihealthClient; /** * 通过时间段批量查询入出库单信息 diff --git a/src/main/java/com/glxp/api/util/alihealth/AlihealthYljgUtils.java b/src/main/java/com/glxp/api/util/alihealth/AlihealthYljgUtils.java index 32d0fa7d..a55d4737 100644 --- a/src/main/java/com/glxp/api/util/alihealth/AlihealthYljgUtils.java +++ b/src/main/java/com/glxp/api/util/alihealth/AlihealthYljgUtils.java @@ -34,16 +34,10 @@ import java.util.Map; @Component @Slf4j public class AlihealthYljgUtils { - @Resource - private CustomerInfoService customerInfoService; - @Resource - private AlihealthUtils alihealthUtils; - @Resource - private RelCodeDetailService relCodeDetailService; - @Resource - private RelCodeBatchService relCodeBatchService; - @Value("${ALIHEALTH_URL:http://gw.api.taobao.com/router/rest}") - private String alihealthUrl; + + + + @Resource private AuthCompanyMapper authCompanyMapper; @Resource @@ -103,8 +97,7 @@ public class AlihealthYljgUtils { && org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret()) ) { try { - Map map = alihealthUtils.disposeSign(reqeust, authCompany.getAppSecret()); - String json = HttpUtil.get(alihealthUrl, map); + String json = alihealthClient.accessAliInterface(reqeust, authCompany.getAppSecret()); log.error("阿里单据上传返回参数===" + json); alihealthYljgUploadinoutbillResponse = JSONUtil.toBean(json, AlihealthYljgUploadinoutbillResponse.class); @@ -249,9 +242,7 @@ public class AlihealthYljgUtils { && org.apache.commons.lang3.StringUtils.isNotEmpty(authCompany.getAppSecret()) ) { try { - - Map map = alihealthUtils.disposeSign(reqeust, authCompany.getAppSecret()); - String json = HttpUtil.get(alihealthUrl, map); + String json = alihealthClient.accessAliInterface(reqeust, authCompany.getAppSecret()); alihealthYljgListupoutResponse = new AlihealthYljgListupoutResponse(json); } catch (Exception e) {