Skip to content

Commit

Permalink
Merge pull request #98 from Kusitms-29th-ASAP/fix/announcement-sort
Browse files Browse the repository at this point in the history
fix: 가정통신문 가져올 떄 정렬을 id가 아닌 index를 통해 가져올 수 있도록 변경
  • Loading branch information
tlarbals824 authored May 23, 2024
2 parents 8ece01e + aae8b26 commit 167c272
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface SchoolAnnouncementRepository : JpaRepository<SchoolAnnouncement, Long>
join sa.schoolAnnouncementPage as sap on sap.id = sa.schoolAnnouncementPage.id
join sap.school as s on s.id = sap.school.id
join Classroom as c on c.school.id = s.id and c.id = :classroomId
ORDER BY sa.id DESC
ORDER BY sa.idx DESC
"""
)
fun findAllByClassroomId(classroomId: Long, pageable: Pageable): Page<SchoolAnnouncement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SchoolAnnouncementReader(
PageRequest.of(
pageable.pageNumber,
pageable.pageSize,
Sort.by(Sort.Direction.DESC, "id")
Sort.by(Sort.Direction.DESC, "idx")
)
)
}
Expand Down

0 comments on commit 167c272

Please sign in to comment.