Skip to content

Commit

Permalink
fix : test
Browse files Browse the repository at this point in the history
  • Loading branch information
yyujin1231 committed Sep 29, 2024
1 parent 53038ce commit 2a20977
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class RecommendationService {
@Autowired
private RecommendationRepository recommendationRepository;

@Transactional
@Transactional // 트랜잭션 처리 추가
public void saveRecommendations(Long userId, List<List<Long>> recommendIdsList) {
List<Recommendation> recommendations = new ArrayList<>();
for (List<Long> recommendIds : recommendIdsList) {
Expand All @@ -27,6 +27,6 @@ public void saveRecommendations(Long userId, List<List<Long>> recommendIdsList)
.build());
}
}
recommendationRepository.saveAll(recommendations);
recommendationRepository.saveAll(recommendations); // 성능 개선을 위해 한번에 저장
}
}

0 comments on commit 2a20977

Please sign in to comment.