From 7d3b695f04ca7fd325eaff32d3a1b5012048cc2c Mon Sep 17 00:00:00 2001 From: Donghoon Jeong <112836685+jjeongdong@users.noreply.github.com> Date: Tue, 13 Aug 2024 23:12:58 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat=20:=20=EC=82=AC=EC=A7=84=20=EB=8B=A4?= =?UTF-8?q?=EC=9A=B4=EB=A1=9C=EB=93=9C=EC=8B=9C=20=EB=8B=A4=EC=9A=B4?= =?UTF-8?q?=EB=A1=9C=EB=93=9C=20=EC=9D=B4=EB=A0=A5=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/photo/service/PhotoServiceImpl.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java b/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java index 02f5041..4fbb847 100644 --- a/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java +++ b/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java @@ -205,6 +205,9 @@ public PhotoDownloadUrlListInfo getPhotoDownloadUrlList(List photoIdList, .map(Photo::getUrl) .collect(Collectors.toList()); + // 사진 다운로드 이력 추가 + photoEsClientRepository.addDownloadTag(photoUrlList, member.getId()); + return photoConverter.toPhotoDownloadUrlListInfo(photoUrlList); } @@ -226,11 +229,14 @@ public PhotoDownloadUrlListInfo getPhotoDownloadUrlListByProfile(Long shareGroup pageable = pageable.next(); } - List photUrlList = photoEsList.stream() + List photoUrlList = photoEsList.stream() .map(PhotoEs::getUrl) .collect(Collectors.toList()); - return photoConverter.toPhotoDownloadUrlListInfo(photUrlList); + // 사진 다운로드 이력 추가 + photoEsClientRepository.addDownloadTag(photoUrlList, member.getId()); + + return photoConverter.toPhotoDownloadUrlListInfo(photoUrlList); } @Override @@ -250,11 +256,14 @@ public PhotoDownloadUrlListInfo getEtcPhotoDownloadUrlList(Long shareGroupId, Me pageable = pageable.next(); } - List photUrlList = photoEsList.stream() + List photoUrlList = photoEsList.stream() .map(PhotoEs::getUrl) .collect(Collectors.toList()); - return photoConverter.toPhotoDownloadUrlListInfo(photUrlList); + // 사진 다운로드 이력 추가 + photoEsClientRepository.addDownloadTag(photoUrlList, member.getId()); + + return photoConverter.toPhotoDownloadUrlListInfo(photoUrlList); } @Override From 76026fbb031329e0d2701a557cf5ae340f5be40d Mon Sep 17 00:00:00 2001 From: Donghoon Jeong <112836685+jjeongdong@users.noreply.github.com> Date: Tue, 13 Aug 2024 23:23:11 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refact=20:=20=EC=BD=94=EB=93=9C=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/umc/naoman/domain/photo/service/PhotoServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java b/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java index 4fbb847..e5eb3e1 100644 --- a/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java +++ b/src/main/java/com/umc/naoman/domain/photo/service/PhotoServiceImpl.java @@ -126,7 +126,7 @@ public SamplePhotoUploadInfo uploadSamplePhotoList(UploadSamplePhotoRequest requ .toList(); List samplePhotoNameList = samplePhotoList.stream() - .map(samplePhoto -> samplePhoto.getName()) + .map(SamplePhoto::getName) .toList(); // Elasticsearch에 sample_face_vector를 저장하기 위한 트리거 실행