From 3469af77443bec953d3bae0d3a4efa97b6ad453a Mon Sep 17 00:00:00 2001 From: Yeongjin Noh <129354455+nohy6630@users.noreply.github.com> Date: Mon, 20 Nov 2023 00:03:42 +0900 Subject: [PATCH] =?UTF-8?q?Fix(#80):=20=EC=9E=AC=EB=82=9C=EC=83=81?= =?UTF-8?q?=ED=99=A9-=EC=BB=A4=EB=AE=A4=EB=8B=88=ED=8B=B0=20=EB=8C=80?= =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=A0=95=EB=A0=AC=EA=B8=B0=EC=A4=80=20?= =?UTF-8?q?=EC=98=A4=EB=9E=98=EB=90=9C=EC=88=9C=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/conversation/repository/ConversationRepository.java | 2 +- .../domain/conversation/service/ConversationService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/numberone/backend/domain/conversation/repository/ConversationRepository.java b/src/main/java/com/numberone/backend/domain/conversation/repository/ConversationRepository.java index a2b48fa6..aaef2416 100644 --- a/src/main/java/com/numberone/backend/domain/conversation/repository/ConversationRepository.java +++ b/src/main/java/com/numberone/backend/domain/conversation/repository/ConversationRepository.java @@ -20,5 +20,5 @@ public interface ConversationRepository extends JpaRepository findAllByDisasterOrderByCreatedAtDesc(Disaster disaster); - List findAllByParentOrderByLikeCntDesc(Conversation parent); + List findAllByParentOrderByCreatedAt(Conversation parent); } diff --git a/src/main/java/com/numberone/backend/domain/conversation/service/ConversationService.java b/src/main/java/com/numberone/backend/domain/conversation/service/ConversationService.java index d59035b9..7881d49a 100644 --- a/src/main/java/com/numberone/backend/domain/conversation/service/ConversationService.java +++ b/src/main/java/com/numberone/backend/domain/conversation/service/ConversationService.java @@ -78,7 +78,7 @@ public GetConversationResponse get(String email, Long conversationId) { .orElseThrow(NotFoundConversationException::new); Member member = memberService.findByEmail(email); List childs = new ArrayList<>(); - List childConversations = conversationRepository.findAllByParentOrderByLikeCntDesc(conversation); + List childConversations = conversationRepository.findAllByParentOrderByCreatedAt(conversation); for (Conversation child : childConversations) { childs.add(GetConversationResponse.of( child,