1
This commit is contained in:
@@ -210,6 +210,13 @@ public class WPS365Controller extends BaseController {
|
||||
}
|
||||
|
||||
JSONObject userInfo = wps365ApiService.getUserInfo(tokenInfo.getAccessToken());
|
||||
if (userInfo == null) {
|
||||
// WPS 未提供可用的“当前用户信息”接口或路径变更,降级返回 token 中的 user_id,避免 500
|
||||
userInfo = new JSONObject();
|
||||
userInfo.put("user_id", tokenInfo.getUserId());
|
||||
userInfo.put("name", "已授权用户");
|
||||
userInfo.put("email", "-");
|
||||
}
|
||||
return AjaxResult.success("获取用户信息成功", userInfo);
|
||||
} catch (Exception e) {
|
||||
log.error("获取用户信息失败", e);
|
||||
|
||||
Reference in New Issue
Block a user