Skip to content

공지 커서 목록 쿼리를 하나로 통합 #160

Closed

Description

@jjunh33

어떤 기능인가요?

추가하려는 기능에 대해 간결하게 설명해주세요

공지 커서 목록(NoticeJpaRepository)이 첫 페이지용 findFirstSlice와 다음 페이지용 findNextSlice 두 쿼리로 나뉘어 있다. 두 쿼리는 카테고리 조건·정렬이 같고 커서 조건만 다른데, 조건을 바꿀 때마다 두 곳을 똑같이 고쳐야 한다. 물품 목록(ItemJpaRepository.findSlice)처럼 커서 파라미터가 null이면 첫 페이지로 동작하는 쿼리 하나로 합친다.

📝 작업 상세 내용

  • findFirstSlice/findNextSlice를 findSlice 하나로 합치고, 커서가 없으면 커서 조건이 빠지도록 null 가드(:cursorId IS NULL OR ...)를 둔다
  • cursorPinned를 null을 받을 수 있는 Boolean으로 바꾸고, NoticeRepositoryImpl은 커서가 있으면 값을 풀어서, 없으면 null로 넘긴다
  • 합치기 전후의 조회 결과(순서, 페이지 경계)가 같은지 확인한다

📁 참고 자료 (선택)

  • 같은 패턴: ItemJpaRepository.findSlice
  • 동작은 바꾸지 않는 리팩토링이다

Activity

  1. added a commit that references this issue on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions