From df3217366e4fe26b5f0737986513875d0db0ecfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 20 May 2020 17:00:38 +0800 Subject: [PATCH] rqceshi --- platformapi/jdshopapi/sku_test.go | 2 +- platformapi/jdshopapi/store_page.go | 2 +- platformapi/platformapi.go | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platformapi/jdshopapi/sku_test.go b/platformapi/jdshopapi/sku_test.go index 94703604..30a18b71 100644 --- a/platformapi/jdshopapi/sku_test.go +++ b/platformapi/jdshopapi/sku_test.go @@ -354,7 +354,7 @@ func TestUpdateSkus(t *testing.T) { } func TestDeleteSku(t *testing.T) { - err := api.DeleteSku(69570857055) + err := api.DeleteSku(69576828876) if err != nil { t.Fatal(err) } diff --git a/platformapi/jdshopapi/store_page.go b/platformapi/jdshopapi/store_page.go index ff0c4d79..73d043a0 100644 --- a/platformapi/jdshopapi/store_page.go +++ b/platformapi/jdshopapi/store_page.go @@ -98,7 +98,7 @@ func (a *API) CreateShopCategory(createShopCategoryParam []*CreateShopCategoryPa //京东商城设置门店营业状态 //https://stores.shop.jd.com/stores/updateStoreStatus?storeId=24330156&storeStatus=6 func (a *API) UpdateStoreStatus(storeID, storeStatus int) (err error) { - _, err = a.AccessStorePage("http://stores.shop.jd.com/stores/updateStoreStatus", map[string]interface{}{ + _, err = a.AccessStorePage("https://stores.shop.jd.com/stores/updateStoreStatus", map[string]interface{}{ "storeId": storeID, "storeStatus": storeStatus, }, false) diff --git a/platformapi/platformapi.go b/platformapi/platformapi.go index 060e176d..99cc2196 100644 --- a/platformapi/platformapi.go +++ b/platformapi/platformapi.go @@ -117,6 +117,8 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http. } trackInfo += ", " + utils.GetUUID() baseapi.SugarLogger.Debugf("begin AccessPlatformAPIWithRetry:%s do:%s url:%v, request:%s", trackInfo, request.Method, request.URL, getClonedData(request.URL, savedBuf)) + fmt.Println("test1", utils.Format4Output(request, false)) + fmt.Println("test1", utils.Format4Output(request.Context(), false)) response, err := client.Do(request) usedMilliSecond := time.Now().Sub(beginTime) / time.Millisecond baseapi.SugarLogger.Debugf("end AccessPlatformAPIWithRetry:%s do:%s url:%v, usedMilliSecond:%d", trackInfo, request.Method, request.URL, usedMilliSecond)