- 调整饿百关于门店状态的几个函数

This commit is contained in:
gazebo
2019-04-04 12:35:00 +08:00
parent 3c77af7113
commit ef69a4f60d
2 changed files with 10 additions and 3 deletions

View File

@@ -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 {

View File

@@ -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)
}