1
This commit is contained in:
55
business/partner/im/im_model.go
Normal file
55
business/partner/im/im_model.go
Normal file
@@ -0,0 +1,55 @@
|
||||
package im
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
)
|
||||
|
||||
// SendData 客户端写入参数
|
||||
type SendData struct {
|
||||
VendorID int `json:"vendorID"` //消息来源平台ID 1-美团 3-饿了么
|
||||
Data interface{} `json:"data"` //发送给平台 美团/饿了么消息结构体
|
||||
}
|
||||
|
||||
// JXMsg 京西消息结构体
|
||||
type JXMsg struct {
|
||||
SendType string `json:"sendType"` //消息发送方 jx-商家;mt-美团;elm-饿了么
|
||||
MsgContent interface{} `json:"msgContent"` //美团/饿了么 单聊消息
|
||||
}
|
||||
|
||||
// UserMessageList 用户消息列表
|
||||
type UserMessageList struct {
|
||||
VendorID int `json:"vendorID"` //平台品牌 1-美团 3-饿了么
|
||||
UserID string `json:"userID"` //用户ID
|
||||
NewMessageNum int `json:"NewMessageNum"` //新消息数量
|
||||
LatestMsg string `json:"latestMsg"` //最新一条消息
|
||||
LatestTime int `json:"latestTime"` //最新一条消息发送时间
|
||||
}
|
||||
|
||||
type RelInfo struct {
|
||||
VendorStoreID string `json:"vendorStoreID"` //平台门店id
|
||||
VendorID string `json:"vendorID"` //平台标识id
|
||||
AppID string `json:"appID"` //应用ID
|
||||
}
|
||||
|
||||
type UserRelInfo struct {
|
||||
VendorStoreID string `json:"vendorStoreID"` //平台门店id
|
||||
VendorID string `json:"vendorID"` //平台标识id
|
||||
AppID string `json:"appID"` //应用ID
|
||||
UserID string `json:"userID"` //用户id/groupID
|
||||
}
|
||||
|
||||
var (
|
||||
rdb = api.Cacher
|
||||
VendorIDMT = 1 //im美团
|
||||
VendorIDELM = 3 //im饿了么
|
||||
SendTypeJx = "jx" //京西客户端发送方标识
|
||||
SendTypeMt = "mt" //美团用户发送方标识符
|
||||
SendTypeElm = "elm" //饿了么用户发送方标识符
|
||||
|
||||
)
|
||||
|
||||
const (
|
||||
ExpireTimeDay = 6 * time.Hour //redis过期时间
|
||||
)
|
||||
Reference in New Issue
Block a user