This commit is contained in:
邹宗楠
2024-11-29 09:39:06 +08:00
parent 19adb91298
commit b99d8c309f
4 changed files with 78 additions and 10 deletions

View File

@@ -521,6 +521,7 @@ func isSkuLockTimeValid(sku *dao.StoreSkuSyncInfo) bool {
}
func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag int, isFull bool, vendorID, storeID int, vendorOrgCode string, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isContinueWhenError bool) (err error) {
globals.SugarLogger.Debugf("---------------111111")
db := dao.GetDB()
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID, vendorOrgCode)
if err != nil {
@@ -533,6 +534,8 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
} else {
skus, err = dao.GetStoreSkus(db, vendorID, storeID, skuIDs)
}
globals.SugarLogger.Debugf("---------------skus := %s", utils.Format4Output(skus, false))
if err != nil || len(skus) == 0 {
return err
}
@@ -752,6 +755,10 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
}
globals.SugarLogger.Debugf("---------create:= %s", utils.Format4Output(createList, false))
globals.SugarLogger.Debugf("---------update:= %s", utils.Format4Output(updateList, false))
globals.SugarLogger.Debugf("---------stock:= %s", utils.Format4Output(stockList, false))
globals.SugarLogger.Debugf("---------online:= %s", utils.Format4Output(onlineList, false))
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
step := batchItemList[0].(int)