package im import ( "time" "git.rosy.net.cn/jx-callback/globals/api" ) var AutoReplyByAppID = map[int]string{ 589: "QPMenQQVcXBZ4vbwAw6jJBHVBCB2jQCGOfR5yI1cSRbdvc6VMEW9G/zCvTY7YOeCeKuo8HbB03TQHS3Y4ygGPwW40ppeJ+D1+dUeOGwy+ik=", 5873: "eCGDImGw4qAQDZPxzjVzKZUI+mRSnrPSjYo5iOVzcX3H4h1Y8F/J5SPahKARqLPDN9Ez7o46JgUMK997jTId6UVmA5VPtYjrM6Zqjlzf9EY=", 4123: "fu4TXW2odzkbvVDZZZU0gZAOw/cI+7fSU/U9NRv5Q1JQpmeLPmrdgpDxHelGijuRfM+PD+5nmV7jrHqOXxzAiJBPcU50Da014sQHH/Tn/P8=", } // 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 OrderID string `json:"orderID"` //已下单才有 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" //饿了么用户发送方标识符 OpTypeAdd = 1 //门店新增或修改自定义回复模板 OpTypeGet = 2 //门店获取 BaseCusKey = "customReply" ) const ( ExpireTimeDay = 12 * time.Hour //redis过期时间 )