- syncStoreSkuNew中没有待同步条目不启动任务

This commit is contained in:
gazebo
2019-07-26 15:50:46 +08:00
parent 4179885cec
commit 92fad81a29

View File

@@ -256,7 +256,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
} else {
skus, err = dao.GetStoreSkus(db, vendorID, storeID, skuIDs)
}
if err != nil {
if err != nil || len(skus) == 0 {
return err
}
formalizeStoreSkuList(skus)
@@ -339,7 +339,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
step := batchItemList[0].(int)
globals.SugarLogger.Debugf("step:%d", step)
// globals.SugarLogger.Debugf("step:%d", step)
switch step {
case 0:
if len(deleteList) > 0 {