From 6aaf7c85631d2ce509f955142405f96f53073efc Mon Sep 17 00:00:00 2001 From: Joowon Lim Date: Mon, 25 Mar 2024 03:47:40 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EC=82=AD=EC=A0=9C=20=EA=B0=80=EA=B2=8C?= =?UTF-8?q?=20=EC=95=88=EB=B3=B4=EC=9D=B4=EA=B2=8C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/readyvery/readyverydemo/src/board/dto/BoardMapper.java | 2 +- .../com/readyvery/readyverydemo/src/order/dto/OrderMapper.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/readyvery/readyverydemo/src/board/dto/BoardMapper.java b/src/main/java/com/readyvery/readyverydemo/src/board/dto/BoardMapper.java index 41a7aac..30ae441 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/board/dto/BoardMapper.java +++ b/src/main/java/com/readyvery/readyverydemo/src/board/dto/BoardMapper.java @@ -20,7 +20,7 @@ public BoardRes toBoardRes(List 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(); } diff --git a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java index a3cba0c..d165554 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java +++ b/src/main/java/com/readyvery/readyverydemo/src/order/dto/OrderMapper.java @@ -236,6 +236,7 @@ public HistoryRes ordersToHistoryRes(List orders) { .receipts( orders .stream() + .filter(order -> !order.getStore().isDeleted()) .filter(order -> order.getProgress() == PICKUP || order.getProgress() == COMPLETE || order.getProgress() == FAIL @@ -250,6 +251,7 @@ public HistoryRes ordersToFastOrderRes(List orders) { .receipts( orders .stream() + .filter(order -> !order.getStore().isDeleted()) .filter(order -> order.getCart().getCreatedAt() // 데이터 변경 시점 이후의 데이터만 가져옴 .isAfter(LocalDateTime.of(2023, 12, 6, 0, 0, 0))) @@ -265,6 +267,7 @@ public HistoryRes ordersToNewHistoryRes(List orders) { .receipts( orders .stream() + .filter(order -> !order.getStore().isDeleted()) .filter(order -> order.getProgress() == ORDER || order.getProgress() == MAKE) .map(this::orderToReceiptHistoryDto)