Commit 6216b1190a524a5a8e57d5f7747f3a4bb319591a
Committed by
Gitee
!416 用户详情不显示所属部门部门
Merge pull request !416 from babylazsss/master
Showing
1 changed file
with
4 additions
and
1 deletions
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 { |
| 123 | 123 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 124 | 124 | @PreAuthorize("@ss.hasPermission('system:user:query')") |
| 125 | 125 | public CommonResult<UserRespVO> getUser(@RequestParam("id") Long id) { |
| 126 | - return success(UserConvert.INSTANCE.convert(userService.getUser(id))); | |
| 126 | + AdminUserDO user = userService.getUser(id); | |
| 127 | + // 获得部门数据 | |
| 128 | + DeptDO dept = deptService.getDept(user.getDeptId()); | |
| 129 | + return success(UserConvert.INSTANCE.convert(user).setDept(UserConvert.INSTANCE.convert(dept))); | |
| 127 | 130 | } |
| 128 | 131 | |
| 129 | 132 | @GetMapping("/export") | ... | ... |