bind
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user