From 0f16051024cf394c6c4ab059c4b9871bed2385f6 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 09 十一月 2023 12:23:57 +0800 Subject: [PATCH] update 优化 部门数据权限使用默认兜底方案 --- ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java index fdefe42..628060a 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java @@ -112,6 +112,9 @@ TenantHelper.clearDynamic(); } SysUserVo user = userService.selectUserById(loginUser.getUserId()); + if (ObjectUtil.isNull(user)) { + return R.fail("娌℃湁鏉冮檺璁块棶鐢ㄦ埛鏁版嵁!"); + } userInfoVo.setUser(user); userInfoVo.setPermissions(loginUser.getMenuPermission()); userInfoVo.setRoles(loginUser.getRolePermission()); -- Gitblit v1.9.3