Browse Source

Merge branch 'dev' into dev_temp

# Conflicts:
#	epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java
#	epmet-auth/src/main/resources/bootstrap.yml
#	epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java
#	epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java
#	epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java
dev_shibei_match
wxz 5 years ago
parent
commit
867fd7da91
  1. 2
      epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java
  2. 17
      epmet-auth/src/main/resources/bootstrap.yml
  3. 2
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java
  4. 19
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java
  5. 5
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

2
epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java

@ -144,7 +144,7 @@ public class SsoServiceImpl implements SsoService {
ThirdPlatformEnum platformEnum = ThirdPlatformEnum.getEnum(formDTO.getPlatform()); ThirdPlatformEnum platformEnum = ThirdPlatformEnum.getEnum(formDTO.getPlatform());
String apiService = platformEnum.getApiService(); String apiService = platformEnum.getApiService();
AbstractApiService apiServiceImpl = (AbstractApiService) SpringContextUtils.getBean(apiService); AbstractApiService apiServiceImpl = (AbstractApiService) SpringContextUtils.getBean(apiService);
thirdUser = apiServiceImpl.getCUserInfoByTicket(formDTO.getThirdToken()); thirdUser = apiServiceImpl.getGUserInfoBySSOToken(formDTO.getThirdToken());
} catch (RenException e) { } catch (RenException e) {
throw new RenException(e.getCode(), e.getMessage()); throw new RenException(e.getCode(), e.getMessage());
} catch (Exception e) { } catch (Exception e) {

17
epmet-auth/src/main/resources/bootstrap.yml

@ -136,12 +136,21 @@ shutdown:
# 调用第三方平台相关参数 # 调用第三方平台相关参数
thirdplat: thirdplat:
jcet: jcetCend:
domain: @thirdplat.jcet.domain@ domain: @thirdplat.jcet.c.domain@
appkey: @thirdplat.jcet.appkey@ appkey: @thirdplat.jcet.c.appkey@
appsecret: @thirdplat.jcet.appsecret@ appsecret: @thirdplat.jcet.c.appsecret@
jcetGend:
domain: @thirdplat.jcet.g.domain@
appkey: @thirdplat.jcet.g.appkey@
appsecret: @thirdplat.jcet.g.appsecret@
pyld: pyld:
domain: https://epmet-ext9.elinkservice.cn/platform domain: https://epmet-ext9.elinkservice.cn/platform
appId: 7a5aec009ba4eba8e254ee64fe3775e1 appId: 7a5aec009ba4eba8e254ee64fe3775e1
appKey: 14faef9af508d1c253b720ea5a43f9de appKey: 14faef9af508d1c253b720ea5a43f9de
appSecret: 38e7c2604c8dd33c445705d25eebbfc12a2f7ed8a87111e9e10a40312d3a1595 appSecret: 38e7c2604c8dd33c445705d25eebbfc12a2f7ed8a87111e9e10a40312d3a1595
epmet:
# third服务的相关配置
third:
urlPrefix: @epmet.third.urlprefix@

2
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/jcet/JcetApiService.java

@ -20,7 +20,6 @@ import java.io.UnsupportedEncodingException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@Service
public class JcetApiService extends AbstractApiService { public class JcetApiService extends AbstractApiService {
Logger logger = LoggerFactory.getLogger(getClass()); Logger logger = LoggerFactory.getLogger(getClass());
@ -40,7 +39,6 @@ public class JcetApiService extends AbstractApiService {
* @author wxz * @author wxz
* @date 2021.01.19 10:26 * @date 2021.01.19 10:26
*/ */
@Override
public ThirdPlatUserInfo getCUserInfoByTicket(String ticket) throws UnsupportedEncodingException { public ThirdPlatUserInfo getCUserInfoByTicket(String ticket) throws UnsupportedEncodingException {
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>"); logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>");

19
epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java

@ -40,6 +40,11 @@ public class PyldApiService extends AbstractApiService {
pyldThirdplatProps = props.getPyld(); pyldThirdplatProps = props.getPyld();
} }
@Override
public ThirdPlatUserInfo getCUserInfoByTicket(String ticket) throws Exception {
return null;
}
/** /**
* @return * @return
* @Description 通过第三方平台ticket获取用户信息 * @Description 通过第三方平台ticket获取用户信息
@ -47,7 +52,7 @@ public class PyldApiService extends AbstractApiService {
* @date 2021.01.19 10:26 * @date 2021.01.19 10:26
*/ */
@Override @Override
public ThirdPlatUserInfo getCUserInfoByTicket(String platformToken) { public ThirdPlatUserInfo getGUserInfoBySSOToken(String platformToken) {
logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>"); logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>");
logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口入参 platformToken:{}", platformToken); logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口入参 platformToken:{}", platformToken);
@ -75,18 +80,6 @@ public class PyldApiService extends AbstractApiService {
} }
/**
* G端用户token获取用户信息
*
* @param token
* @return
* @throws Exception
*/
@Override
public ThirdPlatUserInfo getGUserInfoBySSOToken(String token) throws Exception {
return null;
}
/** /**
* 构建请求头信息 * 构建请求头信息
* *

5
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/HttpClientManager.java

@ -196,9 +196,8 @@ public class HttpClientManager {
httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON); httppost.addHeader(HEADER_CONTENT_TYPE, HEADER_APPLICATION_JSON);
if (null != headerMap) { if (null != headerMap) {
headerMap.forEach((k, v) -> { headerMap.forEach((k, v) -> {
if (StringUtils.isNotBlank(k)) { if (v != null)
httppost.addHeader(k, v == null ? null : v.toString()); httppost.addHeader(k, v.toString());
}
}); });
} }
if (StringUtils.isNotEmpty(jsonStrParam)) { if (StringUtils.isNotEmpty(jsonStrParam)) {

Loading…
Cancel
Save