diff --git a/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java b/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java index 60c67a3..5cd2aa4 100644 --- a/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java +++ b/src/main/java/com/example/naverrestaurant/wishlist/service/WishListService.java @@ -9,6 +9,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; @@ -117,6 +118,7 @@ public void addVisit(int index, int starRating) { } restaurantEntity.setVisitCount(restaurantEntity.getVisitCount()+1); restaurantEntity.setStarRating(starRating); + restaurantEntity.setLastVisitDate(LocalDateTime.now()); wishListRepository.updateById(index, restaurantEntity); var result = wishListRepository.findById(index);