Merged
Conversation
SangkiHan
approved these changes
Feb 10, 2025
Contributor
SangkiHan
left a comment
There was a problem hiding this comment.
고생하셨습니다! 말씀드린것만 수정하시면 merge하셔도 될듯합니다!
| String keyword, | ||
| Pageable pageable) { | ||
| QInquiry inquiry = QInquiry.inquiry; | ||
| QInquiryAnswer inquiryAnswer = QInquiryAnswer.inquiryAnswer; |
Contributor
There was a problem hiding this comment.
QClass는 static import 하면 더 깔끔해질수있을거같아요
제가 작업한 NewsQueryRepository참고 부탁드립니다!
Contributor
Author
There was a problem hiding this comment.
제가 이해가 잘 안되어서 그런데
혹시
QInquiry inquiry = inquiry;
QInquiryAnswer inquiryAnswer = inquiryAnswer;
이렇게 변경하라는 말씀이신가요?
Contributor
Author
There was a problem hiding this comment.
아 확인했습니다. 수정하겠습니다!
| QInquiryAnswer inquiryAnswer = QInquiryAnswer.inquiryAnswer; | ||
|
|
||
| // 정렬 조건 설정 | ||
| OrderSpecifier<?> orderSpecifier = getOrderSpecifier(orderType, inquiry, inquiryAnswer); |
Contributor
There was a problem hiding this comment.
이런건 하단 orderby에 직접 넣어도 되지 않을까요?
Contributor
Author
There was a problem hiding this comment.
이 두개는 검색 조건입니다!
- searchType은 검색 조건
- keyword는 검색어
입니다
Contributor
There was a problem hiding this comment.
아 제말은 메소드를 아래 예시처럼 직접 넣어도 무방하지 않나였습니다.
.where(
isCategoryEqualTo(category),
isTitleLikeTo(content)
)
.orderBy(isOrderByEqualToOrderType(orderType))
.offset(pageable.getOffset())
.limit(pageable.getPageSize())
Contributor
Author
There was a problem hiding this comment.
코드 통일성을 위해 제가 수정하는게 맞는것 같습니다! 수정하겠습니다
| testMember = memberRepository.findByPublicId(testMemberPublicId).get(); | ||
| for (int i = 1; i <= 15; i++) { | ||
| inquiryWriteService.createInquiry("문의내역 " + i, testMemberPublicId, "127.0.0.1"); | ||
| } |
Contributor
There was a problem hiding this comment.
IntStream.rangeClosed(1, 15).forEach(i ->
inquiryWriteService.createInquiry("문의내역 " + i, testMemberPublicId, "127.0.0.1"));for문안에 로직이 많지 않다면
이런식으로 간결하게 IntStream으로 표현할수있을거같아요!
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.
기능 설명
작업 내용
수정 사항
추가 작업 예정
테스트