更新商品前缀让他们自己同步把
This commit is contained in:
@@ -2556,7 +2556,7 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri
|
||||
fromTimeP time.Time
|
||||
toTimeP time.Time
|
||||
db = dao.GetDB()
|
||||
skuIDs []int
|
||||
// skuIDs []int
|
||||
)
|
||||
if fromTime != "" {
|
||||
fromTimeP = utils.Time2Date(utils.Str2Time(fromTime))
|
||||
@@ -2605,6 +2605,8 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri
|
||||
for _, v := range skuIDs {
|
||||
OnUpdateThing(ctx, db, nil, int64(v), model.ThingTypeSku)
|
||||
}
|
||||
} else {
|
||||
SetStoreSkuSyncStatus2(db, nil, []int{vendorID}, skuIDs, model.SyncFlagModifiedMask)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2613,21 +2615,21 @@ func UpdateSkuExinfoMap(ctx *jxcontext.Context, nameIDs []int, imgWaterMark stri
|
||||
}
|
||||
taskParallel := tasksch.NewParallelTask("UpdateSkuExinfoMap", tasksch.NewParallelConfig().SetParallelCount(parallelCount), ctx, taskFunc, nameIDs)
|
||||
tasksch.HandleTask(taskParallel, nil, true).Run()
|
||||
result, err2 := task.GetResult(0)
|
||||
err = err2
|
||||
if len(result) > 0 {
|
||||
for _, v := range result {
|
||||
skuIDs = append(skuIDs, int(utils.Interface2Int64WithDefault(v, 0)))
|
||||
}
|
||||
}
|
||||
_, err = task.GetResult(0)
|
||||
// err = err2
|
||||
// if len(result) > 0 {
|
||||
// for _, v := range result {
|
||||
// skuIDs = append(skuIDs, int(utils.Interface2Int64WithDefault(v, 0)))
|
||||
// }
|
||||
// }
|
||||
case 1:
|
||||
if len(skuIDs) > 0 {
|
||||
if partner.IsMultiStore(vendorID) {
|
||||
CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, isAsync, isContinueWhenError, ctx.GetUserName())
|
||||
} else {
|
||||
CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{vendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, isAsync, isContinueWhenError)
|
||||
}
|
||||
}
|
||||
// if len(skuIDs) > 0 {
|
||||
// if partner.IsMultiStore(vendorID) {
|
||||
// CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, isAsync, isContinueWhenError, ctx.GetUserName())
|
||||
// } else {
|
||||
// CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{vendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, isAsync, isContinueWhenError)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user