| | |
| | | } |
| | | |
| | | @GetMapping("/users/export") |
| | | @SaCheckPermission("member:user:view") |
| | | @SaCheckPermission("member:user:export") |
| | | public void export( |
| | | HttpServletResponse response, |
| | | @RequestParam(required = false) String nickname, |
| | |
| | | } |
| | | |
| | | @GetMapping("/users/{id}") |
| | | @SaCheckPermission("member:user:view") |
| | | @SaCheckPermission("member:user:detail") |
| | | public ApiResponse<UserDetailVO> detail(@PathVariable Long id) { |
| | | return ApiResponse.ok(userAppService.detail(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | @PatchMapping("/users/{id}/status") |
| | | @SaCheckPermission("member:user:edit") |
| | | @SaCheckPermission("member:user:status") |
| | | public ApiResponse<UserStatusVO> patchStatus(@PathVariable Long id, @Valid @RequestBody UserStatusRequest req) { |
| | | return ApiResponse.ok(userAppService.patchStatus(id, req)); |
| | | } |
| | | |
| | | @PostMapping("/users/{id}/reset-password") |
| | | @SaCheckPermission("member:user:edit") |
| | | @SaCheckPermission("member:user:reset-password") |
| | | public ApiResponse<Void> resetPassword(@PathVariable Long id, @Valid @RequestBody UserResetPasswordRequest req) { |
| | | userAppService.resetPassword(id, req); |
| | | return ApiResponse.ok(null); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/users/{id}/wechat-binding") |
| | | @SaCheckPermission("member:user:edit") |
| | | @SaCheckPermission("member:user:unbind-wechat") |
| | | public ApiResponse<UserDetailVO> unbindWechat(@PathVariable Long id) { |
| | | return ApiResponse.ok(userAppService.unbindWechat(id)); |
| | | } |