Skip to content

Commit

Permalink
Merge pull request #13 from 1223v/test
Browse files Browse the repository at this point in the history
Fix: 삭제 아이템 보이는 문제 수정
  • Loading branch information
1223v authored Nov 26, 2023
2 parents b3177c7 + d738a02 commit d5cf3ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ public class OrderDto {
private List<FoodieDto> foodies;
private String phone;
private LocalDateTime time;
private String method;
private Long price;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ private OrderDto toOrderDto(Order order) {
.time(order.getCreatedAt())
.phone(order.getUserInfo().getPhone())
.price(order.getAmount())
.foodies(order.getCart().getCartItems().stream().map(this::cartItemToFoodieDto).toList())
.method(order.getMethod())
.foodies(order.getCart()
.getCartItems()
.stream()
.filter(cartItem -> !cartItem.getIsDeleted())
.map(this::cartItemToFoodieDto)
.toList())
.build();

}
Expand Down

0 comments on commit d5cf3ca

Please sign in to comment.