diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 8f94b7605..c69c1f3cf 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -335,11 +335,19 @@ func updateStoreSku(db *dao.DaoDB, vendorID int, storeSkuList []*dao.StoreSkuSyn // } // }() if vendorID == model.VendorIDJDShop { - for _, v := range storeSkuList { - updateItemList := make([]*dao.KVUpdateItem, len(v.StoreSkuSyncInfoJds)) - for k, vv := range v.StoreSkuSyncInfoJds { - updateItemList[k] = sku2Update(vendorID, vv, syncStatus) - err = updateJdsWareID(db, vv) + if syncStatus != model.SyncFlagPriceMask { + for _, v := range storeSkuList { + updateItemList := make([]*dao.KVUpdateItem, len(v.StoreSkuSyncInfoJds)) + for k, vv := range v.StoreSkuSyncInfoJds { + updateItemList[k] = sku2Update(vendorID, vv, syncStatus) + err = updateJdsWareID(db, vv) + } + num, err = dao.BatchUpdateEntityByKV(db, updateItemList) + } + } else { + updateItemList := make([]*dao.KVUpdateItem, len(storeSkuList)) + for k, v := range storeSkuList { + updateItemList[k] = sku2Update(vendorID, v, syncStatus) } num, err = dao.BatchUpdateEntityByKV(db, updateItemList) }