From 2a20977e79f722537c7400eaa7a78b160ff97425 Mon Sep 17 00:00:00 2001 From: Yujin Lee Date: Mon, 30 Sep 2024 02:29:13 +0900 Subject: [PATCH] fix : test --- src/main/java/com/example/ai_jeju/service/MyJejuService.java | 1 - .../com/example/ai_jeju/service/RecommendationService.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/example/ai_jeju/service/MyJejuService.java b/src/main/java/com/example/ai_jeju/service/MyJejuService.java index 7f5d840..d8d45e3 100644 --- a/src/main/java/com/example/ai_jeju/service/MyJejuService.java +++ b/src/main/java/com/example/ai_jeju/service/MyJejuService.java @@ -29,7 +29,6 @@ public class MyJejuService { @Autowired private ChildRepository childRepository; @Autowired - //private S3Service s3Service; public static int calculateMonths(String birthDate) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd"); // DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy"); diff --git a/src/main/java/com/example/ai_jeju/service/RecommendationService.java b/src/main/java/com/example/ai_jeju/service/RecommendationService.java index 7ef410b..c77ae9c 100644 --- a/src/main/java/com/example/ai_jeju/service/RecommendationService.java +++ b/src/main/java/com/example/ai_jeju/service/RecommendationService.java @@ -16,7 +16,7 @@ public class RecommendationService { @Autowired private RecommendationRepository recommendationRepository; - @Transactional + @Transactional // 트랜잭션 처리 추가 public void saveRecommendations(Long userId, List> recommendIdsList) { List recommendations = new ArrayList<>(); for (List recommendIds : recommendIdsList) { @@ -27,6 +27,6 @@ public void saveRecommendations(Long userId, List> recommendIdsList) .build()); } } - recommendationRepository.saveAll(recommendations); + recommendationRepository.saveAll(recommendations); // 성능 개선을 위해 한번에 저장 } }