1
This commit is contained in:
@@ -11,6 +11,18 @@ type ContextTo struct {
|
||||
App string `json:"app"` // im.customer 固定值
|
||||
}
|
||||
|
||||
// ContextMsg 消息发送接口 - 向用户发送在线消息
|
||||
type ContextMsg struct {
|
||||
Id string `json:"id"` // uuid 随机生成字符串
|
||||
Lang string `json:"lang"` // 固定值 zh_CN
|
||||
Type string `json:"type"` // 固定值 chat_message
|
||||
From ContextFrom `json:"from"`
|
||||
To ContextTo `json:"to"`
|
||||
Body ContextBody `json:"body"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
ClientTime int64 `json:"clientTime"`
|
||||
}
|
||||
|
||||
type ContextBody struct {
|
||||
Type string `json:"type"` // 消息类型,根据需求场景
|
||||
Content string `json:"content"` // 字符型,必须。文本消息内容。
|
||||
@@ -27,19 +39,6 @@ type ContextBodyChatInfo struct {
|
||||
Source string `json:"source"` // dd_msg_产品线标识_消息标识“ 必传
|
||||
}
|
||||
|
||||
// ContextMsg 消息发送接口 - 向用户发送在线消息
|
||||
type ContextMsg struct {
|
||||
Id string `json:"id"` // uuid 随机生成字符串
|
||||
Lang string `json:"lang"` // 固定值 zh_CN
|
||||
Type string `json:"type"` // 固定值 chat_message
|
||||
From ContextFrom `json:"from"`
|
||||
To ContextTo `json:"to"`
|
||||
//Body ContextBody `json:"body"`
|
||||
Body interface{} `json:"body"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
ClientTime int64 `json:"clientTime"`
|
||||
}
|
||||
|
||||
type BaseInfo struct {
|
||||
AppKey string `json:"app_key"`
|
||||
Token string `json:"token"`
|
||||
@@ -51,8 +50,8 @@ type BaseInfo struct {
|
||||
}
|
||||
|
||||
type JdParamJsonObj struct {
|
||||
StatusId string `json:"statusId"`
|
||||
BillId string `json:"billId"`
|
||||
StatusId string `json:"statusId"` // 由于推送消息不含有次参数,存储的为jxid
|
||||
BillId string `json:"billId"` // 由于推送消息不含有次参数,存储的为平台id320406
|
||||
ExtendJsonData string `json:"extendJsonData"`
|
||||
StoreId string `json:"storeId"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
@@ -93,9 +92,53 @@ type UserChatMsg struct {
|
||||
App string `json:"app"` // 接收消息的app
|
||||
ClientType string `json:"clientType"` // 接收消息的终端"
|
||||
} `json:"to"`
|
||||
Body interface{} `json:"body"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
ClientTime int64 `json:"clientTime"`
|
||||
Body UserChatMsgBody `json:"body"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
ClientTime int64 `json:"clientTime"`
|
||||
}
|
||||
|
||||
type UserChatMsgBody struct {
|
||||
Chatinfo struct {
|
||||
IMService bool `json:"IMService"`
|
||||
AppId string `json:"appId"`
|
||||
AskAllocateType string `json:"askAllocateType"`
|
||||
AskType string `json:"askType"`
|
||||
DdSessionType string `json:"ddSessionType"`
|
||||
DeviceNo string `json:"deviceNo"`
|
||||
DisputeId int `json:"disputeId"`
|
||||
DistinguishPersonJimi int `json:"distinguishPersonJimi"`
|
||||
Eidtoken string `json:"eidtoken"`
|
||||
Entry string `json:"entry"`
|
||||
FirstMsg bool `json:"firstMsg"`
|
||||
IsJdSuperMarket string `json:"isJdSuperMarket"`
|
||||
Label int `json:"label"`
|
||||
LeaveMsgTable int `json:"leaveMsgTable"`
|
||||
OGroupId int `json:"oGroupId"`
|
||||
OSid string `json:"oSid"`
|
||||
ProVer string `json:"proVer"`
|
||||
Region string `json:"region"`
|
||||
RepeatConsult int `json:"repeatConsult"`
|
||||
RepeatHuman int `json:"repeatHuman"`
|
||||
Sid string `json:"sid"`
|
||||
Source string `json:"source"`
|
||||
StoreId string `json:"storeId"`
|
||||
SystemVer string `json:"systemVer"`
|
||||
VenderId string `json:"venderId"`
|
||||
VenderName string `json:"venderName"`
|
||||
Verification string `json:"verification"`
|
||||
} `json:"chatinfo"`
|
||||
Content string `json:"content"`
|
||||
LlmStream int `json:"llmStream"`
|
||||
Param struct {
|
||||
Ref string `json:"$ref"`
|
||||
} `json:"param"`
|
||||
RequestData struct {
|
||||
Entry string `json:"entry"`
|
||||
VenderId string `json:"venderId"`
|
||||
} `json:"requestData"`
|
||||
Sid string `json:"sid"`
|
||||
Thumbnail string `json:"thumbnail"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// UserMsgReadAck 已读消息推送
|
||||
|
||||
Reference in New Issue
Block a user