imv2
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
package mtwm
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/im"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
@@ -8,8 +14,6 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// 美团回调接口
|
||||
@@ -115,3 +119,14 @@ func GetMsgCallBackUrl(msgType, appId string) string {
|
||||
}
|
||||
return interfaceUrl
|
||||
}
|
||||
|
||||
// OnImMsg im消息回调
|
||||
func OnImMsg(msg *mtwmapi.ImCallbackMsg) (response *mtwmapi.CallbackResponse) {
|
||||
if str, err := json.Marshal(msg.PushContent); err == nil {
|
||||
err = im.ReadMsgFromVendor(model.VendorIDMTWM, "", str)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("OnImMsg提示:%v", err)
|
||||
}
|
||||
}
|
||||
return mtwmapi.SuccessResponse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user