diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/SpecialCustomerOrgConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/SpecialCustomerOrgConstant.java index 05058b1211..e65434f0bd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/SpecialCustomerOrgConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/SpecialCustomerOrgConstant.java @@ -18,14 +18,19 @@ public interface SpecialCustomerOrgConstant { */ String test="6e511da6816e53af4cda952365a26eb9"; - // /** - // * 榆山生产客户id - // */ - // String YUSHAN_PROD_CUSTOMER_ID = "46c55cb862d6d5e6d05d2ab61a1cc07e"; - // - // /** - // * 榆山测试客户id - // */ - // String YUSHAN_TEST_CUSTOMER_ID = "a4bbf298d8e427844038cee466f022ef"; + /** + * 榆山生产客户id + */ + String YUSHAN_PROD_CUSTOMER_ID = "46c55cb862d6d5e6d05d2ab61a1cc07e"; + + /** + * 榆山测试客户id + */ + String YUSHAN_TEST_CUSTOMER_ID = "a4bbf298d8e427844038cee466f022ef"; + + /** + * 生产平阴客户id + */ + String PING_YIN_CUSTOMER_ID="6f203e30de1a65aab7e69c058826cd80"; } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java index 9779c6d990..1a714fdffd 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/YuShanSysApiService.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.constant.SpecialCustomerOrgConstant; import com.epmet.commons.tools.dto.form.UpdateUserPointsFormDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.enums.ExternalApiEnum; import com.epmet.commons.tools.enums.ExternalServerEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -39,7 +40,16 @@ public class YuShanSysApiService { if (StringUtils.isBlank(customerId) || CollectionUtils.isEmpty(paramList)) { throw new RenException("参数错误"); } - String serverUrl = ExternalServerEnum.getUrl(customerId); + if (!SpecialCustomerOrgConstant.PING_YIN_CUSTOMER_ID.equals(customerId)) { + return; + } + String serverUrl = null; + EnvEnum currentEnv = EnvEnum.getCurrentEnv(); + if (EnvEnum.PROD.getCode().equals(currentEnv.getCode())) { + serverUrl = ExternalServerEnum.getUrl(SpecialCustomerOrgConstant.YUSHAN_PROD_CUSTOMER_ID); + } else if (EnvEnum.TEST.getCode().equals(currentEnv.getCode()) || EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())) { + serverUrl = ExternalServerEnum.getUrl(SpecialCustomerOrgConstant.YUSHAN_TEST_CUSTOMER_ID); + } if (StringUtils.isBlank(serverUrl)) { log.warn(String.format("当前客户:%s,未配置服务器地址", customerId)); return;