From e3ef24c337e9150b08966522d4fd1f44858cd461 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Tue, 14 Feb 2023 14:34:23 +0800 Subject: [PATCH] 1 --- platformapi/ebaiapi/shop_sku.go | 1 + platformapi/ebaiapi/shop_test.go | 11 ++++++----- platformapi/uuptapi/uuptapi.go | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platformapi/ebaiapi/shop_sku.go b/platformapi/ebaiapi/shop_sku.go index 44837ef5..24e5a20c 100644 --- a/platformapi/ebaiapi/shop_sku.go +++ b/platformapi/ebaiapi/shop_sku.go @@ -244,6 +244,7 @@ func (a *API) ShopCategoryCreate(shopID string, parentID int64, name string, ran } func (a *API) ShopCategoryGet(shopID string) (cats []*CategoryInfo, err error) { + globals.SugarLogger.Debugf("ShopCategoryGet shopID====%s", shopID) result, err := a.AccessAPI("sku.shop.category.get", utils.Params2Map(KeyShopID, shopID)) if err == nil { if inMap, ok := result.Data.(map[string]interface{}); ok { diff --git a/platformapi/ebaiapi/shop_test.go b/platformapi/ebaiapi/shop_test.go index 9ce7f5a5..f12e2599 100644 --- a/platformapi/ebaiapi/shop_test.go +++ b/platformapi/ebaiapi/shop_test.go @@ -53,7 +53,7 @@ func TestShopCreate(t *testing.T) { } func TestShopGet(t *testing.T) { - result, err := api.ShopGet2("", 508281125) //2233065879 ,22267134648 + result, err := api.ShopGet2("", 508415109) //2233065879 ,22267134648 if err != nil { t.Fatal(err) } else { @@ -89,9 +89,9 @@ func TestShopUpdate(t *testing.T) { //"city": "131", //"county": "1960", //"address": "北京市海淀区上地信息路甲9号", - "takeout_shop_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8", - "baidu_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8", - "ele_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8", + //"takeout_shop_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8", + //"baidu_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8", + //"ele_takeout_logo": "https://image-star.elemecdn.com/pb/b79d499b9b0be5deb3ee3ce71bf29ad0a8", //"baidu_takeout_logo" //takeoutShopLogo//baiduTakeoutLogo } err := api.ShopUpdate(params) @@ -120,8 +120,9 @@ func TestShopStatusGet(t *testing.T) { } } +//修改ebai平台与本地映射 func TestShopIDBatchUpdate(t *testing.T) { - err := api.ShopIDBatchUpdate([]string{utils.Int2Str(testShopBaiduID)}, []string{"100077"}) + err := api.ShopIDBatchUpdate([]string{utils.Int2Str(2235877567)}, []string{"100920"}) if err != nil { t.Fatal(err) } diff --git a/platformapi/uuptapi/uuptapi.go b/platformapi/uuptapi/uuptapi.go index 25c96a49..f74d72d0 100644 --- a/platformapi/uuptapi/uuptapi.go +++ b/platformapi/uuptapi/uuptapi.go @@ -39,7 +39,6 @@ func New(appID, appKey, openID string, config ...*platformapi.APIConfig) *API { if appID == "" { return nil } - globals.SugarLogger.Debugf("appID====%s,appKey====%s,openID====%s", appID, appKey, openID) return &API{ appid: appID, appKey: appKey, @@ -79,7 +78,6 @@ func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string] //完整请求url fullPath := utils.GenerateGetURL(baseUrl, actionApi, nil) globals.SugarLogger.Debugf("uupt fullPath======%s", fullPath) - globals.SugarLogger.Debugf("uupt a.appid=====%s", a.appid) //发送请求 sendUrl := func() *http.Request { var request *http.Request