From 96e22790bebc0c2116e998ea6ca738c728c8abd6 Mon Sep 17 00:00:00 2001 From: HyunA Date: Sat, 27 Jan 2024 20:40:24 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=82=AC=EC=9A=A9=20=EC=BF=A0=ED=8F=B0?= =?UTF-8?q?=EC=9D=84=20=EB=B3=B4=EC=97=AC=EC=A4=84=20=EB=95=8C=20=ED=95=B4?= =?UTF-8?q?=EB=8B=B9=20=ED=95=98=EB=8A=94=20room=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EA=B1=B8=EB=9F=AC=EC=95=BC=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/point/service/PointService.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java b/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java index c0a63ebb..9d548220 100644 --- a/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java +++ b/src/main/java/com/backoffice/upjuyanolja/domain/point/service/PointService.java @@ -44,7 +44,6 @@ import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import java.time.LocalDate; import java.time.LocalDateTime; import java.time.YearMonth; import java.time.ZonedDateTime; @@ -53,7 +52,6 @@ import java.util.Comparator; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Optional; import java.util.concurrent.ThreadLocalRandom; import java.util.stream.Collectors; @@ -220,11 +218,10 @@ public PointTotalPageResponse getTotalPointPageResponse(Long memberId, Pageable )); } pointTotalDetailResponses.sort(Comparator.comparing(PointTotalDetailResponse::date)); - for (PointTotalDetailResponse response :pointTotalDetailResponses) { - result.add(PointTotalDetailResponse.from(id++,response)); + for (PointTotalDetailResponse response : pointTotalDetailResponses) { + result.add(PointTotalDetailResponse.from(id++, response)); } - return PointTotalPageResponse.of( new PageImpl<>( result, @@ -516,15 +513,16 @@ private List getPointUsageDetailReceiptResponse return couponIssuanceMaps.entrySet().stream() .map(entry -> PointUsageDetailReceiptResponse.of( entry.getKey().getName(), - getPointUsageCouponReceiptResponse(couponIssuances) + getPointUsageCouponReceiptResponse(entry.getKey(), couponIssuances) ) ) .toList(); } private List getPointUsageCouponReceiptResponse( - List couponIssuances) { + Room room, List couponIssuances) { return couponIssuances.stream() + .filter(couponIssuance -> couponIssuance.getRoom().equals(room)) .map(couponIssuance -> { Coupon coupon = couponIssuance.getCoupon(); return PointUsageCouponReceiptResponse.of(