feat(qywx): 添加获取企业微信用户详情的功能

在QyUserApplicationService中新增getQyUserDetail方法,用于根据用户ID获取用户详情。同时在QyUserController中添加对应的API接口,以便前端调用获取用户详情数据。
This commit is contained in:
dzq 2025-05-17 16:37:46 +08:00
parent 8aa1b9cc5c
commit 4e5ca6ea07
2 changed files with 12 additions and 0 deletions

View File

@ -50,6 +50,13 @@ public class QyUserController extends BaseController {
return ResponseDTO.ok(page); return ResponseDTO.ok(page);
} }
@Operation(summary = "qy用户详情")
@GetMapping("/detail/{id}")
public ResponseDTO<QyUserDTO> detail(@PathVariable Long id) {
QyUserDTO qyUserDTO = qyUserApplicationService.getQyUserDetail(id);
return ResponseDTO.ok(qyUserDTO);
}
@Operation(summary = "新增用户") @Operation(summary = "新增用户")
@AccessLog(title = "用户管理", businessType = BusinessTypeEnum.ADD) @AccessLog(title = "用户管理", businessType = BusinessTypeEnum.ADD)
@PostMapping @PostMapping

View File

@ -41,6 +41,11 @@ public class QyUserApplicationService {
return new PageDTO<>(dtoList, page.getTotal()); return new PageDTO<>(dtoList, page.getTotal());
} }
public QyUserDTO getQyUserDetail(Long id) {
QyUserEntity user = userService.getById(id);
return new QyUserDTO(user);
}
public List<QyUserEntity> selectAll() { public List<QyUserEntity> selectAll() {
return userService.selectAll(); return userService.selectAll();
} }