From ef69a4f60dd0c3e59813341a9e2e140a89d706a8 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 4 Apr 2019 12:35:00 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E8=B0=83=E6=95=B4=E9=A5=BF=E7=99=BE?= =?UTF-8?q?=E5=85=B3=E4=BA=8E=E9=97=A8=E5=BA=97=E7=8A=B6=E6=80=81=E7=9A=84?= =?UTF-8?q?=E5=87=A0=E4=B8=AA=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/ebaiapi/shop.go | 2 +- platformapi/ebaiapi/shop_test.go | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/platformapi/ebaiapi/shop.go b/platformapi/ebaiapi/shop.go index c7a56775..99dd9da5 100644 --- a/platformapi/ebaiapi/shop.go +++ b/platformapi/ebaiapi/shop.go @@ -164,7 +164,7 @@ func (a *API) ShopIDBatchUpdate(baiduShopIDs []string, shopIDs []string) (err er return err } -func (a *API) ShopOnline(shopID string, baiduShopID int64) (err error) { +func (a *API) ShopOpen(shopID string, baiduShopID int64) (err error) { params := a.genShopIDParams(shopID, baiduShopID, 0) _, err = a.AccessAPI("shop.open", params) if err == nil { diff --git a/platformapi/ebaiapi/shop_test.go b/platformapi/ebaiapi/shop_test.go index 35b93923..2bdef1a8 100644 --- a/platformapi/ebaiapi/shop_test.go +++ b/platformapi/ebaiapi/shop_test.go @@ -91,8 +91,15 @@ func TestSupplierList(t *testing.T) { } } -func TestShopOnline(t *testing.T) { - err := api.ShopOnline("", testShopBaiduID) +func TestShopOpen(t *testing.T) { + err := api.ShopOpen("", testShopBaiduID) + if err != nil { + t.Fatal(err) + } +} + +func TestShopClose(t *testing.T) { + err := api.ShopClose("", testShopBaiduID) if err != nil { t.Fatal(err) }