Skip to content

Commit

Permalink
feature: add return request date
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroom1324 committed Nov 19, 2024
1 parent a73293f commit 7b1bb48
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 7b1bb48

Please sign in to comment.