Skip to content

Commit

Permalink
fix: 업로드 요청 API 로직에서 saveAll()을 사용하여 엔티티를 저장하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
bflykky committed Aug 27, 2024
1 parent a353f52 commit 1b48137
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,10 @@ public PhotoUploadInfo uploadPhotoList(PhotoUploadRequest request, Member member

long startTime = System.currentTimeMillis();
// 사진 URL 리스트를 기반으로 사진 엔티티를 생성하고 DB에 저장
List<Photo> photoList = request.getPhotoUrlList().stream()
.map(photoUrl -> checkAndSavePhotoInDB(photoUrl, extractPhotoNameFromUrl(photoUrl), shareGroup))
.toList();
/*
List<Photo> photoList = request.getPhotoUrlList().stream()
.map(photoUrl -> checkAndCreatePhoto(photoUrl, extractPhotoNameFromUrl(photoUrl), shareGroup))
.toList();
photoRepository.saveAll(photoList);
*/
long finishTime = System.currentTimeMillis();
log.info("저장한 사진 개수: {} 장", photoList.size());
log.info("해당 사진 목록을 DB에 저장하는 데 걸린 시간: {} ms", finishTime - startTime);
Expand Down

0 comments on commit 1b48137

Please sign in to comment.