From bed175f73d430ade24be3b7a71231dbb7a80c760 Mon Sep 17 00:00:00 2001 From: kjungw1025 Date: Mon, 29 Jul 2024 21:20:22 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=83=81=ED=92=88=20=EC=B2=AD=EC=95=BD?= =?UTF-8?q?=20=EC=A4=91/=EC=A2=85=EB=A3=8C=EC=97=90=20=EB=8C=80=ED=95=9C?= =?UTF-8?q?=20=EB=82=99=EC=9D=B8=EA=B0=92=20=EC=88=9C=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=EC=97=90=20=EB=8C=80=ED=95=B4=EC=84=9C=20=EC=A1=B0=EA=B1=B4=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= 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 7ac5138..c4f2cc8 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 then 1 else 0 end ") + "order by case when :sortType = 'knock-in' and p.knockIn is null and p.productState = 'ACTIVE' 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 then 1 else 0 end ") + "order by case when :sortType = 'knock-in' and p.knockIn is null and p.productState = 'ACTIVE' 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 ")