From 1da017fa3659c53f86351b77fb84858e3f73c9c3 Mon Sep 17 00:00:00 2001 From: jusung-c Date: Fri, 17 Nov 2023 22:15:17 +0900 Subject: [PATCH] =?UTF-8?q?refactor(#104):=20=ED=94=BC=EB=93=9C=EB=B0=B1?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/housework/info/HouseworkInfoService.java | 5 +---- .../info/request/HouseworkInfoDeleteRequest.java | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/HouseworkInfoService.java b/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/HouseworkInfoService.java index b71a429a..6ab30a5c 100644 --- a/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/HouseworkInfoService.java +++ b/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/HouseworkInfoService.java @@ -194,11 +194,8 @@ public void deleteHouseworkInfo(HouseworkInfoDeleteRequest request) { houseworkInfoRepository.deleteById(houseworkInfo.getId()); log.info(">>>> HouseworkInfo Deleted: {}", houseworkInfo.getId()); - // HouseworkInfo를 외래키로 가진 HouseworkTodo 리스트 조회 - List findTodoList = houseworkTodoRepository.findHouseworkTodoByHouseworkInfo(houseworkInfo.getId()); - // requestDate 이후의 HouseworkTodo를 HOUSEWORK_TODO_DELETE로 상태 변경 - findTodoList.stream() + houseworkTodoRepository.findHouseworkTodoByHouseworkInfo(houseworkInfo.getId()).stream() .filter(todo -> todo.getDate().isAfter(requestDate)) .forEach(HouseworkTodo::deleteHouseworkTodo); diff --git a/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/request/HouseworkInfoDeleteRequest.java b/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/request/HouseworkInfoDeleteRequest.java index 1b1ce5cd..5a178cec 100644 --- a/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/request/HouseworkInfoDeleteRequest.java +++ b/heachi-core/housework-api/src/main/java/com/heachi/housework/api/service/housework/info/request/HouseworkInfoDeleteRequest.java @@ -8,10 +8,10 @@ @Getter public class HouseworkInfoDeleteRequest { - Long groupId; - LocalDate date; - Long todoId; - HouseworkInfoDeleteType deleteType; + private Long groupId; + private LocalDate date; + private Long todoId; + private HouseworkInfoDeleteType deleteType; @Builder public HouseworkInfoDeleteRequest(Long groupId, LocalDate date, Long todoId, HouseworkInfoDeleteType deleteType) {