Skip to content

Commit

Permalink
Merge pull request #114 from KAKAO-TOUR-API-CONTEST/devyj
Browse files Browse the repository at this point in the history
fix : test
  • Loading branch information
yyujin1231 authored Sep 29, 2024
2 parents 9dde84d + 2a20977 commit 0261c38
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 0261c38

Please sign in to comment.