提交 00c95e33 authored 作者: YunaiV's avatar YunaiV

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

上级 f180b8d7
...@@ -123,7 +123,10 @@ public class UserController { ...@@ -123,7 +123,10 @@ public class UserController {
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('system:user:query')") @PreAuthorize("@ss.hasPermission('system:user:query')")
public CommonResult<UserRespVO> getInfo(@RequestParam("id") Long id) { 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") @GetMapping("/export")
...@@ -186,4 +189,4 @@ public class UserController { ...@@ -186,4 +189,4 @@ public class UserController {
return success(userService.importUserList(list, updateSupport)); return success(userService.importUserList(list, updateSupport));
} }
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论