From b99137870f06aaf866111f1929386d57b924b193 Mon Sep 17 00:00:00 2001 From: GaBaljaintheroom Date: Sun, 5 May 2024 17:06:26 +0900 Subject: [PATCH] =?UTF-8?q?refact:=20=EC=BA=A1=EC=8A=90=20=EC=9D=91?= =?UTF-8?q?=EB=8B=B5=20builder=20=ED=8C=A8=ED=84=B4=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=20=EC=9E=90=EB=B0=94=20=EA=B5=AC=EA=B8=80=20=ED=98=95=EC=8B=9D?= =?UTF-8?q?=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/dto/CapsuleDetailDto.java | 34 +++++++++++++++++ .../data/dto/CapsuleSummaryDto.java | 22 +++++++++++ .../data/response/CapsuleDetailResponse.java | 26 +------------ .../data/response/CapsuleSummaryResponse.java | 16 +------- .../repository/CapsuleQueryRepository.java | 10 ++--- .../service/CapsuleService.java | 6 ++- .../api/GroupCapsuleApiController.java | 2 +- .../data/dto/GroupCapsuleDetailDto.java | 38 ++++++++++++++++++- .../data/dto/GroupCapsuleSummaryDto.java | 27 ++++++++++++- .../response/GroupCapsuleDetailResponse.java | 32 ++-------------- .../response/GroupCapsuleSummaryResponse.java | 19 +--------- .../service/PublicCapsuleService.java | 5 ++- .../MemberFriendQueryRepository.java | 6 ++- .../rabbitmq/RabbitmqComponentConstants.java | 18 ++++++--- 14 files changed, 156 insertions(+), 105 deletions(-) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleDetailDto.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleDetailDto.java index eb1d27c52..da966b437 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleDetailDto.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleDetailDto.java @@ -1,8 +1,11 @@ package site.timecapsulearchive.core.domain.capsule.generic_capsule.data.dto; import java.time.ZonedDateTime; +import java.util.List; +import java.util.function.Function; import org.locationtech.jts.geom.Point; import site.timecapsulearchive.core.domain.capsule.entity.CapsuleType; +import site.timecapsulearchive.core.domain.capsule.generic_capsule.data.response.CapsuleDetailResponse; public record CapsuleDetailDto( Long capsuleId, @@ -41,4 +44,35 @@ public CapsuleDetailDto excludeTitleAndContentAndImagesAndVideos() { capsuleType ); } + + public CapsuleDetailResponse toResponse( + final Function singlePreSignUrlFunction, + final Function> multiplePreSignUrlFunction, + final Function changePointFunction + ) { + final List preSignedImageUrls = multiplePreSignUrlFunction.apply( + images); + final List preSignedVideoUrls = multiplePreSignUrlFunction.apply( + videos); + + final Point changePoint = changePointFunction.apply(point); + + return CapsuleDetailResponse.builder() + .capsuleSkinUrl(singlePreSignUrlFunction.apply(capsuleSkinUrl)) + .dueDate(dueDate) + .nickname(nickname) + .profileUrl(profileUrl) + .createdDate(createdAt) + .latitude(changePoint.getX()) + .longitude(changePoint.getY()) + .address(address) + .roadName(roadName) + .title(title) + .content(content) + .imageUrls(preSignedImageUrls) + .videoUrls(preSignedVideoUrls) + .isOpened(isOpened) + .capsuleType(capsuleType) + .build(); + } } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleSummaryDto.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleSummaryDto.java index 1571278a8..62e1ac1d1 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleSummaryDto.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/dto/CapsuleSummaryDto.java @@ -1,7 +1,9 @@ package site.timecapsulearchive.core.domain.capsule.generic_capsule.data.dto; import java.time.ZonedDateTime; +import java.util.function.Function; import org.locationtech.jts.geom.Point; +import site.timecapsulearchive.core.domain.capsule.generic_capsule.data.response.CapsuleSummaryResponse; public record CapsuleSummaryDto( String nickname, @@ -16,4 +18,24 @@ public record CapsuleSummaryDto( ZonedDateTime createdAt ) { + public CapsuleSummaryResponse toResponse( + final Function preSignUrlFunction, + final Function changePointFunction + ) { + final Point changePoint = changePointFunction.apply(point); + + return CapsuleSummaryResponse.builder() + .nickname(nickname) + .profileUrl(profileUrl) + .skinUrl(preSignUrlFunction.apply(skinUrl)) + .title(title) + .dueDate(dueDate) + .latitude(changePoint.getX()) + .longitude(changePoint.getY()) + .address(address) + .isOpened(isOpened) + .createdAt(createdAt) + .build(); + } + } \ No newline at end of file diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleDetailResponse.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleDetailResponse.java index 74cba26cc..25d4a84f4 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleDetailResponse.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleDetailResponse.java @@ -74,29 +74,7 @@ public static CapsuleDetailResponse createOf( final Function> multiplePreSignUrlFunction, final Function changePointFunction ) { - final List preSignedImageUrls = multiplePreSignUrlFunction.apply( - detailDto.images()); - final List preSignedVideoUrls = multiplePreSignUrlFunction.apply( - detailDto.videos()); - - final Point changePoint = changePointFunction.apply(detailDto.point()); - - return new CapsuleDetailResponse( - singlePreSignUrlFunction.apply(detailDto.capsuleSkinUrl()), - detailDto.dueDate(), - detailDto.nickname(), - detailDto.profileUrl(), - detailDto.createdAt(), - changePoint.getX(), - changePoint.getY(), - detailDto.address(), - detailDto.roadName(), - detailDto.title(), - detailDto.content(), - preSignedImageUrls, - preSignedVideoUrls, - detailDto.isOpened(), - detailDto.capsuleType() - ); + return detailDto.toResponse(singlePreSignUrlFunction, multiplePreSignUrlFunction, + changePointFunction); } } \ No newline at end of file diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleSummaryResponse.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleSummaryResponse.java index e554063fe..ab905e71e 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleSummaryResponse.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/data/response/CapsuleSummaryResponse.java @@ -59,20 +59,6 @@ public static CapsuleSummaryResponse createOf( final Function preSignUrlFunction, final Function changePointFunction ) { - final Point changePoint = changePointFunction.apply(summaryDto.point()); - - return new CapsuleSummaryResponse( - summaryDto.nickname(), - summaryDto.profileUrl(), - preSignUrlFunction.apply(summaryDto.skinUrl()), - summaryDto.title(), - summaryDto.dueDate(), - changePoint.getX(), - changePoint.getY(), - summaryDto.address(), - summaryDto.roadName(), - summaryDto.isOpened(), - summaryDto.createdAt() - ); + return summaryDto.toResponse(preSignUrlFunction, changePointFunction); } } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java index 4eea36259..a77cc11b3 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java @@ -29,9 +29,9 @@ public class CapsuleQueryRepository { * * @param memberId 범위 내의 캡슙을 조회할 멤버 id * @param mbr 캡슐을 조회할 범위(최소사각형) - * @see site.timecapsulearchive.core.global.geography.GeoTransformManager * @param capsuleType 조회할 캡슐의 타입 * @return 범위 내에 조회된 캡슐들의 요약 정보들을 반환한다. + * @see site.timecapsulearchive.core.global.geography.GeoTransformManager */ public List findARCapsuleSummaryDtosByCurrentLocationAndCapsuleType( final Long memberId, @@ -99,11 +99,11 @@ public List findCapsuleSummaryDtosByCurrentLocationAndC .fetch(); } - /** + /** * 지도에서 사용자의 친구들의 캡슐을 찾기 위해 현재 위치에서 범위 내의 사용자의 친구가 만든 캡슐을 조회한다. * * @param friendIds 범위 내의 조회할 사용자 목록 - * @param mbr 캡슐을 조회할 범위(최소사각형), GeoTransformManager 참조 + * @param mbr 캡슐을 조회할 범위(최소사각형), GeoTransformManager 참조 * @return 범위 내에 조회된 캡슐들의 요약 정보들을 반환한다. */ public List findFriendsCapsuleSummaryDtosByCurrentLocationAndCapsuleType( @@ -131,11 +131,11 @@ private BooleanExpression ST_Contains(Polygon mbr, ComparablePath point) return Expressions.booleanTemplate("ST_Contains({0}, {1})", mbr, point); } - /** + /** * AR에서 사용자의 친구들의 캡슐을 찾기 위해 현재 위치에서 범위 내의 사용자의 친구가 만든 캡슐을 조회한다. * * @param friendIds 범위 내의 조회할 사용자 목록 - * @param mbr 캡슐을 조회할 범위(최소사각형), GeoTransformManager 참조 + * @param mbr 캡슐을 조회할 범위(최소사각형), GeoTransformManager 참조 * @return 범위 내에 조회된 캡슐들의 요약 정보들을 반환한다. */ public List findFriendsARCapsulesByCurrentLocation( diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/service/CapsuleService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/service/CapsuleService.java index f48937506..f1414845b 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/service/CapsuleService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/service/CapsuleService.java @@ -95,8 +95,9 @@ public Capsule saveCapsule( /** * 지도에서 캡슐을 찾기 위해 사용자의 현재 위치에서 특정 반경에서 친구들의 캡슐들을 요약 조회한다 + * * @param memberId 사용자 아이디 - * @param dto 현재 위치와 반경 + * @param dto 현재 위치와 반경 * @return 지도용 캡슐 요약 조회들 */ @Transactional(readOnly = true) @@ -119,8 +120,9 @@ public List findFriendsCapsulesByCurrentLocation( /** * AR로 캡슐을 찾기 위해 사용자의 현재 위치에서 특정 반경에서 친구들의 캡슐들을 요약 조회한다 + * * @param memberId 사용자 아이디 - * @param dto 현재 위치와 반경 + * @param dto 현재 위치와 반경 * @return AR용 캡슐 요약 조회들 */ public List findFriendsARCapsulesByCurrentLocation( diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/api/GroupCapsuleApiController.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/api/GroupCapsuleApiController.java index fa7270414..c7e7f6af1 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/api/GroupCapsuleApiController.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/api/GroupCapsuleApiController.java @@ -20,8 +20,8 @@ import site.timecapsulearchive.core.domain.capsule.group_capsule.data.reqeust.GroupCapsuleUpdateRequest; import site.timecapsulearchive.core.domain.capsule.group_capsule.data.response.GroupCapsuleDetailResponse; import site.timecapsulearchive.core.domain.capsule.group_capsule.data.response.GroupCapsulePageResponse; -import site.timecapsulearchive.core.domain.capsule.group_capsule.data.response.MyGroupCapsuleSliceResponse; import site.timecapsulearchive.core.domain.capsule.group_capsule.data.response.GroupCapsuleSummaryResponse; +import site.timecapsulearchive.core.domain.capsule.group_capsule.data.response.MyGroupCapsuleSliceResponse; import site.timecapsulearchive.core.domain.capsule.group_capsule.facade.GroupCapsuleFacade; import site.timecapsulearchive.core.domain.capsule.group_capsule.service.GroupCapsuleService; import site.timecapsulearchive.core.global.common.response.ApiSpec; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleDetailDto.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleDetailDto.java index 8b1a8ba44..e47993f89 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleDetailDto.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleDetailDto.java @@ -1,7 +1,10 @@ package site.timecapsulearchive.core.domain.capsule.group_capsule.data.dto; import java.util.List; +import java.util.function.Function; +import org.locationtech.jts.geom.Point; import site.timecapsulearchive.core.domain.capsule.generic_capsule.data.dto.CapsuleDetailDto; +import site.timecapsulearchive.core.domain.capsule.group_capsule.data.response.GroupCapsuleDetailResponse; import site.timecapsulearchive.core.domain.group.data.dto.GroupMemberSummaryDto; import site.timecapsulearchive.core.domain.group.data.response.GroupMemberSummaryResponse; @@ -10,7 +13,7 @@ public record GroupCapsuleDetailDto( List members ) { - public List toGroupMemberSummaryResponse() { + public List groupMemberSummaryDtoToResponse() { return members.stream() .map(GroupMemberSummaryDto::toResponse) .toList(); @@ -22,4 +25,37 @@ public GroupCapsuleDetailDto excludeDetailContents() { members ); } + + public GroupCapsuleDetailResponse toResponse( + final Function singlePreSignUrlFunction, + final Function> multiplePreSignUrlFunction, + final Function changePointFunction + ) { + final Point changePoint = changePointFunction.apply(capsuleDetailDto.point()); + + final List preSignedImageUrls = multiplePreSignUrlFunction.apply( + capsuleDetailDto.images()); + final List preSignedVideoUrls = multiplePreSignUrlFunction.apply( + capsuleDetailDto.videos()); + + return GroupCapsuleDetailResponse.builder() + .capsuleId(capsuleDetailDto.capsuleId()) + .capsuleSkinUrl(singlePreSignUrlFunction.apply(capsuleDetailDto.capsuleSkinUrl())) + .members(groupMemberSummaryDtoToResponse()) + .dueDate(capsuleDetailDto.dueDate()) + .nickname(capsuleDetailDto.nickname()) + .profileUrl(capsuleDetailDto.profileUrl()) + .createdDate(capsuleDetailDto.createdAt()) + .latitude(changePoint.getX()) + .longitude(changePoint.getY()) + .address(capsuleDetailDto.address()) + .roadName(capsuleDetailDto().roadName()) + .title(capsuleDetailDto().title()) + .content(capsuleDetailDto.content()) + .imageUrls(preSignedImageUrls) + .videoUrls(preSignedVideoUrls) + .isOpened(capsuleDetailDto.isOpened()) + .capsuleType(capsuleDetailDto.capsuleType()) + .build(); + } } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleSummaryDto.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleSummaryDto.java index 013e2396d..b3306cf0a 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleSummaryDto.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/dto/GroupCapsuleSummaryDto.java @@ -1,7 +1,10 @@ package site.timecapsulearchive.core.domain.capsule.group_capsule.data.dto; import java.util.List; +import java.util.function.Function; +import org.locationtech.jts.geom.Point; import site.timecapsulearchive.core.domain.capsule.generic_capsule.data.dto.CapsuleSummaryDto; +import site.timecapsulearchive.core.domain.capsule.group_capsule.data.response.GroupCapsuleSummaryResponse; import site.timecapsulearchive.core.domain.group.data.dto.GroupMemberSummaryDto; import site.timecapsulearchive.core.domain.group.data.response.GroupMemberSummaryResponse; @@ -10,9 +13,31 @@ public record GroupCapsuleSummaryDto( List members ) { - public List toGroupMemberSummaryResponse() { + public List groupMemberSummaryDtoToResponse() { return members.stream() .map(GroupMemberSummaryDto::toResponse) .toList(); } + + public GroupCapsuleSummaryResponse toResponse( + final Function preSignUrlFunction, + final Function changePointFunction + ) { + final Point changePoint = changePointFunction.apply(capsuleSummaryDto.point()); + + return GroupCapsuleSummaryResponse.builder() + .members(groupMemberSummaryDtoToResponse()) + .nickname(capsuleSummaryDto.nickname()) + .profileUrl(capsuleSummaryDto.profileUrl()) + .skinUrl(preSignUrlFunction.apply(capsuleSummaryDto.skinUrl())) + .title(capsuleSummaryDto.title()) + .dueDate(capsuleSummaryDto.dueDate()) + .latitude(changePoint.getX()) + .longitude(changePoint.getY()) + .address(capsuleSummaryDto.address()) + .roadName(capsuleSummaryDto.roadName()) + .isOpened(capsuleSummaryDto.isOpened()) + .createdAt(capsuleSummaryDto.createdAt()) + .build(); + } } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleDetailResponse.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleDetailResponse.java index 825623c95..378ec4751 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleDetailResponse.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleDetailResponse.java @@ -4,14 +4,15 @@ import java.time.ZonedDateTime; import java.util.List; import java.util.function.Function; +import lombok.Builder; import org.locationtech.jts.geom.Point; import site.timecapsulearchive.core.domain.capsule.entity.CapsuleType; -import site.timecapsulearchive.core.domain.capsule.generic_capsule.data.dto.CapsuleDetailDto; import site.timecapsulearchive.core.domain.capsule.group_capsule.data.dto.GroupCapsuleDetailDto; import site.timecapsulearchive.core.domain.group.data.response.GroupMemberSummaryResponse; import site.timecapsulearchive.core.global.common.response.ResponseMappingConstant; @Schema(description = "그룹 캡슐 상세 정보") +@Builder public record GroupCapsuleDetailResponse( @Schema(description = "캡슐 아이디") Long capsuleId, @@ -79,33 +80,8 @@ public static GroupCapsuleDetailResponse createOf( final Function> multiplePreSignUrlFunction, final Function changePointFunction ) { - final CapsuleDetailDto detailDto = groupCapsuleDetailDto.capsuleDetailDto(); - final Point changePoint = changePointFunction.apply(detailDto.point()); - - final List preSignedImageUrls = multiplePreSignUrlFunction.apply( - detailDto.images()); - final List preSignedVideoUrls = multiplePreSignUrlFunction.apply( - detailDto.videos()); - - return new GroupCapsuleDetailResponse( - detailDto.capsuleId(), - singlePreSignUrlFunction.apply(detailDto.capsuleSkinUrl()), - groupCapsuleDetailDto.toGroupMemberSummaryResponse(), - detailDto.dueDate(), - detailDto.nickname(), - detailDto.profileUrl(), - detailDto.createdAt(), - changePoint.getX(), - changePoint.getY(), - detailDto.address(), - detailDto.roadName(), - detailDto.title(), - detailDto.content(), - preSignedImageUrls, - preSignedVideoUrls, - detailDto.isOpened(), - detailDto.capsuleType() - ); + return groupCapsuleDetailDto.toResponse(singlePreSignUrlFunction, + multiplePreSignUrlFunction, changePointFunction); } } \ No newline at end of file diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleSummaryResponse.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleSummaryResponse.java index aa2af6f01..4337b2879 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleSummaryResponse.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/data/response/GroupCapsuleSummaryResponse.java @@ -6,7 +6,6 @@ import java.util.function.Function; import lombok.Builder; import org.locationtech.jts.geom.Point; -import site.timecapsulearchive.core.domain.capsule.generic_capsule.data.dto.CapsuleSummaryDto; import site.timecapsulearchive.core.domain.capsule.group_capsule.data.dto.GroupCapsuleSummaryDto; import site.timecapsulearchive.core.domain.group.data.response.GroupMemberSummaryResponse; import site.timecapsulearchive.core.global.common.response.ResponseMappingConstant; @@ -65,22 +64,6 @@ public static GroupCapsuleSummaryResponse createOf( final Function preSignUrlFunction, final Function changePointFunction ) { - final CapsuleSummaryDto capsuleSummaryDto = summaryDto.capsuleSummaryDto(); - final Point changePoint = changePointFunction.apply(capsuleSummaryDto.point()); - - return new GroupCapsuleSummaryResponse( - summaryDto.toGroupMemberSummaryResponse(), - capsuleSummaryDto.nickname(), - capsuleSummaryDto.profileUrl(), - preSignUrlFunction.apply(capsuleSummaryDto.skinUrl()), - capsuleSummaryDto.title(), - capsuleSummaryDto.dueDate(), - changePoint.getX(), - changePoint.getY(), - capsuleSummaryDto.address(), - capsuleSummaryDto.roadName(), - capsuleSummaryDto.isOpened(), - capsuleSummaryDto.createdAt() - ); + return summaryDto.toResponse(preSignUrlFunction, changePointFunction); } } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/service/PublicCapsuleService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/service/PublicCapsuleService.java index a127f9916..e58b91da6 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/service/PublicCapsuleService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/service/PublicCapsuleService.java @@ -64,8 +64,9 @@ public Slice findPublicCapsulesMadeByFriend( /** * 사용자가 생성한 공개 캡슐 목록을 반환한다 - * @param memberId 조회할 사용자 - * @param size 조회할 캡슐의 개수 + * + * @param memberId 조회할 사용자 + * @param size 조회할 캡슐의 개수 * @param createdAt 조회를 시작할 캡슐의 생성 시간, 첫 조회라면 현재 시간, 이후 조회라면 맨 마지막 데이터의 시간 * @return 사용자가 생성한 공개 캡슐 목록 */ diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/MemberFriendQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/MemberFriendQueryRepository.java index 0f9dcba2c..412deff3f 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/MemberFriendQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/MemberFriendQueryRepository.java @@ -112,9 +112,11 @@ public List findFriendsByPhone( .leftJoin(memberFriend) .on(memberFriend.friend.id.eq(member.id).and(memberFriend.owner.id.eq(memberId))) .leftJoin(friendInviteToFriend) - .on(friendInviteToFriend.friend.id.eq(member.id).and(friendInviteToFriend.owner.id.eq(memberId))) + .on(friendInviteToFriend.friend.id.eq(member.id) + .and(friendInviteToFriend.owner.id.eq(memberId))) .leftJoin(friendInviteToMe) - .on(friendInviteToMe.friend.id.eq(memberId).and(friendInviteToMe.owner.id.eq(member.id))) + .on(friendInviteToMe.friend.id.eq(memberId) + .and(friendInviteToMe.owner.id.eq(member.id))) .where(member.phone_hash.in(hashes)) .fetch(); } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqComponentConstants.java b/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqComponentConstants.java index 1636b5940..cf0b91e0f 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqComponentConstants.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqComponentConstants.java @@ -7,13 +7,19 @@ public enum RabbitmqComponentConstants { CAPSULE_SKIN_QUEUE("request.createCapsuleSkin.queue", "fail.request.createCapsuleSkin.queue"), - CAPSULE_SKIN_EXCHANGE("request.createCapsuleSkin.exchange", "fail.request.createCapsuleSkin.exchange"), - FRIEND_REQUEST_NOTIFICATION_QUEUE("notification.friendRequest.queue", "fail.notification.friendRequest.queue"), - FRIEND_REQUEST_NOTIFICATION_EXCHANGE("notification.friendRequest.exchange", "fail.notification.friendRequest.exchange"), - FRIEND_ACCEPT_NOTIFICATION_QUEUE("notification.friendAccept.queue", "fail.notification.friendAccept.queue"), - FRIEND_ACCEPT_NOTIFICATION_EXCHANGE("notification.friendAccept.exchange", "fail.notification.friendAccept.exchange"), + CAPSULE_SKIN_EXCHANGE("request.createCapsuleSkin.exchange", + "fail.request.createCapsuleSkin.exchange"), + FRIEND_REQUEST_NOTIFICATION_QUEUE("notification.friendRequest.queue", + "fail.notification.friendRequest.queue"), + FRIEND_REQUEST_NOTIFICATION_EXCHANGE("notification.friendRequest.exchange", + "fail.notification.friendRequest.exchange"), + FRIEND_ACCEPT_NOTIFICATION_QUEUE("notification.friendAccept.queue", + "fail.notification.friendAccept.queue"), + FRIEND_ACCEPT_NOTIFICATION_EXCHANGE("notification.friendAccept.exchange", + "fail.notification.friendAccept.exchange"), GROUP_INVITE_QUEUE("notification.groupInvite.queue", "fail.notification.groupInvite.queue"), - GROUP_INVITE_EXCHANGE("notification.groupInvite.exchange", "fail.notification.groupInvite.exchange"); + GROUP_INVITE_EXCHANGE("notification.groupInvite.exchange", + "fail.notification.groupInvite.exchange"); private final String successComponent; private final String failComponent;