This commit is contained in:
邹宗楠
2023-01-13 09:58:47 +08:00
parent 7bd1b70538
commit 4fdd3d76ab
3 changed files with 6 additions and 7 deletions

View File

@@ -202,6 +202,7 @@ func SyncStoreSkuNew2(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFla
func FullSyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorID, storeID int, vendorStoreID string, excludeSkuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
singleStoreHandler, _ := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.ISingleStoreStoreSkuHandler)
globals.SugarLogger.Debugf("====singleStoreHandler==== %s", utils.Format4Output(singleStoreHandler, false))
task := tasksch.NewParallelTask("FullSyncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
step := batchItemList[0].(int)
@@ -215,8 +216,10 @@ func FullSyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
}
case 1:
if singleStoreHandler != nil {
// 同步分类在同步商品
_, err = SyncStoreSkuNew(ctx, task, 0, vendorID, storeID, vendorStoreID, "", nil, nil, excludeSkuIDs, false, isContinueWhenError)
} else {
// 直接同步商品
err = syncStoreSkuNew(ctx, task, 0, true, vendorID, storeID, "", nil, nil, excludeSkuIDs, false, isContinueWhenError)
}
}