From bf2e8786dca09eb69ab4acf86b497dd3857603a0 Mon Sep 17 00:00:00 2001 From: wxz Date: Fri, 26 Feb 2021 15:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90sso=E7=99=BB=E5=BD=95=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9third=E6=9C=8D=E5=8A=A1=E7=9A=84=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E7=9A=84=E5=86=99=E6=B3=95=EF=BC=8C=E7=94=B1=E7=A1=AC?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E6=94=B9=E4=B8=BA=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-auth/pom.xml | 8 ++++++++ .../main/java/com/epmet/service/impl/SsoServiceImpl.java | 6 +++++- epmet-auth/src/main/resources/bootstrap.yml | 7 ++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/epmet-auth/pom.xml b/epmet-auth/pom.xml index 74e4e92ab9..eaa22e7557 100644 --- a/epmet-auth/pom.xml +++ b/epmet-auth/pom.xml @@ -207,6 +207,8 @@ http://101.206.141.219:21006 xSMONWwP UUCnxLyXiB4eBF4p + + https://epmet-cloud.elinkservice.cn @@ -260,6 +262,8 @@ http://101.206.141.219:21006 xSMONWwP UUCnxLyXiB4eBF4p + + https://epmet-cloud.elinkservice.cn @@ -308,6 +312,8 @@ http://101.206.141.219:21006 xSMONWwP UUCnxLyXiB4eBF4p + + https://epmet-cloud.elinkservice.cn @@ -356,6 +362,8 @@ https://jcytc.lzjczl.com:21009 2cy0a9lA 6hU3PQgxLcXr27SE + + https://epmet-cloud.elinkservice.cn diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java index bfee9177ba..fa58ce86fa 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java @@ -26,6 +26,7 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -66,6 +67,9 @@ public class SsoServiceImpl implements SsoService { @Autowired private CpUserDetailRedis cpUserDetailRedis; + @Value("${epmet.third.urlPrefix}") + private String epmetThirdUrlPrefix; + /** * @Description 0、入口:得到token * @Param formDTO @@ -174,7 +178,7 @@ public class SsoServiceImpl implements SsoService { */ public String getCustomerId(String appId){ JSONObject jsonObject = new JSONObject(); - String customerMsgUrl = "https://epmet-cloud.elinkservice.cn/api/third/customermp/getcustomermsg/"; + String customerMsgUrl = epmetThirdUrlPrefix + "/api/third/customermp/getcustomermsg/"; String data = HttpClientManager.getInstance().sendPostByJSON(customerMsgUrl + appId, JSON.toJSONString(jsonObject)).getData(); log.info("调用third服务,根据appId查询客户信息:httpclient->url:" + customerMsgUrl + ",结果->" + data); JSONObject toResult = JSON.parseObject(data); diff --git a/epmet-auth/src/main/resources/bootstrap.yml b/epmet-auth/src/main/resources/bootstrap.yml index 35d3f0e1f7..02f3a33105 100644 --- a/epmet-auth/src/main/resources/bootstrap.yml +++ b/epmet-auth/src/main/resources/bootstrap.yml @@ -142,4 +142,9 @@ thirdplat: jcetGend: domain: @thirdplat.jcet.g.domain@ appkey: @thirdplat.jcet.g.appkey@ - appsecret: @thirdplat.jcet.g.appsecret@ \ No newline at end of file + appsecret: @thirdplat.jcet.g.appsecret@ + +epmet: +# third服务的相关配置 + third: + urlPrefix: @epmet.third.urlprefix@ \ No newline at end of file