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 2c89c1bc..3cd72527 100644 --- a/src/main/java/com/coolpeace/domain/coupon/service/CouponService.java +++ b/src/main/java/com/coolpeace/domain/coupon/service/CouponService.java @@ -60,7 +60,8 @@ public Page searchCoupons(Long memberId, Long accommodationId, S public CouponCategoryResponse getCouponCategories(Long memberId, Long accommodationId) { Map counts = couponRepository.countCouponsByCouponStatus(memberId, accommodationId); - long all = counts.values().stream().mapToLong(Long::longValue).sum(); + long all = counts.values().stream().mapToLong(Long::longValue).sum() + - counts.getOrDefault(CouponStatusType.DELETED, 0L); long exposureOn = counts.getOrDefault(CouponStatusType.EXPOSURE_ON, 0L); long exposureOff = counts.getOrDefault(CouponStatusType.EXPOSURE_OFF, 0L) + counts.getOrDefault(CouponStatusType.EXPOSURE_WAIT, 0L);