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(() -> {