Browse Source

抛出错误信息

dev_shibei_match
jianjun 5 years ago
parent
commit
3f90ce6e85
  1. 4
      epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java
  2. 7
      epmet-commons/epmet-commons-thirdplat/src/main/java/com/epmet/commons/thirdplat/apiservice/pyld/PyldApiService.java

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

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.thirdplat.apiservice.AbstractApiService;
import com.epmet.commons.thirdplat.bean.ThirdPlatUserInfo;
import com.epmet.commons.thirdplat.constants.PyldConstants;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
@ -144,6 +145,9 @@ public class SsoServiceImpl implements SsoService {
} catch (Exception e) {
throw new RenException(e.getMessage());
}
if (thirdUser == null) {
throw new RenException(EpmetErrorCode.THIRD_PLAT_REQUEST_ERROR.getCode(), PyldConstants.REPONSE_USER_NOT_LOGIN);
}
//获取用户信息
GovWebOperLoginFormDTO form = new GovWebOperLoginFormDTO();
form.setCustomerId(thirdUser.getCustomerId());

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

@ -46,7 +46,7 @@ public class PyldApiService extends AbstractApiService {
logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>");
logger.info("【请求平阴联动指挥平台第三方平台】getUserInfoByTicket()接口入参 platformToken:{}", platformToken);
try {
JSONObject jsonParam = new JSONObject();
jsonParam.put(PyldConstants.PLAT_PARAM_TOKEN, platformToken);
jsonParam.put(PyldConstants.PLAT_PARAM_MANAGEMENTKEY, PyldConstants.PLAT_PARAM_MANAGEMENTKEY_VALUE);
@ -68,10 +68,7 @@ public class PyldApiService extends AbstractApiService {
userInfo.setMobile(resultDTO.getMobile());
userInfo.setCustomerId(resultDTO.getReserved());
return userInfo;
} catch (Exception e) {
logger.error("getUserInfoByTicket exception", e);
}
return null;
}

Loading…
Cancel
Save