-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : 친구 초대 삭제 기능 추가 및 기존 API 동시성, 상태 검증 관리
- Loading branch information
1 parent
ab92eb8
commit ee49032
Showing
9 changed files
with
179 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.idea | ||
|
||
data | ||
backend/data |
28 changes: 28 additions & 0 deletions
28
...in/java/site/timecapsulearchive/core/domain/friend/data/dto/FriendInviteMemberIdsDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package site.timecapsulearchive.core.domain.friend.data.dto; | ||
|
||
import java.util.Objects; | ||
|
||
public record FriendInviteMemberIdsDto( | ||
Long ownerId, | ||
Long friendId | ||
) { | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
|
||
FriendInviteMemberIdsDto that = (FriendInviteMemberIdsDto) o; | ||
return (Objects.equals(ownerId, that.ownerId) && Objects.equals(friendId, that.friendId)) | ||
|| (Objects.equals(ownerId, that.friendId) && Objects.equals(friendId, that.ownerId)); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(ownerId, friendId); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
.../site/timecapsulearchive/core/domain/friend/exception/FriendInviteDuplicateException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package site.timecapsulearchive.core.domain.friend.exception; | ||
|
||
import site.timecapsulearchive.core.global.error.ErrorCode; | ||
import site.timecapsulearchive.core.global.error.exception.BusinessException; | ||
|
||
public class FriendInviteDuplicateException extends BusinessException { | ||
|
||
public FriendInviteDuplicateException() { | ||
super(ErrorCode.FRIEND_INVITE_DUPLICATE_ERROR); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...psulearchive/core/domain/friend/repository/friend_invite/FriendInviteQueryRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
package site.timecapsulearchive.core.domain.friend.repository.friend_invite; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
import site.timecapsulearchive.core.domain.friend.data.dto.FriendInviteMemberIdsDto; | ||
|
||
public interface FriendInviteQueryRepository { | ||
|
||
void bulkSave(final Long ownerId, final List<Long> friendIds); | ||
|
||
List<FriendInviteMemberIdsDto> findFriendInviteMemberIdsDtoByMemberIdsAndFriendId(List<Long> memberIds, Long friendId); | ||
|
||
Optional<FriendInviteMemberIdsDto> findFriendInviteMemberIdsDtoByMemberIdAndFriendId(Long memberId, Long friendId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.