This commit is contained in:
苏尹岚
2020-11-27 17:52:46 +08:00
parent 0a8fadd843
commit 4dacdc71d3

View File

@@ -483,7 +483,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
} }
} }
} else { } else {
if vendorSkuID, err := getMainStoreVendorSkuID(model.JdShopMainStoreID2, v.SkuID); err == nil { if vendorSkuID, err := getMainStoreVendorSkuID(model.JdShopMainStoreID2, v.SkuID); err == nil && vendorSkuID != 0 {
err = api.JdShop2API.StoreWareDoUpdate(status, vendorSkuID, vendorStoreID) err = api.JdShop2API.StoreWareDoUpdate(status, vendorSkuID, vendorStoreID)
} }
} }
@@ -504,10 +504,11 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
} else if storeID == model.JdShopMainStoreID2 { } else if storeID == model.JdShopMainStoreID2 {
//修改京东商城商品库价格 //修改京东商城商品库价格
} else { } else {
fmt.Println("ttttttttttttttttttttttttttttttttttttttttt", utils.Format4Output(v, false))
if v.VendorOrgCode == "1" { if v.VendorOrgCode == "1" {
// null // null
} else { } else {
if vendorSkuID, err := getMainStoreVendorSkuID(model.JdShopMainStoreID2, v.SkuID); err == nil { if vendorSkuID, err := getMainStoreVendorSkuID(model.JdShopMainStoreID2, v.SkuID); err == nil && vendorSkuID != 0 {
err = api.JdShop2API.StoreUpdatePrice(utils.Float64ToStr(jxutils.IntPrice2Standard(v.VendorPrice)), vendorSkuID, vendorStoreID) err = api.JdShop2API.StoreUpdatePrice(utils.Float64ToStr(jxutils.IntPrice2Standard(v.VendorPrice)), vendorSkuID, vendorStoreID)
} }
} }
@@ -528,11 +529,15 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrg
} else if storeID == model.JdShopMainStoreID2 { } else if storeID == model.JdShopMainStoreID2 {
} else { } else {
if vendorSkuID, err := getMainStoreVendorSkuID(model.JdShopMainStoreID2, v.SkuID); err == nil { if v.VendorOrgCode == "1" {
} else {
if vendorSkuID, err := getMainStoreVendorSkuID(model.JdShopMainStoreID2, v.SkuID); err == nil && vendorSkuID != 0 {
err = api.JdShop2API.StoreUpdateStock(v.Stock, vendorSkuID, vendorStoreID) err = api.JdShop2API.StoreUpdateStock(v.Stock, vendorSkuID, vendorStoreID)
} }
} }
} }
}
if err != nil { if err != nil {
failedList = append(failedList, putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDJDShop], "修改商品库存")...) failedList = append(failedList, putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDJDShop], "修改商品库存")...)
} }