- ShopIDBatchUpdate
This commit is contained in:
@@ -128,3 +128,12 @@ func (a *API) ShopBusStatusGet(shopID string, baiduShopID int64, platformFlag st
|
||||
}
|
||||
return 0, err
|
||||
}
|
||||
|
||||
// 相同值再次重复映射会出错
|
||||
func (a *API) ShopIDBatchUpdate(baiduShopIDs []string, shopIDs []string) (err error) {
|
||||
_, err = a.AccessAPI("shop.id.batchupdate", utils.Params2Map("baidu_shop_ids", baiduShopIDs, "shop_ids", shopIDs))
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -53,3 +53,14 @@ func TestShopBusStatusGet(t *testing.T) {
|
||||
t.Log(result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShopIDBatchUpdate(t *testing.T) {
|
||||
err := api.ShopIDBatchUpdate([]string{utils.Int2Str(testShopBaiduID)}, []string{""})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// err = api.ShopIDBatchUpdate([]string{utils.Int2Str(testShopBaiduID)}, []string{testShopID})
|
||||
// if err != nil {
|
||||
// t.Fatal(err)
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user