From 61e60dc304adebefcf9250a18d490bf23973ee69 Mon Sep 17 00:00:00 2001 From: nonaninona Date: Tue, 20 Feb 2024 02:21:21 +0900 Subject: [PATCH] =?UTF-8?q?Hotfix:=20=EC=B1=84=ED=8C=85=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20API=20=EB=B3=80=EA=B2=BD=20=EB=93=B1=ED=98=B8=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/kuit/chatdiary/repository/ChatRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/kuit/chatdiary/repository/ChatRepository.java b/src/main/java/com/kuit/chatdiary/repository/ChatRepository.java index f9393ce..b29bede 100644 --- a/src/main/java/com/kuit/chatdiary/repository/ChatRepository.java +++ b/src/main/java/com/kuit/chatdiary/repository/ChatRepository.java @@ -10,7 +10,7 @@ public interface ChatRepository extends JpaRepository { List findTop10ByMember_UserIdOrderByChatIdDesc(Long userId); - @Query("SELECT c FROM chat c WHERE c.member.userId = :userId AND :lastChatId <= c.chatId AND c.chatId < :lastChatId+10 ORDER BY c.chatId ASC") + @Query("SELECT c FROM chat c WHERE c.member.userId = :userId AND :lastChatId < c.chatId AND c.chatId <= :lastChatId+10 ORDER BY c.chatId ASC") List findTop10ByUserIdAndChatIdGreaterThanOrderByChatIdDesc(@Param("userId") Long userId, @Param("lastChatId") Long lastChatId); List findTopByMember_UserIdOrderByChatIdDesc(Long userId); }