- 调整饿百关于门店状态的几个函数
This commit is contained in:
@@ -164,7 +164,7 @@ func (a *API) ShopIDBatchUpdate(baiduShopIDs []string, shopIDs []string) (err er
|
|||||||
return err
|
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)
|
params := a.genShopIDParams(shopID, baiduShopID, 0)
|
||||||
_, err = a.AccessAPI("shop.open", params)
|
_, err = a.AccessAPI("shop.open", params)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|||||||
@@ -91,8 +91,15 @@ func TestSupplierList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestShopOnline(t *testing.T) {
|
func TestShopOpen(t *testing.T) {
|
||||||
err := api.ShopOnline("", testShopBaiduID)
|
err := api.ShopOpen("", testShopBaiduID)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestShopClose(t *testing.T) {
|
||||||
|
err := api.ShopClose("", testShopBaiduID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user