diff --git a/business/partner/im/im.go b/business/partner/im/im.go index f7923f3be..ec1a02990 100644 --- a/business/partner/im/im.go +++ b/business/partner/im/im.go @@ -284,6 +284,7 @@ func SetMessageDetail(req *JXMsg, vendorID int, elmAppID string) error { } //生成京西消息ID detail msgID := GenMsgDetailID(req, vendorID, elmAppID) + data, _ := json.Marshal(req) globals.SugarLogger.Debugf("SetMessageDetail data=%s", string(data)) err := rdb.RPush(msgID, string(data)) @@ -402,6 +403,30 @@ func FilterUserList(val string) bool { return true } +// FilterChatDetail 去重 +func FilterChatDetail(req *JXMsg, vendorID int) { + //if vendorID == VendorIDMT { + // mt := req.MsgContent.(mtwmapi.PushContentReq) + // temp, _ := GetImChatDetail([]UserRelInfo{{ + // VendorStoreID: mt.AppPoiCode, + // VendorID: "1", + // AppID: utils.Int2Str(mt.AppID), + // UserID: utils.Int2Str(mt.OpenUserID), + // }}) + // + //} + // + //if vendorID == VendorIDELM { + // elm := req.MsgContent.(ebaiapi.ImMessageSend) + // temp, _ := GetImChatDetail([]UserRelInfo{{ + // VendorStoreID: elm.PlatformShopID, + // VendorID: "3", + // AppID: "34665", + // UserID: elm.PayLoad.SenderID, + // }}) + //} +} + // GetImChatDetail 获取门店用户聊天详情 func GetImChatDetail(req []UserRelInfo) (map[string][]interface{}, error) { retVal := make(map[string][]interface{}, 0)