From 7b1bb4874d56df16a267cc538328f16bac5f372f Mon Sep 17 00:00:00 2001 From: muhsroom1324 Date: Tue, 19 Nov 2024 11:05:03 +0900 Subject: [PATCH] feature: add return request date --- .../example/repick/domain/product/service/ProductService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/example/repick/domain/product/service/ProductService.java b/src/main/java/com/example/repick/domain/product/service/ProductService.java index 8174864..0beb608 100644 --- a/src/main/java/com/example/repick/domain/product/service/ProductService.java +++ b/src/main/java/com/example/repick/domain/product/service/ProductService.java @@ -25,6 +25,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; +import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; @@ -471,6 +472,7 @@ public Boolean updateProductReturnState(PatchProductReturn patchProductReturn){ Product product = productRepository.findById(productId) .orElseThrow(() -> new CustomException(INVALID_PRODUCT_ID)); product.updateReturnState(ProductReturnStateType.fromValue(patchProductReturn.returnState())); + product.getClothingSales().updateReturnRequestDate(LocalDateTime.now()); productRepository.save(product); }); return true;