-
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.
Merge pull request #88 from billbill-project/feature/chat
[feat] 채팅목록 조회 구현
- Loading branch information
Showing
10 changed files
with
159 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
27 changes: 27 additions & 0 deletions
27
src/main/java/site/billbill/apiserver/api/chat/dto/request/WebhookRequest.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,27 @@ | ||
package site.billbill.apiserver.api.chat.dto.request; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.List; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
public class WebhookRequest { | ||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public static class ChatInfo { | ||
private String channelId; | ||
private int unreadCount; | ||
private String lastChat; | ||
private String lastSender; | ||
private LocalDateTime updatedAt; | ||
} | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public static class ChatInfoList { | ||
private List<ChatInfo> chatInfoList; | ||
} | ||
} |
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
4 changes: 4 additions & 0 deletions
4
src/main/java/site/billbill/apiserver/api/chat/service/ChatService.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,12 +1,16 @@ | ||
package site.billbill.apiserver.api.chat.service; | ||
|
||
import java.util.List; | ||
import site.billbill.apiserver.api.chat.dto.request.ChatRequest; | ||
import site.billbill.apiserver.api.chat.dto.response.ChatResponse.ViewChannelInfoResponse; | ||
import site.billbill.apiserver.api.chat.dto.response.ChatResponse.ViewChatInfoResponse; | ||
|
||
public interface ChatService { | ||
String leaveChatChannel(String postId, String userId); | ||
|
||
ViewChannelInfoResponse getInfoChannel(String channelId, String userId); | ||
|
||
String startChannel(ChatRequest.borrowInfo request, String userId); | ||
|
||
List<ViewChatInfoResponse> getChatList(String beforeTimestamp, String 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
4 changes: 4 additions & 0 deletions
4
src/main/java/site/billbill/apiserver/api/chat/service/WebhookService.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,5 +1,9 @@ | ||
package site.billbill.apiserver.api.chat.service; | ||
|
||
import java.util.List; | ||
import site.billbill.apiserver.api.chat.dto.request.WebhookRequest; | ||
|
||
public interface WebhookService { | ||
void sendWebhookForChatRoomCreate(String channelId, String contact, String owner); | ||
WebhookRequest.ChatInfoList sendWebhookForChatList(List<String> chatRoomIds, String beforeTimestamp); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
public enum ChannelState { | ||
PRE, // 거래전 | ||
ACCEPTED, // 거래수락 | ||
CONFIRMED, // 거래확정 | ||
CANCELLED // 거래취소 | ||
} | ||
|
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