This commit is contained in:
Leo
2026-02-04 16:49:13 +08:00
parent be64dcfb61
commit 79eb651e12
3 changed files with 33 additions and 13 deletions

View File

@@ -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);