mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 03:30:06 +08:00
【修复】SYSTEM:id 获取不到用户引发的 NPE 异常
This commit is contained in:
parent
c18509944f
commit
4466eb1bcd
@ -119,7 +119,9 @@ public class UserController {
|
||||
@PreAuthorize("@ss.hasPermission('system:user:query')")
|
||||
public CommonResult<UserRespVO> getUser(@RequestParam("id") Long id) {
|
||||
AdminUserDO user = userService.getUser(id);
|
||||
if (ObjectUtil.isEmpty(user)) return CommonResult.success(null);
|
||||
if (user == null) {
|
||||
return success(null);
|
||||
}
|
||||
// 拼接数据
|
||||
DeptDO dept = deptService.getDept(user.getDeptId());
|
||||
return success(UserConvert.INSTANCE.convert(user, dept));
|
||||
|
Loading…
Reference in New Issue
Block a user