This commit is contained in:
邹宗楠
2025-02-26 10:17:00 +08:00
parent 3c61880899
commit 79a73f0948

View File

@@ -70,15 +70,15 @@ func OnImMsg(msg *mtwmapi.ImCallbackMsg) (response *mtwmapi.CallbackResponse) {
if err = json.Unmarshal(str, &PushContentReq); err != nil {
return mtwmapi.SignatureIsNotOk
}
globals.SugarLogger.Debugf("----------msg := %s", utils.Format4Output(msg, false))
globals.SugarLogger.Debugf("----------PushContentReq := %s", utils.Format4Output(PushContentReq, false))
storeDetail, err2 := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), PushContentReq.AppPoiCode, model.VendorIDMTWM, utils.Int2Str(PushContentReq.AppID))
if err2 == nil || storeDetail == nil {
switch beego.BConfig.RunMode {
case model.ServerTypeFruits:
globals.SugarLogger.Debugf("----------msg pet := %s", utils.Format4Output(msg, false))
pushIMToGyOrPet(msg, model.ServerTypePet)
return mtwmapi.SuccessResponse
case model.ServerTypeVegetable:
globals.SugarLogger.Debugf("----------msg jxgy:= %s", utils.Format4Output(msg, false))
pushIMToGyOrPet(msg, model.ServerTypeFruits)
return mtwmapi.SuccessResponse
}
@@ -101,7 +101,7 @@ func pushIMToGyOrPet(msg *mtwmapi.ImCallbackMsg, serverType string) {
)
params := make(map[string]interface{})
params["timestamp"] = msg.Timestamp
params["sign"] = msg.Sig
params["sig"] = msg.Sig
params["app_id"] = msg.AppID
params["biz_type"] = msg.BizType
params["push_content"] = msg.PushContent