1
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
|
||||
@@ -28,8 +28,7 @@ func SendVendorV2(data SendData, vendorOrgCode string) (err error) {
|
||||
dataStr, _ := json.Marshal(data.Data)
|
||||
temp := string(dataStr)
|
||||
globals.SugarLogger.Debugf("SendVendorV2 temp=%s", temp)
|
||||
//if _, err = api.MtwmAPI.MsgSend(string(dataStr)); err != nil {
|
||||
if _, err = partner.CurAPIManager.GetAPI(model.VendorIDMTWM, vendorOrgCode).(*mtwmapi.API).MsgSend(string(dataStr)); err != nil {
|
||||
if err = mtwm.MsgSend(vendorOrgCode, string(dataStr)); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -43,6 +42,17 @@ func SendVendorV2(data SendData, vendorOrgCode string) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetPoiIMStatus 查询门店IM单聊开关状态
|
||||
func GetPoiIMStatus(vendorID int, vendorStoreID, vendorOrgCode string) (retVal interface{}, err error) {
|
||||
switch vendorID {
|
||||
case model.VendorIDMTWM:
|
||||
retVal, err = mtwm.GetPoiIMStatus(vendorStoreID, vendorOrgCode)
|
||||
case model.VendorIDEBAI:
|
||||
//retVal,err=
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// ReadMsgFromClient 存储客户端发送的消息
|
||||
func ReadMsgFromClient(vendorID int, elmAppID string, msg interface{}) error {
|
||||
var (
|
||||
@@ -135,10 +145,13 @@ func ReadMsgFromVendor(vendorID int, elmAppID string, msg []byte) error {
|
||||
LatestTime: PushContentReq.Cts,
|
||||
OrderID: "",
|
||||
}
|
||||
globals.SugarLogger.Debugf("ReadMsgFromVendor PushContentReq.OrderID=%d", PushContentReq.OrderID)
|
||||
|
||||
vendorStoreID = PushContentReq.AppPoiCode
|
||||
if PushContentReq.OrderID != 0 {
|
||||
userList.OrderID = utils.Int2Str(PushContentReq.OrderID)
|
||||
}
|
||||
globals.SugarLogger.Debugf("ReadMsgFromVendor userList=%s", utils.Format4Output(userList, false))
|
||||
}
|
||||
if vendorID == VendorIDELM {
|
||||
var ElmData = ebaiapi.ImMessageSend{}
|
||||
|
||||
Reference in New Issue
Block a user