-
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
Api: ✨ 미확인 푸시 알림 존재 여부 확인 API #139
Merged
Merged
Conversation
This file contains 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
...app-external-api/src/main/java/kr/co/pennyway/api/apis/notification/api/NotificationApi.java
Show resolved
Hide resolved
...pi/src/main/java/kr/co/pennyway/api/apis/notification/controller/NotificationController.java
Show resolved
Hide resolved
...pi/src/main/java/kr/co/pennyway/api/apis/notification/service/NotificationSearchService.java
Show resolved
Hide resolved
...rnal-api/src/main/java/kr/co/pennyway/api/apis/notification/usecase/NotificationUseCase.java
Show resolved
Hide resolved
...java/kr/co/pennyway/domain/domains/notification/repository/NotificationCustomRepository.java
Show resolved
Hide resolved
.../kr/co/pennyway/domain/domains/notification/repository/NotificationCustomRepositoryImpl.java
Show resolved
Hide resolved
...in/src/main/java/kr/co/pennyway/domain/domains/notification/service/NotificationService.java
Show resolved
Hide resolved
...va/kr/co/pennyway/domain/domains/notification/repository/NotificationRepositoryUnitTest.java
Show resolved
Hide resolved
…sh-notify' into feat/PW-439-check-unconfirmed-push-notify
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.
작업 이유
작업 사항
GET /v2/notifications/unread
unread 라는 이름이 마음에 안 드네요.. not-confirmation이 맥락 상 적절하긴 한데 너무 길어서 일단 unread로 처리.
처음에 jpa repository로 쿼리를 생성했고, 메서드 명은
existsByReceiver_IdAndReadAtIsNull
이었습니다.Jpa method rule에 의해, join 없이 receiver_id FK를 탐색할 것이라 생각했으나, 예상이랑 다른 쿼리가 나가는 것을 확인했습니다.
필드명도 수정해보았으나 진척이 없어, QueryDsl로 명시적으로 수정하였고 다음과 같은 결과를 얻었습니다.
join도 없고, ref 타입으로 값을 잘 조회하고 있으므로 빠른 성능을 기대할 수 있습니다.
또한 Limit 절에 의해 값을 찾는 즉시 실행이 종료되므로, 대용량 데이터를 가지고 있어도 큰 지장이 없을 거라 생각합니다.
리뷰어가 중점적으로 확인해야 하는 부분
발견한 이슈