Skip to content

Commit

Permalink
Feat: 삭제 가게 안보이게 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
marinesnow34 committed Mar 24, 2024
1 parent 0fb8345 commit 6aaf7c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public BoardRes toBoardRes(List<Store> stores) {
throw new BusinessLogicException(ExceptionCode.STORE_NOT_FOUND);
}
return BoardRes.builder()
.stores(stores.stream().map(this::toStoreDto).toList())
.stores(stores.stream().filter(store -> !store.isDeleted()).map(this::toStoreDto).toList())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ public HistoryRes ordersToHistoryRes(List<Order> orders) {
.receipts(
orders
.stream()
.filter(order -> !order.getStore().isDeleted())
.filter(order -> order.getProgress() == PICKUP
|| order.getProgress() == COMPLETE
|| order.getProgress() == FAIL
Expand All @@ -250,6 +251,7 @@ public HistoryRes ordersToFastOrderRes(List<Order> orders) {
.receipts(
orders
.stream()
.filter(order -> !order.getStore().isDeleted())
.filter(order -> order.getCart().getCreatedAt()
// 데이터 변경 시점 이후의 데이터만 가져옴
.isAfter(LocalDateTime.of(2023, 12, 6, 0, 0, 0)))
Expand All @@ -265,6 +267,7 @@ public HistoryRes ordersToNewHistoryRes(List<Order> orders) {
.receipts(
orders
.stream()
.filter(order -> !order.getStore().isDeleted())
.filter(order -> order.getProgress() == ORDER
|| order.getProgress() == MAKE)
.map(this::orderToReceiptHistoryDto)
Expand Down

0 comments on commit 6aaf7c8

Please sign in to comment.