This commit is contained in:
苏尹岚
2020-11-27 14:32:43 +08:00
parent 49fc7d83d6
commit d1b8283913
2 changed files with 4 additions and 8 deletions

View File

@@ -1065,14 +1065,10 @@ func (a *API) StoreUpdateStock(stockNum int, skuId int64, vendorStoreID string)
}
//门店关注商品
func (a *API) StoreSkuBindStore(allStore bool, skuId int64, vendorStoreID string) (err error) {
var storeIDs []string
if vendorStoreID != "" {
storeIDs = append(storeIDs, vendorStoreID)
}
func (a *API) StoreSkuBindStore(allStore bool, skuIds, vendorStoreIDs []string) (err error) {
params := map[string]interface{}{
"skuIds": []string{utils.Int64ToStr(skuId)},
"storeIds": storeIDs,
"skuIds": skuIds,
"storeIds": vendorStoreIDs,
"allStore": allStore,
}
_, err = a.AccessStorePage2("https://ware.shop.jd.com/rest/storeProduct/skuBindStore", params, true)

View File

@@ -310,7 +310,7 @@ func TestStoreUpdateStock(t *testing.T) {
}
func TestStoreSkuBindStore(t *testing.T) {
err := api.StoreSkuBindStore(false, 10024685331653, "1000063128")
err := api.StoreSkuBindStore(false, []string{"10024685331653"}, []string{"1000063128"})
if err != nil {
t.Fatal(err)
}