From 0a4eff366bfaaafe07309d3605f248d2768f2c75 Mon Sep 17 00:00:00 2001 From: rightpair Date: Thu, 25 Jan 2024 17:20:25 +0900 Subject: [PATCH] =?UTF-8?q?[feature]=20=EC=BF=A0=ED=8F=B0=20=EB=A7=8C?= =?UTF-8?q?=EB=A3=8C=20=EC=9A=94=EC=B2=AD=20=EC=8B=9C=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EB=90=9C=20=EC=BF=A0=ED=8F=B0=EC=9D=84=20=EB=B3=B4=EC=97=AC?= =?UTF-8?q?=EC=A3=BC=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/coupon/repository/CouponRepositoryImpl.java | 3 +-- .../com/coolpeace/domain/coupon/service/CouponService.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/coolpeace/domain/coupon/repository/CouponRepositoryImpl.java b/src/main/java/com/coolpeace/domain/coupon/repository/CouponRepositoryImpl.java index f01d8329..c48e3721 100644 --- a/src/main/java/com/coolpeace/domain/coupon/repository/CouponRepositoryImpl.java +++ b/src/main/java/com/coolpeace/domain/coupon/repository/CouponRepositoryImpl.java @@ -49,8 +49,7 @@ public Page findAllCoupons(Long memberId, Long accommodationId, SearchCo case EXPOSURE_ON -> coupon.couponStatus.eq(EXPOSURE_ON); case EXPOSURE_OFF -> coupon.couponStatus.eq(EXPOSURE_OFF) .or(coupon.couponStatus.eq(EXPOSURE_WAIT)); - case EXPIRED -> coupon.couponStatus.eq(EXPOSURE_END) - .or(coupon.couponStatus.eq(DELETED)); + case EXPIRED -> coupon.couponStatus.eq(EXPOSURE_END); case All -> coupon.couponStatus.ne(DELETED); }); } else { diff --git a/src/main/java/com/coolpeace/domain/coupon/service/CouponService.java b/src/main/java/com/coolpeace/domain/coupon/service/CouponService.java index 05dfa4d2..4f155d87 100644 --- a/src/main/java/com/coolpeace/domain/coupon/service/CouponService.java +++ b/src/main/java/com/coolpeace/domain/coupon/service/CouponService.java @@ -66,8 +66,7 @@ public CouponCategoryResponse getCouponCategories(Long memberId, Long accommodat long exposureOn = counts.getOrDefault(CouponStatusType.EXPOSURE_ON, 0L); long exposureOff = counts.getOrDefault(CouponStatusType.EXPOSURE_OFF, 0L) + counts.getOrDefault(CouponStatusType.EXPOSURE_WAIT, 0L); - long expired = counts.getOrDefault(CouponStatusType.EXPOSURE_END, 0L) - + counts.getOrDefault(CouponStatusType.DELETED, 0L); + long expired = counts.getOrDefault(CouponStatusType.EXPOSURE_END, 0L); return CouponCategoryResponse.from(all, exposureOn, exposureOff, expired); }