-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/242 커뮤니티 게시글 검색 조회 (RDB) #248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨씁니다~
@@ -9,6 +9,7 @@ | |||
import com.somemore.community.domain.QCommunityBoard; | |||
import com.somemore.volunteer.domain.QVolunteer; | |||
import lombok.RequiredArgsConstructor; | |||
import org.apache.commons.lang3.StringUtils; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
일부러 이거 쓰신건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
범수님 코드 참고했는데 이렇게 StringUtils의 isNotBlank 사용해서 체크하셨던데
if문 보다 깔끔하다고 생각했고 통일하면 좋을 거 같아서 똑같이 했습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다~ 좋은 것 같아요
저희가 만들지 않은 유틸 클래스를 사용하는 것을 처음봐서 여쭤봤습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isNotBlank 메서드가 null 체크, ""문자열 체크, " ", 공백 체크까지해서 자주 애용하고 있습니다 좋아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leebs0521 저희만의 유틸 인터페이스를 만들고 구현체에 아파치의 스트링 유틸을 사용하는 것은 과한걸까요? 갑자기 궁금해져서 여쭤봅니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m-a-king 음... 그렇게 생각하신 이유가 있을까요?? 저는 일단 과하다라고 느껴지긴하네용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다음 기회에...
return StringUtils.isNotBlank(keyword) | ||
? communityBoard.title.containsIgnoreCase( | ||
keyword) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return StringUtils.isNotBlank(keyword) | |
? communityBoard.title.containsIgnoreCase( | |
keyword) : null; | |
return StringUtils.isNotBlank(keyword) | |
? communityBoard.title.containsIgnoreCase(keyword) | |
: null; |
이렇게 쓸 수 있을 것 같아요~~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null까지 다 한줄로 올리는게 나을까요 null은 내리는 게 나을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return에 삼항연산을 사용할 때, :
기준으로 개행하긴 하던데 아영 님 편한 대로 하셔도 될 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다~
@@ -30,7 +30,7 @@ public ApiResponse<Page<CommunityBoardResponseDto>> getAll( | |||
) { | |||
return ApiResponse.ok( | |||
200, | |||
communityBoardQueryUseCase.getCommunityBoards(pageable.getPageNumber()), | |||
communityBoardQueryUseCase.getCommunityBoards(null, pageable.getPageNumber()), | |||
"전체 커뮤니티 게시글 리스트 조회 성공" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null이 조금 걸리는데 제가 했던 SearchCondition 이라는 Dto를 만들어서 Paging까지 같이 넣는거 어떻게 생각하시나요??
다른분들 의견도 궁금합니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 좋습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
condition이 단순해보이는데 builder가 아니라 생성자를 이용하는건 어떨까요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빌더 만들고 paging만 넣어두는 식으로 하면 괜찮을 것 같아요
List<CommunityBoardView> content = getCommunityBoardsQuery() | ||
.where(isNotDeleted()) | ||
.where(isNotDeleted() | ||
.and(keywordEq(keyword))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isNotDeleted가 앞에 있는건 혹시 조인 때문인건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keywordEq이 먼저 오는게 맞을 거 같아서 수정하겠습니다!
Quality Gate passedIssues Measures |
기계 주제에... |
이제 성공했어요 |
📌 과제 설명
👩💻 요구 사항과 구현 내용
✅ PR 포인트 & 궁금한 점