diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApi.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApi.java index 1787aa40b..b78bb9d67 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApi.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApi.java @@ -8,6 +8,7 @@ import site.timecapsulearchive.core.global.common.response.ApiSpec; public interface AnnouncementApi { + @Operation( summary = "공지사항 페이지", description = "모든 공지사항을 가져온다. 최신 공지가 리스트의 맨 처음에 위치한다.", diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApiController.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApiController.java index 5f2f2e136..c85a16d78 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApiController.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/api/AnnouncementApiController.java @@ -6,8 +6,8 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import site.timecapsulearchive.core.domain.announcement.data.response.AnnouncementsResponse; import site.timecapsulearchive.core.domain.announcement.data.dto.AnnouncementDto; +import site.timecapsulearchive.core.domain.announcement.data.response.AnnouncementsResponse; import site.timecapsulearchive.core.domain.announcement.service.AnnouncementService; import site.timecapsulearchive.core.global.common.response.ApiSpec; import site.timecapsulearchive.core.global.common.response.SuccessCode; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/capsule/CapsuleQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/capsule/CapsuleQueryRepositoryImpl.java index 3d0bebde0..16a6161a1 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/capsule/CapsuleQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/capsule/CapsuleQueryRepositoryImpl.java @@ -65,8 +65,9 @@ public List findARCapsuleSummaryDtosByCurrentLocation ) ) .from(capsule) - .join(capsule.capsuleSkin, capsuleSkin) - .join(capsule.member, member) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) .where( ST_Contains(mbr, capsule.point).and(capsuleFilter(capsuleType, memberId, groupIds))) .fetch(); @@ -114,8 +115,6 @@ public List findCapsuleSummaryDtosByCurrentLocationAndC ) ) .from(capsule) - .join(capsule.capsuleSkin, capsuleSkin) - .join(capsule.member, member) .where( ST_Contains(mbr, capsule.point).and(capsuleFilter(capsuleType, memberId, groupIds))) .fetch(); @@ -143,8 +142,6 @@ public List findFriendsCapsuleSummaryDtosByCurrentLocat ) ) .from(capsule) - .join(capsule.capsuleSkin, capsuleSkin) - .join(capsule.member, member) .where(ST_Contains(mbr, capsule.point).and(capsule.member.id.in(friendIds)) .and(capsule.type.eq(CapsuleType.PUBLIC))) .fetch(); @@ -181,8 +178,9 @@ public List findFriendsARCapsulesByCurrentLocation( ) ) .from(capsule) - .join(capsule.capsuleSkin, capsuleSkin) - .join(capsule.member, member) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) .where(ST_Contains(mbr, capsule.point).and(capsule.member.id.in(friendIds)) .and(capsule.type.eq(CapsuleType.PUBLIC))) .fetch(); @@ -201,7 +199,8 @@ public Optional findTreasureCapsuleSummary(final Long ) ) .from(capsule) - .join(capsule.capsuleSkin, capsuleSkin) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) .where(capsule.id.eq(capsuleId)) .fetchOne() ); diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleOpenQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleOpenQueryRepositoryImpl.java index d86a90b40..600f5e157 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleOpenQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleOpenQueryRepositoryImpl.java @@ -75,8 +75,9 @@ public List findGroupCapsuleMembers( ) ) .from(groupCapsuleOpen) - .join(memberGroup).on(groupCapsuleOpen.member.id.eq(memberGroup.member.id)) - .join(groupCapsuleOpen.member, member) + .join(memberGroup) + .on(groupCapsuleOpen.member.eq(memberGroup.member), memberGroup.deletedAt.isNull()) + .join(member).on(groupCapsuleOpen.member.eq(member), member.deletedAt.isNull()) .where(groupCapsuleOpen.group.id.eq(groupId) .and(groupCapsuleOpen.capsule.id.eq(capsuleId)) .and(memberGroup.group.id.eq(groupId)) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleQueryRepository.java index be96a98b2..a34b3b958 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/group_capsule/repository/GroupCapsuleQueryRepository.java @@ -1,8 +1,6 @@ package site.timecapsulearchive.core.domain.capsule.group_capsule.repository; -import static com.querydsl.core.group.GroupBy.groupBy; import static site.timecapsulearchive.core.domain.capsule.entity.QCapsule.capsule; -import static site.timecapsulearchive.core.domain.capsule.entity.QGroupCapsuleOpen.groupCapsuleOpen; import static site.timecapsulearchive.core.domain.capsule.entity.QImage.image; import static site.timecapsulearchive.core.domain.capsule.entity.QVideo.video; import static site.timecapsulearchive.core.domain.capsuleskin.entity.QCapsuleSkin.capsuleSkin; @@ -26,7 +24,6 @@ import site.timecapsulearchive.core.domain.capsule.group_capsule.data.dto.GroupCapsuleDto; import site.timecapsulearchive.core.domain.capsule.group_capsule.data.dto.GroupCapsuleSummaryDto; import site.timecapsulearchive.core.domain.capsule.group_capsule.data.dto.GroupSpecificCapsuleSliceRequestDto; -import site.timecapsulearchive.core.domain.member.entity.QMember; import site.timecapsulearchive.core.global.util.SliceUtil; @Repository @@ -63,10 +60,11 @@ public Optional findGroupCapsuleDetailDtoByCapsuleId( ) .from(capsule) .join(capsule.member, member) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) - .join(capsule.group, group) - .leftJoin(image).on(capsule.id.eq(image.capsule.id)) - .leftJoin(video).on(capsule.id.eq(video.capsule.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(group).on(capsule.group.eq(group), group.deletedAt.isNull()) + .leftJoin(image).on(capsule.eq(image.capsule), image.deletedAt.isNull()) + .leftJoin(video).on(capsule.eq(video.capsule), video.deletedAt.isNull()) .where(capsule.id.eq(capsuleId).and(capsule.type.eq(CapsuleType.GROUP))) .fetchOne() ); @@ -101,9 +99,10 @@ public Optional findGroupCapsuleSummaryDtoByCapsuleId( ) ) .from(capsule) - .join(capsule.member, member) - .join(capsule.capsuleSkin, capsuleSkin) - .join(capsule.group, group) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) + .join(group).on(capsule.group.eq(group), group.deletedAt.isNull()) .where(capsule.id.eq(capsuleId) .and(capsule.type.eq(CapsuleType.GROUP)) ) @@ -130,8 +129,9 @@ public Slice findMyGroupCapsuleSlice( ) ) .from(capsule) - .join(member).on(capsule.member.id.eq(member.id)) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) .where(capsule.member.id.eq(memberId) .and(capsule.createdAt.lt(createdAt)) .and(capsule.type.eq(CapsuleType.GROUP))) @@ -222,11 +222,12 @@ public Slice findGroupCapsuleSlice( ) ) .from(capsule) - .join(capsule.member, member) - .join(capsule.capsuleSkin, capsuleSkin) - .join(capsule.group, group) - .leftJoin(image).on(capsule.id.eq(image.capsule.id)) - .leftJoin(video).on(capsule.id.eq(video.capsule.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) + .join(group).on(capsule.group.eq(group), group.deletedAt.isNull()) + .leftJoin(image).on(capsule.eq(image.capsule), image.deletedAt.isNull()) + .leftJoin(video).on(capsule.eq(video.capsule), video.deletedAt.isNull()) .where(capsule.type.eq(CapsuleType.GROUP) .and(capsule.group.id.in(groupIds)) .and(capsuleIdPagingCursorCondition(lastCapsuleId))) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/repository/PublicCapsuleQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/repository/PublicCapsuleQueryRepository.java index f81780359..2ca2d7797 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/repository/PublicCapsuleQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/public_capsule/repository/PublicCapsuleQueryRepository.java @@ -72,12 +72,13 @@ public Optional findPublicCapsuleDetailDtosByMemberIdAnd ) ) .from(capsule) - .join(member).on(capsule.member.id.eq(member.id)) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) - .leftJoin(memberFriend).on(capsule.member.id.eq(memberFriend.owner.id) - .or(capsule.member.id.eq(memberFriend.friend.id))) - .leftJoin(image).on(capsule.id.eq(image.capsule.id)) - .leftJoin(video).on(capsule.id.eq(video.capsule.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) + .leftJoin(memberFriend).on(capsule.member.eq(memberFriend.owner) + .or(capsule.member.eq(memberFriend.friend)), memberFriend.deletedAt.isNull()) + .leftJoin(image).on(capsule.eq(image.capsule), image.deletedAt.isNull()) + .leftJoin(video).on(capsule.eq(video.capsule), video.deletedAt.isNull()) .where(capsule.id.eq(capsuleId).and(capsule.type.eq(CapsuleType.PUBLIC)) .and(eqMemberIdOrFriendId(memberId))) .fetchFirst(); @@ -118,10 +119,11 @@ public Optional findPublicCapsuleSummaryDtosByMemberIdA ) ) .from(capsule) - .join(member).on(capsule.member.id.eq(member.id)) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) - .leftJoin(memberFriend).on(capsule.member.id.eq(memberFriend.owner.id) - .or(capsule.member.id.eq(memberFriend.friend.id))) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) + .leftJoin(memberFriend).on(capsule.member.eq(memberFriend.owner) + .or(capsule.member.eq(memberFriend.friend)), memberFriend.deletedAt.isNull()) .where(capsule.id.eq(capsuleId).and(capsule.type.eq(CapsuleType.PUBLIC)) .and(eqMemberIdOrFriendId(memberId))) .groupBy(capsule.id) @@ -167,10 +169,11 @@ public Slice findPublicCapsulesDtoMadeByFriend( ) ) .from(capsule) - .join(member).on(capsule.member.id.eq(member.id)) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) - .leftJoin(image).on(capsule.id.eq(image.capsule.id)) - .leftJoin(video).on(capsule.id.eq(video.capsule.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) + .leftJoin(image).on(capsule.eq(image.capsule), image.deletedAt.isNull()) + .leftJoin(video).on(capsule.eq(video.capsule), video.deletedAt.isNull()) .where(capsule.member.id.in(memberIds) .and(capsule.createdAt.lt(createdAt)) .and(capsule.type.eq(CapsuleType.PUBLIC))) @@ -202,8 +205,9 @@ public Slice findMyPublicCapsuleSlice( ) ) .from(capsule) - .join(member).on(capsule.member.id.eq(member.id)) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) .where(capsule.member.id.eq(memberId) .and(capsule.createdAt.lt(createdAt)) .and(capsule.type.eq(CapsuleType.PUBLIC))) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/repository/SecretCapsuleQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/repository/SecretCapsuleQueryRepository.java index fff856330..6c8a8fcf0 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/repository/SecretCapsuleQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/secret_capsule/repository/SecretCapsuleQueryRepository.java @@ -82,10 +82,11 @@ public Optional findSecretCapsuleDetailDtosByMemberIdAndCapsul ) ) .from(capsule) - .join(member).on(capsule.member.id.eq(member.id)) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) - .leftJoin(image).on(capsule.id.eq(image.capsule.id)) - .leftJoin(video).on(capsule.id.eq(video.capsule.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) + .join(member).on(capsule.member.eq(member), member.deletedAt.isNull()) + .leftJoin(image).on(capsule.eq(image.capsule), image.deletedAt.isNull()) + .leftJoin(video).on(capsule.eq(video.capsule), video.deletedAt.isNull()) .where( capsule.id.eq(capsuleId) .and(capsule.member.id.eq(memberId)) @@ -122,7 +123,8 @@ public Slice findSecretCapsuleSliceByMemberIdAndCreatedAt( ) ) .from(capsule) - .join(capsuleSkin).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) + .join(capsuleSkin) + .on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) .where( capsule.member.id.eq(memberId), capsule.createdAt.lt(createdAt), diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/data/dto/CapsuleSkinDeleteResultDto.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/data/dto/CapsuleSkinDeleteResultDto.java index 11328b679..8c035812c 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/data/dto/CapsuleSkinDeleteResultDto.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/data/dto/CapsuleSkinDeleteResultDto.java @@ -6,7 +6,8 @@ public record CapsuleSkinDeleteResultDto( ) { public static CapsuleSkinDeleteResultDto fail() { - return new CapsuleSkinDeleteResultDto(CapsuleSkinDeleteResult.FAIL, "캡슐 스킨이 존재하지 않거나 캡슐에 사용되고 있습니다."); + return new CapsuleSkinDeleteResultDto(CapsuleSkinDeleteResult.FAIL, + "캡슐 스킨이 존재하지 않거나 캡슐에 사용되고 있습니다."); } public static CapsuleSkinDeleteResultDto success() { diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/repository/CapsuleSkinQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/repository/CapsuleSkinQueryRepositoryImpl.java index d4b1a4227..c95eef12e 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/repository/CapsuleSkinQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/repository/CapsuleSkinQueryRepositoryImpl.java @@ -59,7 +59,7 @@ public boolean existRelatedCapsule(final Long memberId, final Long capsuleSkinId Integer count = jpaQueryFactory .selectOne() .from(capsuleSkin) - .join(capsule).on(capsule.capsuleSkin.id.eq(capsuleSkin.id)) + .join(capsule).on(capsule.capsuleSkin.eq(capsuleSkin), capsuleSkin.deletedAt.isNull()) .where(capsuleSkin.id.eq(capsuleSkinId).and(capsuleSkin.member.id.eq(memberId)) .and(capsule.deletedAt.isNull())) .fetchOne(); diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/service/CapsuleSkinService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/service/CapsuleSkinService.java index 1395f74d3..fbe7ec286 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/service/CapsuleSkinService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsuleskin/service/CapsuleSkinService.java @@ -81,12 +81,14 @@ public CapsuleSkinDeleteResultDto deleteCapsuleSkin( final Long memberId, final Long capsuleSkinId ) { - boolean existRelatedCapsule = capsuleSkinRepository.existRelatedCapsule(memberId, capsuleSkinId); + boolean existRelatedCapsule = capsuleSkinRepository.existRelatedCapsule(memberId, + capsuleSkinId); if (existRelatedCapsule) { return CapsuleSkinDeleteResultDto.fail(); } - CapsuleSkin capsuleSkin = capsuleSkinRepository.findCapsuleSkinByMemberIdAndId(memberId, capsuleSkinId) + CapsuleSkin capsuleSkin = capsuleSkinRepository.findCapsuleSkinByMemberIdAndId(memberId, + capsuleSkinId) .orElseThrow(CapsuleSkinNotFoundException::new); capsuleSkinRepository.delete(capsuleSkin); diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteQueryRepositoryImpl.java index 33e02694d..496fe671e 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/friend_invite/FriendInviteQueryRepositoryImpl.java @@ -76,7 +76,7 @@ public Slice findFriendReceivingInvitesSlice( ) ) .from(friendInvite) - .join(friendInvite.owner, member) + .join(member).on(friendInvite.owner.eq(member), member.deletedAt.isNull()) .where(friendInvite.friend.id.eq(memberId).and(friendInvite.createdAt.lt(createdAt))) .limit(size + 1) .fetch(); @@ -101,7 +101,7 @@ public Slice findFriendSendingInvitesSlice( ) ) .from(friendInvite) - .join(friendInvite.owner, member) + .join(member).on(friendInvite.owner.eq(member), member.deletedAt.isNull()) .where(friendInvite.owner.id.eq(memberId).and(friendInvite.createdAt.lt(createdAt))) .limit(size + 1) .fetch(); diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/member_friend/MemberFriendQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/member_friend/MemberFriendQueryRepositoryImpl.java index f4cfbf8f6..79ce9c88b 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/member_friend/MemberFriendQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/friend/repository/member_friend/MemberFriendQueryRepositoryImpl.java @@ -51,8 +51,8 @@ public Slice findFriendsSlice( ) ) .from(memberFriend) - .innerJoin(member).on(memberFriend.owner.id.eq(member.id)) - .innerJoin(member).on(memberFriend.friend.id.eq(member.id)) + .join(member).on(memberFriend.owner.eq(member), member.deletedAt.isNull()) + .join(member).on(memberFriend.friend.eq(member), member.deletedAt.isNull()) .where(memberFriend.owner.id.eq(memberId).and(memberFriend.createdAt.lt(createdAt))) .limit(size + 1) .fetch(); @@ -118,13 +118,16 @@ public List findFriendsByPhone( ) .from(member) .leftJoin(memberFriend) - .on(memberFriend.friend.id.eq(member.id).and(memberFriend.owner.id.eq(memberId))) + .on(memberFriend.friend.id.eq(member.id).and(memberFriend.owner.id.eq(memberId)), + memberFriend.deletedAt.isNull()) .leftJoin(friendInviteToFriend) .on(friendInviteToFriend.friend.id.eq(member.id) - .and(friendInviteToFriend.owner.id.eq(memberId))) + .and(friendInviteToFriend.owner.id.eq(memberId)), + friendInviteToFriend.deletedAt.isNull()) .leftJoin(friendInviteToMe) .on(friendInviteToMe.friend.id.eq(memberId) - .and(friendInviteToMe.owner.id.eq(member.id))) + .and(friendInviteToMe.owner.id.eq(member.id)), + friendInviteToMe.deletedAt.isNull()) .where(member.phoneHash.in(hashes).and(member.phoneSearchAvailable.eq(Boolean.TRUE))) .fetch(); } @@ -163,13 +166,16 @@ public Optional findFriendsByTag( ) .from(member) .leftJoin(memberFriend) - .on(memberFriend.friend.id.eq(member.id).and(memberFriend.owner.id.eq(memberId))) + .on(memberFriend.friend.id.eq(member.id).and(memberFriend.owner.id.eq(memberId)), + memberFriend.deletedAt.isNull()) .leftJoin(friendInviteToFriend) .on(friendInviteToFriend.friend.id.eq(member.id) - .and(friendInviteToFriend.owner.id.eq(memberId))) + .and(friendInviteToFriend.owner.id.eq(memberId)), + friendInviteToFriend.deletedAt.isNull()) .leftJoin(friendInviteToMe) .on(friendInviteToMe.owner.id.eq(member.id) - .and(friendInviteToMe.friend.id.eq(memberId))) + .and(friendInviteToMe.friend.id.eq(memberId)), + friendInviteToMe.deletedAt.isNull()) .where(tagFullTextSearchTemplate.gt(MATCH_THRESHOLD) .and(member.tagSearchAvailable.eq(Boolean.TRUE))) .orderBy(tagFullyMatchFirstOrder, tagFullTextSearchTemplate.desc()) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepositoryImpl.java index f01d8c9de..18ac63a38 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/group/repository/GroupQueryRepositoryImpl.java @@ -47,7 +47,7 @@ public Slice findGroupSummaries( ) ) .from(memberGroup) - .join(memberGroup.group, group) + .join(group).on(memberGroup.group.eq(group), group.deletedAt.isNull()) .where(memberGroup.member.id.eq(memberId).and(memberGroup.createdAt.lt(createdAt))) .orderBy(group.id.desc()) .limit(size + 1) @@ -66,8 +66,8 @@ public List getGroupOwnerProfileUrls(final List groupIds) { return jpaQueryFactory .select(member.profileUrl) .from(memberGroup) - .join(memberGroup.group, group) - .join(memberGroup.member, member) + .join(group).on(memberGroup.group.eq(group), group.deletedAt.isNull()) + .join(member).on(memberGroup.member.eq(member), member.deletedAt.isNull()) .where(memberGroup.group.id.in(groupIds) .and(memberGroup.isOwner.eq(true))) .orderBy(group.id.desc()) @@ -98,8 +98,10 @@ public Optional findGroupDetailByGroupIdAndMemberId(final Long g GroupDetailDto groupDetailDtoIncludeMe = jpaQueryFactory .selectFrom(group) - .join(memberGroup).on(memberGroup.group.id.eq(group.id)) - .join(member).on(member.id.eq(memberGroup.member.id)) + .join(memberGroup).on(memberGroup.group.eq(group), + memberGroup.deletedAt.isNull()) + .join(member).on(member.eq(memberGroup.member), + member.deletedAt.isNull()) .where(group.id.eq(groupId)) .transform( groupBy(group.id).as( diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/repository/MemberQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/repository/MemberQueryRepositoryImpl.java index c3d1b94a2..26d3e3699 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/repository/MemberQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member/repository/MemberQueryRepositoryImpl.java @@ -89,8 +89,10 @@ public Optional findMemberDetailResponseDtoById(final Long memb ) ) .from(member) - .leftJoin(memberFriend).on(member.id.eq(memberFriend.owner.id)) - .leftJoin(memberGroup).on(member.id.eq(memberGroup.member.id)) + .leftJoin(memberFriend).on(member.eq(memberFriend.owner), + memberFriend.deletedAt.isNull()) + .leftJoin(memberGroup).on(member.eq(memberGroup.member), + memberGroup.deletedAt.isNull()) .where(member.id.eq(memberId)) .groupBy(member.id) .fetchOne() diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/group_invite_repository/GroupInviteQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/group_invite_repository/GroupInviteQueryRepositoryImpl.java index 4305daacb..7d819e911 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/group_invite_repository/GroupInviteQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/group_invite_repository/GroupInviteQueryRepositoryImpl.java @@ -96,8 +96,8 @@ public Slice findGroupReceivingInvitesSlice( ) ) .from(groupInvite) - .join(groupInvite.group, group) - .join(groupInvite.groupOwner, member) + .join(group).on(groupInvite.group.eq(group), group.deletedAt.isNull()) + .join(member).on(groupInvite.groupOwner.eq(member), member.deletedAt.isNull()) .where(groupInvite.groupMember.id.eq(memberId).and(groupInvite.createdAt.lt(createdAt))) .orderBy(groupInvite.id.desc()) .limit(size + 1) @@ -134,7 +134,7 @@ public Slice findGroupSendingInvites( ) ) .from(groupInvite) - .join(groupInvite.groupMember, member) + .join(member).on(groupInvite.groupMember.eq(member), member.deletedAt.isNull()) .where( groupInviteIdPagingCursorCondition(dto), groupInvite.group.id.eq(dto.groupId()) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/member_group_repository/MemberGroupQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/member_group_repository/MemberGroupQueryRepositoryImpl.java index c854b7453..d2877fd9c 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/member_group_repository/MemberGroupQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/member_group/repository/member_group_repository/MemberGroupQueryRepositoryImpl.java @@ -34,8 +34,8 @@ public Optional findOwnerInMemberGroup(final Long groupId, ) ) .from(memberGroup) - .join(memberGroup.member, member) - .join(memberGroup.group, group) + .join(member).on(memberGroup.member.eq(member), member.deletedAt.isNull()) + .join(group).on(memberGroup.group.eq(group), group.deletedAt.isNull()) .where(memberGroup.group.id.eq(groupId) .and(memberGroup.member.id.eq(memberId))) .fetchFirst() @@ -90,7 +90,7 @@ public List findGroupMemberInfos( ) ) .from(memberGroup) - .join(memberGroup.member, member) + .join(member).on(memberGroup.member.eq(member), member.deletedAt.isNull()) .where(memberGroup.group.id.eq(groupId)) .fetch(); } @@ -141,8 +141,9 @@ public List findGroupCapsuleMembers( ) ) .from(memberGroup) - .join(memberGroup.member, member) - .join(groupCapsuleOpen).on(memberGroup.member.id.eq(groupCapsuleOpen.member.id)) + .join(member).on(memberGroup.member.eq(member), member.deletedAt.isNull()) + .join(groupCapsuleOpen).on(memberGroup.member.id.eq(groupCapsuleOpen.member.id), + groupCapsuleOpen.deletedAt.isNull()) .where(memberGroup.group.id.eq(groupId).and(groupCapsuleOpen.capsule.id.eq(capsuleId))) .fetch(); } diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/notification/repository/NotificationQueryRepositoryImpl.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/notification/repository/NotificationQueryRepositoryImpl.java index 3bb07446a..cc98d762e 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/notification/repository/NotificationQueryRepositoryImpl.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/notification/repository/NotificationQueryRepositoryImpl.java @@ -38,7 +38,9 @@ public Slice findNotificationSliceByMemberId( ) ) .from(notification) - .join(notification.notificationCategory, notificationCategory) + .join(notificationCategory) + .on(notification.notificationCategory.eq(notificationCategory), + notificationCategory.deletedAt.isNull()) .where(notification.createdAt.lt(createdAt).and(notification.member.id.eq(memberId))) .orderBy(notification.id.desc()) .limit(size + 1) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqProperties.java b/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqProperties.java index a8e11e847..20ec38ac2 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqProperties.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/global/config/rabbitmq/RabbitmqProperties.java @@ -16,13 +16,14 @@ public record RabbitmqProperties( @NestedConfigurationProperty SSL ssl ) { + + public boolean isSslEnabled() { + return ssl != null && ssl.enabled; + } + protected record SSL( boolean enabled ) { } - - public boolean isSslEnabled() { - return ssl != null && ssl.enabled; - } } \ No newline at end of file diff --git a/backend/notification/src/main/resources/config b/backend/notification/src/main/resources/config index af9f352fc..1ee7ab86c 160000 --- a/backend/notification/src/main/resources/config +++ b/backend/notification/src/main/resources/config @@ -1 +1 @@ -Subproject commit af9f352fc1906f73672e340e7731c4352e270c59 +Subproject commit 1ee7ab86c074698d0e81ba783212e3cd08090a3d