-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Feat] 초대 유저 검색 API * [Test] 초대 유저 닉네임 검색 API 문서화용 테스트 * [Fix] ddl reaction 테이블 외래키 이름 수정 * [Feat] {nickname}:{userId}로 커서 수정. 정렬 및 where 조건에 userId 추가 * [Fix] 테스트 파라미터 수정
- Loading branch information
1 parent
1fcb96c
commit 0b4ed3a
Showing
9 changed files
with
175 additions
and
17 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
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
14 changes: 14 additions & 0 deletions
14
keewe-api/src/main/java/ccc/keeweapi/dto/user/InviteeSearchResponse.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,14 @@ | ||
package ccc.keeweapi.dto.user; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@AllArgsConstructor(staticName = "of") | ||
public class InviteeSearchResponse { | ||
// 응답의 닉네임 중 사전순 가장 뒤 | ||
private String nextCursor; | ||
private List<InviteeResponse> invitees; | ||
} |
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
32 changes: 32 additions & 0 deletions
32
...src/main/java/ccc/keewedomain/persistence/repository/user/cursor/InviteeSearchCursor.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,32 @@ | ||
package ccc.keewedomain.persistence.repository.user.cursor; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class InviteeSearchCursor { | ||
private String nickname; | ||
private Long userId; | ||
|
||
public static InviteeSearchCursor from(String cursorStr) { | ||
if(cursorStr == null) { | ||
return new InviteeSearchCursor(null, null); | ||
} | ||
|
||
int lastIndex = cursorStr.lastIndexOf(":"); | ||
String nickname = cursorStr.substring(0, lastIndex); | ||
Long userId = Long.valueOf(cursorStr.substring(lastIndex + 1)); | ||
return new InviteeSearchCursor(nickname, userId); | ||
} | ||
|
||
public static InviteeSearchCursor of(String nickname, Long userId) { | ||
return new InviteeSearchCursor(nickname, userId); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return nickname + ":" + userId; | ||
} | ||
} |
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