Skip to content

Commit

Permalink
feat : 사진 다운로드시 다운로드 이력 추가 기능 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeongdong committed Aug 13, 2024
1 parent 6cb17da commit 7d3b695
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ public PhotoDownloadUrlListInfo getPhotoDownloadUrlList(List<Long> photoIdList,
.map(Photo::getUrl)
.collect(Collectors.toList());

// 사진 다운로드 이력 추가
photoEsClientRepository.addDownloadTag(photoUrlList, member.getId());

return photoConverter.toPhotoDownloadUrlListInfo(photoUrlList);
}

Expand All @@ -226,11 +229,14 @@ public PhotoDownloadUrlListInfo getPhotoDownloadUrlListByProfile(Long shareGroup
pageable = pageable.next();
}

List<String> photUrlList = photoEsList.stream()
List<String> photoUrlList = photoEsList.stream()
.map(PhotoEs::getUrl)
.collect(Collectors.toList());

return photoConverter.toPhotoDownloadUrlListInfo(photUrlList);
// 사진 다운로드 이력 추가
photoEsClientRepository.addDownloadTag(photoUrlList, member.getId());

return photoConverter.toPhotoDownloadUrlListInfo(photoUrlList);
}

@Override
Expand All @@ -250,11 +256,14 @@ public PhotoDownloadUrlListInfo getEtcPhotoDownloadUrlList(Long shareGroupId, Me
pageable = pageable.next();
}

List<String> photUrlList = photoEsList.stream()
List<String> photoUrlList = photoEsList.stream()
.map(PhotoEs::getUrl)
.collect(Collectors.toList());

return photoConverter.toPhotoDownloadUrlListInfo(photUrlList);
// 사진 다운로드 이력 추가
photoEsClientRepository.addDownloadTag(photoUrlList, member.getId());

return photoConverter.toPhotoDownloadUrlListInfo(photoUrlList);
}

@Override
Expand Down

0 comments on commit 7d3b695

Please sign in to comment.