1
This commit is contained in:
@@ -2,6 +2,7 @@ package mtwm
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/im"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
@@ -61,11 +62,19 @@ func GetVendorAppIdFromMsg(msg *mtwmapi.CallbackMsg) string {
|
||||
|
||||
// OnImMsg im消息回调
|
||||
func OnImMsg(msg *mtwmapi.ImCallbackMsg) (response *mtwmapi.CallbackResponse) {
|
||||
//globals.SugarLogger.Debugf("OnImMsg test0124 msg:=%s", utils.Format4Output(msg, false))
|
||||
if str, err := json.Marshal(msg.PushContent); err == nil {
|
||||
|
||||
var PushContentReq = mtwmapi.PushContentReq{}
|
||||
if err = json.Unmarshal(str, &PushContentReq); err != nil {
|
||||
return mtwmapi.SignatureIsNotOk
|
||||
}
|
||||
globals.SugarLogger.Debugf("===========msg liulei := %s ", utils.Format4Output(&msg, false))
|
||||
globals.SugarLogger.Debugf("===========PushContentReq liulei := %s ", utils.Format4Output(&PushContentReq, false))
|
||||
|
||||
err = im.ReadMsgFromVendor(model.VendorIDMTWM, "", str)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("OnImMsg提示:%v", err)
|
||||
return mtwmapi.SignatureIsNotOk
|
||||
}
|
||||
}
|
||||
return mtwmapi.SuccessResponse
|
||||
|
||||
Reference in New Issue
Block a user