From 51cc2666986b0963dc73791d71c74ba5d1c3b1a5 Mon Sep 17 00:00:00 2001 From: Jindongleee Date: Sat, 5 Oct 2024 20:23:26 +0900 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8FRefactor:=20=EB=82=98?= =?UTF-8?q?=EC=9D=98=20=EC=97=AC=ED=96=89=20=EC=9D=BC=EC=A0=95=20=EC=A7=9C?= =?UTF-8?q?=EA=B8=B0=20=EC=9E=A5=EC=86=8C=20=EA=B2=80=EC=83=89=EC=8B=9C=20?= =?UTF-8?q?=EB=AC=B4=ED=95=9C=20GET=20=EC=9A=94=EC=B2=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../back_end/category/repository/HotspotRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/korad1004/back_end/category/repository/HotspotRepository.java b/src/main/java/com/korad1004/back_end/category/repository/HotspotRepository.java index 7af0502..67ff643 100644 --- a/src/main/java/com/korad1004/back_end/category/repository/HotspotRepository.java +++ b/src/main/java/com/korad1004/back_end/category/repository/HotspotRepository.java @@ -15,6 +15,6 @@ public interface HotspotRepository extends JpaRepository { Optional> findAllByCategory(Category category); - @Query("SELECT h FROM Hotspot h WHERE h.title LIKE CONCAT('%', :string, '%')") + @Query("SELECT h FROM Hotspot h WHERE h.title LIKE CONCAT('%', :string, '%') ORDER BY CASE WHEN h.title LIKE CONCAT(:string, '%') THEN 0 ELSE 1 END, h.title ASC") List findByTitle(@Param("string") String string); }