This commit is contained in:
邹宗楠
2022-10-11 17:13:31 +08:00
parent dc9ec95c50
commit bcc5006598
2 changed files with 1 additions and 5 deletions

View File

@@ -2421,6 +2421,7 @@ func updateStoreSkusSaleWithoutSync(ctx *jxcontext.Context, storeID int, skuBind
model.FieldJdSyncStatus: skuBind.JdSyncStatus | model.SyncFlagSaleMask,
model.FieldEbaiSyncStatus: skuBind.EbaiSyncStatus | model.SyncFlagSaleMask,
model.FieldMtwmSyncStatus: skuBind.MtwmSyncStatus | model.SyncFlagSaleMask,
model.FieldDdSyncStatus: skuBind.DdSyncStatus | model.SyncFlagSaleMask,
}
if utils.IsTimeZero(autoSaleTime) || skuBind.Status == model.SkuStatusNormal {
kvs["AutoSaleAt"] = utils.DefaultTimeValue

View File

@@ -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)
}