From 447ce3f87422abb101862b2e02489393618a4351 Mon Sep 17 00:00:00 2001 From: zhangzq Date: Tue, 14 May 2024 16:03:38 +0800 Subject: [PATCH] =?UTF-8?q?add:=E4=B8=89=E7=BA=BF=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/nl/common/utils/AcsUtil.java | 10 ++++++++-- .../main/java/org/nl/modules/system/util/CodeUtil.java | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/common/utils/AcsUtil.java b/mes/hd/nladmin-system/src/main/java/org/nl/common/utils/AcsUtil.java index d86ec196..8531bfe5 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/common/utils/AcsUtil.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/common/utils/AcsUtil.java @@ -6,6 +6,7 @@ import cn.hutool.http.HttpRequest; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.nl.common.enums.StatusEnum; import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.wql.core.bean.WQLObject; @@ -34,9 +35,14 @@ public class AcsUtil { result.put("data", new JSONObject()); return result; } - + String acsParam = "acs_url"; + JSONObject jsonObject = list.getJSONObject(0); + String acs = jsonObject.getString("acs"); + if (StringUtils.isNotEmpty(acs)){ + acsParam=acs; + } //ACS地址:127.0.0.1:8010 - String acsUrl = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("acs_url").getValue(); + String acsUrl = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode(acsParam).getValue(); String url = acsUrl + api; try { diff --git a/mes/hd/nladmin-system/src/main/java/org/nl/modules/system/util/CodeUtil.java b/mes/hd/nladmin-system/src/main/java/org/nl/modules/system/util/CodeUtil.java index 961fbbc1..847c93dc 100644 --- a/mes/hd/nladmin-system/src/main/java/org/nl/modules/system/util/CodeUtil.java +++ b/mes/hd/nladmin-system/src/main/java/org/nl/modules/system/util/CodeUtil.java @@ -12,7 +12,7 @@ public class CodeUtil{ final String[] code = {""}; HashMap map = new HashMap<>(); map.put("flag", "1"); - map.put("code", ruleCode);d + map.put("code", ruleCode); GenCodeService service = SpringContextHolder.getBean(GenCodeServiceImpl.class); String codeId = service.queryIdByCode(ruleCode); RedissonUtils.lock(() -> {