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

pull/21/MERGE
YunaiV 2023-03-05 14:59:02 +08:00
parent f180b8d7d3
commit 00c95e33b3
1 changed files with 5 additions and 2 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> 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")