Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds an API endpoint for administrators to retrieve a list of withdrawn (deleted) users, supporting filtering and sorting capabilities.
Changes:
- Added new API endpoint
/api/v1/user/withdraw/listfor admins to query withdrawn users - Implemented service layer authorization check restricting access to ADMIN users only
- Created QueryDSL repository methods with filtering by user type, name, phone number, and sorting by deletion date
- Removed unused misspelled entity
WithDrawlUser.java
Reviewed changes
Copilot reviewed 7 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| GetUserDataController.java | Added new GET endpoint with parameter validation and default user type handling |
| GetUserDataService.java | Added service method with admin-only authorization check |
| UserQueryRepository.java | Added interface method for withdrawn user list query |
| UserQueryRepositoryImpl.java | Delegated implementation to QueryDSL repository |
| UserQuerydslRepository.java | Implemented QueryDSL query with filtering, pagination, and sorting |
| UserQuerydslUtil.java | Added utility methods for withdrawn user filtering and sorting |
| GetWithdrawUserListInDto.java | Created input DTO with filter parameters |
| WithdrawUserListOutDto.java | Created output DTO extending pagination response |
| WithdrawUserSimpleDataOutDto.java | Created DTO for individual withdrawn user data |
| WithdrawUserResponse.java | Created web response DTO with static factory method |
| WithdrawUserListResponse.java | Created paginated list response with static factory method |
| FakeUserQueryRepository.java | Implemented fake repository for unit testing |
| GetUserDataServiceUnitTest.java | Added comprehensive unit tests covering success and failure scenarios |
| WithDrawlUser.java | Removed unused entity with misspelled name |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (aDeletedAt == null && bDeletedAt == null) return 0; | ||
| if (aDeletedAt == null) return 1; | ||
| if (bDeletedAt == null) return -1; |
There was a problem hiding this comment.
The null checks for deletedAt at lines 148-150 are unreachable because line 141 already filters for users where deletedAt is not null. All users reaching the sorted() operation are guaranteed to have non-null deletedAt values. These null checks should be removed.
| if (aDeletedAt == null && bDeletedAt == null) return 0; | |
| if (aDeletedAt == null) return 1; | |
| if (bDeletedAt == null) return -1; |
|
|
||
|
|
||
| @Getter | ||
| @SuperBuilder(toBuilder = true) |
There was a problem hiding this comment.
This method overrides CustomPaginationResponse.toBuilder; it is advisable to add an Override annotation.
e50d0b8 to
44195ce
Compare
Issue ✨
변경점 👍