!416 用户详情不显示所属部门部门

Merge pull request !416 from babylazsss/master
pull/2/head
芋道源码 2023-02-28 16:51:59 +00:00 committed by Gitee
commit 6216b1190a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 1 deletions

View File

@ -123,7 +123,10 @@ public class UserController {
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:user:query')")
public CommonResult<UserRespVO> 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")