Skip to content

Commit

Permalink
Merge pull request #198 from Upjuyanolja/bugfix/usageReceipt
Browse files Browse the repository at this point in the history
fix: 쿠폰 사용 내역 조회 영수증 수정
  • Loading branch information
JeongUijeong authored Jan 27, 2024
2 parents 230b0ef + 8a86305 commit d0bd24e
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -54,7 +53,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;
Expand Down Expand Up @@ -221,11 +219,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,
Expand Down Expand Up @@ -518,15 +515,16 @@ private List<PointUsageDetailReceiptResponse> getPointUsageDetailReceiptResponse
return couponIssuanceMaps.entrySet().stream()
.map(entry -> PointUsageDetailReceiptResponse.of(
entry.getKey().getName(),
getPointUsageCouponReceiptResponse(couponIssuances)
getPointUsageCouponReceiptResponse(entry.getKey(), couponIssuances)
)
)
.toList();
}

private List<PointUsageCouponReceiptResponse> getPointUsageCouponReceiptResponse(
List<CouponIssuance> couponIssuances) {
Room room, List<CouponIssuance> couponIssuances) {
return couponIssuances.stream()
.filter(couponIssuance -> couponIssuance.getRoom().equals(room))
.map(couponIssuance -> {
Coupon coupon = couponIssuance.getCoupon();
return PointUsageCouponReceiptResponse.of(
Expand Down

0 comments on commit d0bd24e

Please sign in to comment.