Skip to content

Commit

Permalink
Hotfix: 채팅 조회 API 변경 등호 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
nonaninona committed Feb 19, 2024
1 parent 643c1b0 commit 61e60dc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public interface ChatRepository extends JpaRepository<Chat, Long> {

List<Chat> 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<Chat> findTop10ByUserIdAndChatIdGreaterThanOrderByChatIdDesc(@Param("userId") Long userId, @Param("lastChatId") Long lastChatId);
List<Chat> findTopByMember_UserIdOrderByChatIdDesc(Long userId);
}

0 comments on commit 61e60dc

Please sign in to comment.