From 5f47c00c517fe7a1e1d3b5ecd731918af93fc1ad Mon Sep 17 00:00:00 2001 From: chiwenda <48881696+chiwenda@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:05:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=94=A8=E6=88=B7=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E6=89=80=E5=B1=9E=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/system/controller/admin/user/UserController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 40efb2d23..549982e3c 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 getUser(@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")