Skip to content

Commit

Permalink
fix: Search 쿼리 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ymkim97 committed Nov 27, 2023
1 parent 2322e55 commit f8f7fd4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ List<Room> searchByKeywordAndRoomType(@Param(value = "keyword") String keyword,
List<Room> searchByKeywordAndRoomId(@Param(value = "keyword") String keyword, @Param(value = "roomId") Long roomId);

@Query(value = "select distinct rm.* from room rm left join routine rt on rm.id = rt.room_id "
+ "where rm.title like %:keyword% "
+ "where (rm.title like %:keyword% "
+ "or rm.manager_nickname like %:keyword% "
+ "or rt.content like %:keyword% "
+ "or rt.content like %:keyword%) "
+ "and rm.room_type = :roomType "
+ "and rm.id < :roomId "
+ "order by rm.id desc limit 11", nativeQuery = true)
Expand Down

0 comments on commit f8f7fd4

Please sign in to comment.