From 8dadd431a624bacffa8c9df15cf555148830f862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 22 Dec 2023 18:43:12 +0800 Subject: [PATCH] 1 --- platformapi/mtwmapi/retail.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/platformapi/mtwmapi/retail.go b/platformapi/mtwmapi/retail.go index fe408c7b..96b045b7 100644 --- a/platformapi/mtwmapi/retail.go +++ b/platformapi/mtwmapi/retail.go @@ -289,29 +289,24 @@ func handleRetailBatchResultByRegexp(result interface{}) (failedFoodList []*AppF // https://developer.waimai.meituan.com/home/myquestionDetail/6716 // 另外这个接口即使不指定operate_type为1,也可能报错:”商品spu名称在该店内分类中已存在“,原因就是已经存在两个相同的SKU了 func (a *API) RetailInitData(trackInfo, poiCode, foodCode string, params map[string]interface{}) (err error) { + globals.SugarLogger.Debugf("=============result1 := %d", len(params)) _, err = a.AccessAPI2("retail/initdata", false, utils.MergeMaps(map[string]interface{}{ KeyAppPoiCode: poiCode, KeyAppFoodCode: foodCode, }, params), resultKeyData, trackInfo) + globals.SugarLogger.Debugf("=============er1r := %v", err) return err } func (a *API) RetailBatchInitData(trackInfo, poiCode string, foodDataList []map[string]interface{}) (failedFoodList []*AppFoodResult, err error) { - globals.SugarLogger.Debugf("=============result := %d", len(foodDataList)) result, err := a.AccessAPI2("retail/batchinitdata", false, map[string]interface{}{ KeyAppPoiCode: poiCode, "food_data": string(utils.MustMarshal(foodDataList)), }, resultKeyMsg, trackInfo) - globals.SugarLogger.Debugf("=============result := %s", utils.Format4Output(result, false)) - globals.SugarLogger.Debugf("=============err := %v", err) if err == nil { failedFoodList, err = handleRetailBatchResult(result) } - if err != nil { - globals.SugarLogger.Debugf("=============err := %v", err) - } - return failedFoodList, err }