Skip to content

Commit

Permalink
Merge pull request #223 from marinesnow34/fix
Browse files Browse the repository at this point in the history
Fix: 자잘한 수정
  • Loading branch information
marinesnow34 authored Mar 24, 2024
2 parents 43b99cb + e514425 commit 0fb8345
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public HistoryRes ordersToHistoryRes(List<Order> orders) {
orders
.stream()
.filter(order -> order.getProgress() == PICKUP
|| order.getProgress() == COMPLETE
|| order.getProgress() == FAIL
|| order.getProgress() == CANCEL)
.map(this::orderToReceiptHistoryDto)
Expand Down Expand Up @@ -265,8 +266,7 @@ public HistoryRes ordersToNewHistoryRes(List<Order> orders) {
orders
.stream()
.filter(order -> order.getProgress() == ORDER
|| order.getProgress() == MAKE
|| order.getProgress() == COMPLETE)
|| order.getProgress() == MAKE)
.map(this::orderToReceiptHistoryDto)
.toList())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public GetPointRes toGetPointRes(Long point) {
public GetPointHistoryRes toGetPointHistoryRes(List<Point> points) {
return GetPointHistoryRes
.builder()
.history(points.stream().map(this::pointToPointDto).toList())
.history(points.stream().filter(point -> !point.getIsDeleted()).map(this::pointToPointDto).toList())
.build();
}

private PointDto pointToPointDto(Point point) {
return PointDto.builder()
.point((point.getPoint() > 0 ? "+" : "") + point.getPoint()) // +1 or -1
.point((point.getPoint() >= 0 ? "+" : "") + point.getPoint()) // +1 or -1
.date(point.getCreatedAt().format(DateTimeFormatter.ofPattern(DATE_FORMAT)))
.status(point.getIsDeleted())
.store(point.getOrder().getStore().getName())
Expand Down

0 comments on commit 0fb8345

Please sign in to comment.