From 683ec68c795511b7496a19a887e8b2b3963bac3e Mon Sep 17 00:00:00 2001 From: kjungw1025 Date: Tue, 30 Jul 2024 11:09:52 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=83=81=ED=92=88=20=EC=B2=AD=EC=95=BD/?= =?UTF-8?q?=EC=A2=85=EB=A3=8C=20=EC=A1=B0=ED=9A=8C=EC=97=90=20=EB=8C=80?= =?UTF-8?q?=ED=95=B4=EC=84=9C=20=EC=9D=B4=EC=A0=84=EC=97=90=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=ED=96=88=EB=8D=98=20=EC=BF=BC=EB=A6=AC=EB=AC=B8?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/product/repository/ProductRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/wl2c/elswhereproductservice/domain/product/repository/ProductRepository.java b/src/main/java/com/wl2c/elswhereproductservice/domain/product/repository/ProductRepository.java index c4f2cc8..7ac5138 100644 --- a/src/main/java/com/wl2c/elswhereproductservice/domain/product/repository/ProductRepository.java +++ b/src/main/java/com/wl2c/elswhereproductservice/domain/product/repository/ProductRepository.java @@ -14,7 +14,7 @@ public interface ProductRepository extends JpaRepository { @Query("select p from Product p " + "where p.productState = 'ACTIVE' and p.subscriptionEndDate >= CURRENT_DATE " + - "order by case when :sortType = 'knock-in' and p.knockIn is null and p.productState = 'ACTIVE' then 1 else 0 end ") + "order by case when :sortType = 'knock-in' and p.knockIn is null then 1 else 0 end ") Page listByOnSale(@Param("sortType") String sortType, Pageable pageable); @Query("select p from Product p where p.productState = 'ACTIVE' and p.id = :id and p.subscriptionEndDate >= CURRENT_DATE ") @@ -22,7 +22,7 @@ public interface ProductRepository extends JpaRepository { @Query("select p from Product p " + "where p.productState = 'ACTIVE' and p.subscriptionEndDate < CURRENT_DATE " + - "order by case when :sortType = 'knock-in' and p.knockIn is null and p.productState = 'ACTIVE' then 1 else 0 end ") + "order by case when :sortType = 'knock-in' and p.knockIn is null then 1 else 0 end ") Page listByEndSale(@Param("sortType") String sortType, Pageable pageable); @Query("select p from Product p where p.productState = 'ACTIVE' and p.id = :id ")