1
This commit is contained in:
@@ -488,14 +488,11 @@ func (v *VendorSync) SyncStoresCategory(ctx *jxcontext.Context, db *dao.DaoDB, v
|
||||
|
||||
//
|
||||
func (v *VendorSync) SyncStoresSkus2(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, db *dao.DaoDB, vendorIDs []int, storeIDs []int, syncDisabled bool, skuIDs, excludeSkuIDs []int, setSyncStatus int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||
globals.SugarLogger.Debug("SyncStoresSkus2")
|
||||
isManageIt := len(storeIDs) != 1 || len(skuIDs) == 0 || len(skuIDs) > 8
|
||||
|
||||
funcParam := func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||
globals.SugarLogger.Debug("SyncStoresSkus2===============0")
|
||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||
if handler := v.GetStoreHandler(loopMapInfo.VendorID); handler != nil {
|
||||
globals.SugarLogger.Debug("SyncStoresSkus2===============1")
|
||||
parallelCount := 5
|
||||
if model.MultiStoresVendorMap[loopMapInfo.VendorID] == 1 {
|
||||
parallelCount = 2
|
||||
@@ -504,9 +501,7 @@ func (v *VendorSync) SyncStoresSkus2(ctx *jxcontext.Context, parentTask tasksch.
|
||||
tasksch.NewParallelConfig().SetParallelCount(parallelCount).SetIsContinueWhenError(isContinueWhenError), ctx,
|
||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||
storeMap := batchItemList[0].(*model.StoreMap)
|
||||
globals.SugarLogger.Debug("SyncStoresSkus2===============2")
|
||||
if syncDisabled || storeMap.Status > model.StoreStatusDisabled {
|
||||
globals.SugarLogger.Debug("SyncStoresSkus2===============3")
|
||||
if setSyncStatus != 0 {
|
||||
dao.SetStoreSkuSyncStatus(db, storeMap.VendorID, []int{storeMap.StoreID}, skuIDs, setSyncStatus)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user