Conversation
parkjaehak
requested changes
Feb 2, 2025
Comment on lines
15
to
19
| @Service | ||
| public class TeamStatusService implements LoadTeamStatusUsecase, FilterTeamStatusUsecase { | ||
|
|
||
| private final TaskCustomRepository taskCustomRepository; | ||
|
|
Collaborator
There was a problem hiding this comment.
port 인터페이스를 정의하시고 port를 구현한 adapter를 생성하시어 실제 repository에 대한 접근은 adapter에서 하는 것이 좋을 것 같습니다.
Comment on lines
45
to
52
| @GetMapping("/filter") | ||
| public ResponseEntity<TeamStatusResponse> filterTeamStatus( | ||
| @RequestParam(required = false) List<Long> mainCategoryIds, | ||
| @RequestParam(required = false) List<Long> categoryIds, | ||
| @RequestParam(required = false) String taskTitle, | ||
| @RequestParam(defaultValue = "기본") String sortBy, | ||
| @RequestParam(defaultValue = "0") int page, | ||
| @RequestParam(defaultValue = "20") int pageSize) { |
Collaborator
There was a problem hiding this comment.
requestparam으로 파라미터 바인딩 후 reqeust 객체를 사용하시는 것보다 modelattribute를 통해 객체의 형태로 사용하셔도 바인딩이 되기 때문에 아래와 같이 사용하는 것을 추천드립니다
Comment on lines
+16
to
+22
| ) { | ||
| public FilterTeamStatusRequest { | ||
| sortBy = (sortBy == null || sortBy.isEmpty()) ? "기본" : sortBy; | ||
| mainCategoryIds = mainCategoryIds == null ? List.of() : mainCategoryIds; | ||
| categoryIds = categoryIds == null ? List.of() : categoryIds; | ||
| taskTitle = taskTitle == null ? "" : taskTitle; | ||
| } |
Collaborator
There was a problem hiding this comment.
객체의 형태로 직접 파싱하실 경우 java validation을 사용하시면 좋을 것 같습니다.
parkjaehak
approved these changes
Feb 2, 2025
Comment on lines
2
to
18
|
|
||
| import java.util.List; | ||
|
|
||
| public record TeamStatusResponse( | ||
| List<TeamMemberTaskResponse> members, | ||
| boolean hasNext, | ||
| boolean isFirst, | ||
| boolean isLast | ||
| ) { | ||
| public TeamStatusResponse(List<TeamMemberTaskResponse> members, int pageNumber, int pageSize) { | ||
| this( | ||
| (members == null) ? List.of() : members, | ||
| (members != null && members.size() > pageSize), | ||
| pageNumber == 0, | ||
| (members == null || members.size() <= pageSize) | ||
| ); | ||
| } |
Collaborator
There was a problem hiding this comment.
이부분은 dto > common > PageResponse에 제가 생성해놓은 포멧을 가져다가 사용하시면 될 것 같습니다.
Collaborator
|
jpql 사용한 쿼리 작성을 보았는데 페이징이 담당자별로 이루어지는 것이 아니라 전체 작업에 대한 페이징이 이루어진 후 그룹핑이 되고 있는 것 같은데 테스트해보셨을때 결과가 제대로 나왔을까요? |
Collaborator
|
제 생각에 현재 작업하신 페이지(팀 현황 조회) 에서는 페이징이 필요없을 것 같고 담당자와 해당하는 작업들만 반환해준뒤 실제 사용자가 특정 담당자의 작업을 스크롤하거나 이동하면 그때 api 호출을 통한 페이징이 필요할 것 같은데 어떻게 생각하시나요 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📄 요약(Summary)
PR Desciption
Requirements for Reviewer
PR Log
새롭게 배운 것
고민 중인 사항
첨부 자료
Requirements for Reviewer
✅ 체크리스트(Checklist)
🚪 이슈 번호(Issue numbers)
Closes #31