This commit is contained in:
邹宗楠
2025-02-10 15:55:40 +08:00
parent 3cb5d2c16c
commit 84c34ed072

View File

@@ -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