Skip to content

Conversation

@yu-so-young2
Copy link
Member

📝 작업 내용

💬 리뷰 요구사항(선택)

  • 알림 전체 개수를 조회하는 countByMemberAndIsReadFalse(Member member)의 경우 JPA 인터페이스 방식으로 간단하게 사용할 수 있지만, NotificationRepositoryImpl의 메서드에서 사용해야해서, QueryDSL 로 사용하도록 그대로 두었습니다! 혹시 이부분 관련하여 더 좋은 아이디어가 있으실까요!?
    • NotificationRepositoryImpl.findNotificationsByMemberAndCursor()
    • NotificationRepositoryImpl.findNotificationsByMemberAndTypeOrderByCreatedAtDesc()
public Long countByMemberAndIsReadFalse(Member member) {
    return query.select(notification.count())
            .from(notification)
            .where(notification.member.eq(member)
                    .and(notification.isRead.isFalse()))
            .fetchOne();
}

@yu-so-young2 yu-so-young2 added documentation Improvements or additions to documentation fix 기능 수정 feat 기능 추가 labels Apr 29, 2025
@yu-so-young2 yu-so-young2 requested a review from ssosee April 29, 2025 14:48
@yu-so-young2 yu-so-young2 self-assigned this Apr 29, 2025
Copy link
Member

@ssosee ssosee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다.
count 쿼리는 그대로 사용하시는게 좋아 보여요~

@ssosee ssosee merged commit e91976b into develop Apr 29, 2025
1 check passed
@yu-so-young2 yu-so-young2 deleted the DP-502 branch May 2, 2025 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feat 기능 추가 fix 기능 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants