perf(chat): 分页客服会话并拆分统计查询

This commit is contained in:
yml2213
2026-08-25 19:21:38 +08:00
parent d95b95211c
commit 52dcb18c96
16 changed files with 264 additions and 87 deletions
+11 -10
View File
@@ -20,16 +20,17 @@ type ChatEvent struct {
// MessageData 是事件中携带的消息数据,与 chat.MessageDTO 对齐。
type MessageData struct {
ID uint64 `json:"id"`
ConversationID uint64 `json:"conversation_id"`
SenderType string `json:"sender_type"`
SenderID uint64 `json:"sender_id"`
SenderRole string `json:"sender_role"`
SenderName string `json:"sender_name"`
ContentType string `json:"content_type"`
Content string `json:"content"`
AttachmentURLS []string `json:"attachment_urls"`
CreatedAt string `json:"created_at"`
ID uint64 `json:"id"`
ConversationID uint64 `json:"conversation_id"`
SenderType string `json:"sender_type"`
SenderID uint64 `json:"sender_id"`
SenderRole string `json:"sender_role"`
SenderName string `json:"sender_name"`
ContentType string `json:"content_type"`
Content string `json:"content"`
AttachmentURLS []string `json:"attachment_urls"`
AdminAttentionType string `json:"admin_attention_type,omitempty"`
CreatedAt string `json:"created_at"`
}
// principal 标识一个连接方。