Skip to content

Commit

Permalink
Merge pull request #169 from CoolPeace-yanolza/fix/coupon/category
Browse files Browse the repository at this point in the history
쿠폰 카테고리 관련 수정
  • Loading branch information
tkddn204 authored Jan 22, 2024
2 parents 3589cec + 68b0aa6 commit fe2caf6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public Page<CouponResponse> searchCoupons(Long memberId, Long accommodationId, S
public CouponCategoryResponse getCouponCategories(Long memberId, Long accommodationId) {
Map<CouponStatusType, Long> 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);
Expand Down

0 comments on commit fe2caf6

Please sign in to comment.