diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java index 7cf54ac25..c2a5246a3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java @@ -123,7 +123,10 @@ public class UserController { @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('system:user:query')") public CommonResult getInfo(@RequestParam("id") Long id) { - return success(UserConvert.INSTANCE.convert(userService.getUser(id))); + AdminUserDO user = userService.getUser(id); + // 获得部门数据 + DeptDO dept = deptService.getDept(user.getDeptId()); + return success(UserConvert.INSTANCE.convert(user).setDept(UserConvert.INSTANCE.convert(dept))); } @GetMapping("/export") @@ -186,4 +189,4 @@ public class UserController { return success(userService.importUserList(list, updateSupport)); } -} \ No newline at end of file +}