From 7ea090ec1b0dc65d9cc2aa306c8c8fda15509228 Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Mon, 24 May 2021 17:08:45 +0800 Subject: [PATCH] aa --- platformapi/jdapi/sku.go | 2 +- platformapi/jdapi/sku_test.go | 4 ++-- platformapi/jdshopapi/store_page_test.go | 5 ++--- platformapi/mtwmapi/callback.go | 1 + platformapi/mtwmapi/retail_test.go | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/platformapi/jdapi/sku.go b/platformapi/jdapi/sku.go index 2b9acf51..48110cd0 100644 --- a/platformapi/jdapi/sku.go +++ b/platformapi/jdapi/sku.go @@ -254,7 +254,7 @@ func (a *API) QueryPageBrandInfo(pageNo, pageSize int, brandId int64, brandName if brandId != 0 { params[KeyBrandId] = brandId } - if brandName == "" { + if brandName != "" { params[KeyBrandName] = brandName } diff --git a/platformapi/jdapi/sku_test.go b/platformapi/jdapi/sku_test.go index 85c49fbe..a97d1292 100644 --- a/platformapi/jdapi/sku_test.go +++ b/platformapi/jdapi/sku_test.go @@ -9,14 +9,14 @@ import ( ) func TestQueryPageBrandInfo(t *testing.T) { - result, _, err := api.QueryPageBrandInfo(0, 0, 0, "") + result, _, err := api.QueryPageBrandInfo(0, 0, 0, "京西") if err != nil { t.Fatal(err) } if len(result) == 0 { t.Fatal("QueryPageBrandInfo brand list is empty!") } - // baseapi.SugarLogger.Debug(result[0]) + baseapi.SugarLogger.Debug(utils.Format4Output(result, false), err) } func TestQueryCategoriesByOrgCode(t *testing.T) { diff --git a/platformapi/jdshopapi/store_page_test.go b/platformapi/jdshopapi/store_page_test.go index 068eb90c..755f230a 100644 --- a/platformapi/jdshopapi/store_page_test.go +++ b/platformapi/jdshopapi/store_page_test.go @@ -8,7 +8,6 @@ import ( "git.rosy.net.cn/baseapi/utils" "math" "sort" - "strings" "testing" ) @@ -200,8 +199,8 @@ func TestUpdateBasic(t *testing.T) { } func TestUpdateExpand(t *testing.T) { - str := "https://wx.jxc4.com/jxcsRegist?mobile=15520595380" - fmt.Println(str[:strings.LastIndex(str, "?")]) + data, _, _ := DownloadFileByURL("http://image.jxc4.com/image/ac6c79112a0330006b40af3302df9f46.jpg") + fmt.Println(string(data)) } func TestCreateGisFence(t *testing.T) { diff --git a/platformapi/mtwmapi/callback.go b/platformapi/mtwmapi/callback.go index 547e7dba..c9353bdd 100644 --- a/platformapi/mtwmapi/callback.go +++ b/platformapi/mtwmapi/callback.go @@ -33,6 +33,7 @@ const ( MsgTypeStoreStatusChanged = "storeStatusChanged" MsgTypeStoreAuditStatusChanged = "storeAuditStatusChanged" + MsgTypeSkuDelete = "skuDelete" ) type CallbackResponse struct { diff --git a/platformapi/mtwmapi/retail_test.go b/platformapi/mtwmapi/retail_test.go index 2abe7890..fdf59339 100644 --- a/platformapi/mtwmapi/retail_test.go +++ b/platformapi/mtwmapi/retail_test.go @@ -7,7 +7,7 @@ import ( ) func TestRetailCatList(t *testing.T) { - result, err := api.RetailCatList(testPoiCode) + result, err := api.RetailCatList("11655829") if err != nil { t.Fatal(err) } @@ -44,7 +44,7 @@ func TestRetailCatDelete(t *testing.T) { } func TestRetailList(t *testing.T) { - result, err := api.RetailList("9000444", 0, 20) + result, err := api.RetailList("11655829", 0, 20) if err != nil { t.Fatal(err) } @@ -56,7 +56,7 @@ func TestRetailList(t *testing.T) { } func TestRetailListAll(t *testing.T) { - result, err := api.RetailListAll("9325917") + result, err := api.RetailListAll("11655829") if err != nil { t.Fatal(err) }