安眼平台获取用户信息失败提示
This commit is contained in:
+1
-1
@@ -125,7 +125,7 @@ public class RestTemplateUtil {
|
||||
if (HttpStatus.OK.equals(entity.getStatusCode()) && ObjectUtils.isNotEmpty(entity.getBody())) {
|
||||
return entity.getBody();
|
||||
} else {
|
||||
return AnYanResult.error("天眼系统API调用失败");
|
||||
return AnYanResult.error("外部平台API调用失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -116,10 +116,10 @@ public class LoginAnYanServiceImpl implements ILoginAnYanService {
|
||||
return Result.error(anYanAuthResult != null ? anYanAuthResult.getMessage() : "认证服务器无响应");
|
||||
}
|
||||
|
||||
// 授权成功获取用户信息
|
||||
// 授权成功获取用户信息(统一认证的平台接口没有做统一封装,成功和失败均返回一个不同的json字符串, 这里只能判断没有获取到用户信息则认为是失败)
|
||||
AnYanUserInfoResult anYanUserInfo = anYanClient.getAnYanUserInfo(anYanAuthResult.getAccess_token());
|
||||
if (anYanUserInfo == null) {
|
||||
return Result.error("无法获取用户信息");
|
||||
if (anYanUserInfo == null || anYanUserInfo.getEmployeeUnitDTO() == null) {
|
||||
return Result.error("登录失败,请先联系本单位掌油管理员确认个人机构信息");
|
||||
}
|
||||
|
||||
// 检查并更新用户信息
|
||||
|
||||
Reference in New Issue
Block a user