京东同步库存修改
This commit is contained in:
@@ -1135,13 +1135,13 @@ func syncJdsStoreStock(ctx *jxcontext.Context, db *dao.DaoDB, parentTask tasksch
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
storeSku := batchItemList[0].(*model.StoreSkuBind)
|
||||
stock := 0
|
||||
if storeSku.Status == model.StoreSkuBindStatusNormal {
|
||||
stock = 9999
|
||||
}
|
||||
storeSku2, _ := dao.GetStoresSkusInfo(db, []int{storeMap.StoreID}, []int{storeSku.SkuID})
|
||||
if storeSku.JdsID != 0 {
|
||||
if len(storeSku2) > 0 {
|
||||
if storeSku.Status != storeSku2[0].Status && storeMap.VendorStoreID != "" {
|
||||
if storeSku2[0].Status == model.StoreSkuBindStatusNormal {
|
||||
stock = 9999
|
||||
}
|
||||
if storeMap.VendorStoreID != "" {
|
||||
err = api.JdShopAPI.UpdateSkuSiteStock(storeSku.JdsID, stock, utils.Str2Int(storeMap.VendorStoreID))
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user