From f8c6512c0f97604e0d760848935b76c7266a6034 Mon Sep 17 00:00:00 2001 From: JuyeonLee <104489022+Juye0nLee@users.noreply.github.com> Date: Sat, 7 Dec 2024 19:55:15 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=EC=95=84=EC=9D=B4=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EC=8B=A0=EC=B2=AD=20=ED=98=84=ED=99=A9=20=EC=B5=9C?= =?UTF-8?q?=EC=8B=A0=EA=B1=B8=EB=A1=9C=20(#62)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ivory/ivory/repository/ApplyRepository.java | 2 +- src/main/java/com/ivory/ivory/service/ChildService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ivory/ivory/repository/ApplyRepository.java b/src/main/java/com/ivory/ivory/repository/ApplyRepository.java index 99f5145..da366cc 100644 --- a/src/main/java/com/ivory/ivory/repository/ApplyRepository.java +++ b/src/main/java/com/ivory/ivory/repository/ApplyRepository.java @@ -12,7 +12,7 @@ public interface ApplyRepository extends JpaRepository { List findAllByChild_IdOrderByCreateAtDesc(Long childId); Optional findById (Long applyId); - Apply findFirstByChild_IdOrderByCreateAt(Long childID); + Apply findFirstByChild_IdOrderByCreateAtDesc(Long childID); Optional findFirstByStatusOrderByCreateAtDesc(Status status); List findAllByStatus(Status status); List findAllByOrderByCreateAtDesc(); diff --git a/src/main/java/com/ivory/ivory/service/ChildService.java b/src/main/java/com/ivory/ivory/service/ChildService.java index 3276677..4e46a13 100644 --- a/src/main/java/com/ivory/ivory/service/ChildService.java +++ b/src/main/java/com/ivory/ivory/service/ChildService.java @@ -87,7 +87,7 @@ public CustomApiResponse getChildren(Long memberId) { String recentApplyStatus = "아직 신청 내역이 없습니다"; //신청 상태 - Apply apply = applyRepository.findFirstByChild_IdOrderByCreateAt(child.getId()); + Apply apply = applyRepository.findFirstByChild_IdOrderByCreateAtDesc(child.getId()); if (apply != null) { recentApplyStatus = getStatus(apply.getStatus()); }