1
This commit is contained in:
@@ -25,6 +25,10 @@ type MtwmController struct {
|
||||
|
||||
func (c *MtwmController) onCallbackMsg(msgType string) {
|
||||
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
|
||||
if msg.FormData.Get("app_poi_code") == "25791090" && (web.BConfig.RunMode == model.ServerTypeFruits || web.BConfig.RunMode == model.ServerTypePet) {
|
||||
globals.SugarLogger.Debugf("------mtmsg := %s", utils.Format4Output(msg, false))
|
||||
globals.SugarLogger.Debugf("------callbackResponse := %s", utils.Format4Output(callbackResponse, false))
|
||||
}
|
||||
if callbackResponse == nil {
|
||||
vendorStoreId := msg.FormData.Get("app_poi_code")
|
||||
if vendorStoreId == "" {
|
||||
@@ -49,6 +53,9 @@ func (c *MtwmController) onCallbackMsg(msgType string) {
|
||||
callbackResponse = mtwmapi.Err2CallbackResponse(nil, "") // mtwmapi.Err2CallbackResponse(fmt.Errorf("美团菜市推果园,果园退超市未找到门店cmd:%s,storeId:%s", msgType, vendorStoreId), "")
|
||||
return
|
||||
}
|
||||
if msg.FormData.Get("app_poi_code") == "25791090" && (web.BConfig.RunMode == model.ServerTypeFruits || web.BConfig.RunMode == model.ServerTypePet) {
|
||||
globals.SugarLogger.Debugf("------callbackResponse2 := %s", utils.Format4Output(callbackResponse, false))
|
||||
}
|
||||
c.Data["json"] = callbackResponse
|
||||
c.ServeJSON()
|
||||
return
|
||||
@@ -173,9 +180,11 @@ func pushMTWMOrder2GY(value url.Values, msgType string, serverType string) *mtwm
|
||||
request, err = http.NewRequest(http.MethodPost, "http://callback-gblm.jxc4.com/mtwm/"+msgType, strings.NewReader(value.Encode()))
|
||||
}
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("-------pushMTWMOrder2GY err := %v", err)
|
||||
return mtwmapi.Err2CallbackResponse(err, "")
|
||||
}
|
||||
request.Header.Set("Content-Type", "multipart/form-data; charset=UTF-8")
|
||||
_, err = cl.Do(request)
|
||||
globals.SugarLogger.Debugf("-------Do err := %v", err)
|
||||
return mtwmapi.Err2CallbackResponse(err, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user