From aae8b264056f4318175775e7ff9afd5dca0aeed5 Mon Sep 17 00:00:00 2001 From: Sim-km Date: Thu, 23 May 2024 20:32:22 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B0=80=EC=A0=95=ED=86=B5=EC=8B=A0?= =?UTF-8?q?=EB=AC=B8=20=EA=B0=80=EC=A0=B8=EC=98=AC=20=EB=96=84=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=EC=9D=84=20id=EA=B0=80=20=EC=95=84=EB=8B=8C=20index?= =?UTF-8?q?=EB=A5=BC=20=ED=86=B5=ED=95=B4=20=EA=B0=80=EC=A0=B8=EC=98=AC=20?= =?UTF-8?q?=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/repository/SchoolAnnouncementRepository.kt | 2 +- .../announcement/domain/service/SchoolAnnouncementReader.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/repository/SchoolAnnouncementRepository.kt b/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/repository/SchoolAnnouncementRepository.kt index c2987470..6b90d46a 100644 --- a/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/repository/SchoolAnnouncementRepository.kt +++ b/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/repository/SchoolAnnouncementRepository.kt @@ -24,7 +24,7 @@ interface SchoolAnnouncementRepository : JpaRepository 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 diff --git a/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/service/SchoolAnnouncementReader.kt b/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/service/SchoolAnnouncementReader.kt index e774cd47..6aabefa4 100644 --- a/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/service/SchoolAnnouncementReader.kt +++ b/src/main/kotlin/com/asap/asapbackend/domain/announcement/domain/service/SchoolAnnouncementReader.kt @@ -36,7 +36,7 @@ class SchoolAnnouncementReader( PageRequest.of( pageable.pageNumber, pageable.pageSize, - Sort.by(Sort.Direction.DESC, "id") + Sort.by(Sort.Direction.DESC, "idx") ) ) }