diff --git a/controllers/ebai_callback.go b/controllers/ebai_callback.go index 5c7f6d8d2..8f77d612a 100644 --- a/controllers/ebai_callback.go +++ b/controllers/ebai_callback.go @@ -5,7 +5,6 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" - "git.rosy.net.cn/jx-callback/globals" "io/ioutil" "net/http" "strings" @@ -25,8 +24,7 @@ var EBaiVendorStoreIDList = new(sync.Map) func (c *EbaiController) Msg() { if c.Ctx.Input.Method() == http.MethodPost { - obj, callbackResponse := api.EbaiAPI.GetCallbackMsg(c.Ctx.Request) - globals.SugarLogger.Debugf("-------obj := %s", utils.Format4Output(utils.Struct2Map(obj, "", false), false)) + obj, callbackResponse := api.EbaiAPI.GetCallbackMsg(c.Ctx.Request, web.BConfig.RunMode) if callbackResponse == nil { vendorStoreId, _ := utils.TryInterface2Int64(obj.Body["platform_shop_id"]) if _, have := EBaiVendorStoreIDList.Load(vendorStoreId); vendorStoreId != 0 && !have { @@ -62,6 +60,8 @@ func (c *EbaiController) Msg() { } func (c *EbaiController) EBaiMsgPush2FruitsOrPet(serverType string, msg map[string]interface{}) *ebaiapi.CallbackResponse { + msgBody, _ := json.Marshal(msg["body"]) + msg["body"] = string(msgBody) cl := http.Client{} var request *http.Request var err error