From 17684bcd36347711dc64638236f20bbd407503a9 Mon Sep 17 00:00:00 2001 From: bflykky Date: Fri, 9 Aug 2024 11:21:03 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=82=AC=EC=A7=84=20=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=8A=A4=EC=9B=A8=EA=B1=B0=20=EC=84=A4=EC=A0=95,?= =?UTF-8?q?=20=EC=9D=91=EB=8B=B5=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EC=97=90=20?= =?UTF-8?q?photoId=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../umc/naoman/domain/agenda/service/AgendaServiceImpl.java | 4 ++-- .../umc/naoman/domain/photo/controller/PhotoController.java | 5 +++++ .../umc/naoman/domain/photo/converter/PhotoConverter.java | 1 + .../java/com/umc/naoman/domain/photo/dto/PhotoResponse.java | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/umc/naoman/domain/agenda/service/AgendaServiceImpl.java b/src/main/java/com/umc/naoman/domain/agenda/service/AgendaServiceImpl.java index 1d94aa9e..f9f48695 100644 --- a/src/main/java/com/umc/naoman/domain/agenda/service/AgendaServiceImpl.java +++ b/src/main/java/com/umc/naoman/domain/agenda/service/AgendaServiceImpl.java @@ -40,8 +40,8 @@ public Agenda createAgenda(Member member, AgendaRequest.CreateAgendaRequest requ Long shareGroupId = request.getShareGroupId(); ShareGroup shareGroup = shareGroupService.findShareGroup(shareGroupId); Profile profile = shareGroupService.findProfile(shareGroupId, member.getId()); - Agenda newAgenda = agendaConverter.toEntity(profile,request.getTitle(),shareGroup); - agendaPhotoService.saveAgendaPhotoList(newAgenda,request.getAgendasPhotoList()); + Agenda newAgenda = agendaConverter.toEntity(profile, request.getTitle(),shareGroup); + agendaPhotoService.saveAgendaPhotoList(newAgenda, request.getAgendasPhotoList()); return agendaRepository.save(newAgenda); } diff --git a/src/main/java/com/umc/naoman/domain/photo/controller/PhotoController.java b/src/main/java/com/umc/naoman/domain/photo/controller/PhotoController.java index 3a507a18..41ef017c 100644 --- a/src/main/java/com/umc/naoman/domain/photo/controller/PhotoController.java +++ b/src/main/java/com/umc/naoman/domain/photo/controller/PhotoController.java @@ -10,6 +10,7 @@ import com.umc.naoman.global.security.annotation.LoginMember; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; @@ -56,6 +57,10 @@ public ResultResponse uploadPhotoList(@Valid @Req @GetMapping("/all") @Operation(summary = "특정 공유그룹의 전체 사진 조회 API", description = "특정 공유 그룹의 전체 사진을 조회하는 API입니다.") + @Parameters(value = { + @Parameter(name = "page", description = "조회할 페이지를 입력해 주세요.(0번부터 시작)"), + @Parameter(name = "size", description = "한 페이지에 나타낼 사진 개수를 입력해주세요.") + }) public ResultResponse getAllPhotoListByShareGroup(@RequestParam Long shareGroupId, @PageableDefault(sort = "createdAt", direction = Sort.Direction.DESC) @Parameter(hidden = true) Pageable pageable, diff --git a/src/main/java/com/umc/naoman/domain/photo/converter/PhotoConverter.java b/src/main/java/com/umc/naoman/domain/photo/converter/PhotoConverter.java index 78f7411d..2fbe0dc0 100644 --- a/src/main/java/com/umc/naoman/domain/photo/converter/PhotoConverter.java +++ b/src/main/java/com/umc/naoman/domain/photo/converter/PhotoConverter.java @@ -62,6 +62,7 @@ public PhotoResponse.PhotoInfo toPhotoInfo(Photo photo) { String rawUrl = photo.getUrl(); return PhotoResponse.PhotoInfo.builder() + .photoId(photo.getId()) .rawPhotoUrl(rawUrl) .w200PhotoUrl(createResizedPhotoUrl(rawUrl, W200_PATH_PREFIX)) .w400PhotoUrl(createResizedPhotoUrl(rawUrl, W400_PATH_PREFIX)) diff --git a/src/main/java/com/umc/naoman/domain/photo/dto/PhotoResponse.java b/src/main/java/com/umc/naoman/domain/photo/dto/PhotoResponse.java index 35dad94e..cd5a5538 100644 --- a/src/main/java/com/umc/naoman/domain/photo/dto/PhotoResponse.java +++ b/src/main/java/com/umc/naoman/domain/photo/dto/PhotoResponse.java @@ -56,6 +56,7 @@ public static class PagedPhotoInfo { @AllArgsConstructor @NoArgsConstructor public static class PhotoInfo { + private Long photoId; private String rawPhotoUrl; private String w200PhotoUrl; private String w400PhotoUrl;