This commit is contained in:
邹宗楠
2023-12-25 15:18:07 +08:00
parent 4dcf546ddf
commit 3e6a3f98f8
3 changed files with 32 additions and 5 deletions

View File

@@ -540,7 +540,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
}
skus = skus2
}
globals.SugarLogger.Debugf("============len := %d", len(skus))
formalizeStoreSkuList(skus)
//京东商城的商品名规则不同
// name空格comment约xxg
@@ -746,6 +745,19 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
}
}
if storeID == 668545 {
globals.SugarLogger.Debugf("============len := %d", len(skus))
globals.SugarLogger.Debugf("createList===========%s", utils.Format4Output(createList, false))
globals.SugarLogger.Debugf("updateList===========%s", utils.Format4Output(updateList, false))
globals.SugarLogger.Debugf("deleteList===========%s", utils.Format4Output(deleteList, false))
globals.SugarLogger.Debugf("stockList===========%s", utils.Format4Output(stockList, false))
globals.SugarLogger.Debugf("onlineList===========%s", utils.Format4Output(onlineList, false))
globals.SugarLogger.Debugf("offlineList===========%s", utils.Format4Output(offlineList, false))
globals.SugarLogger.Debugf("priceList===========%s", utils.Format4Output(priceList, false))
globals.SugarLogger.Debugf("updateItems===========%s", utils.Format4Output(updateItems, false))
globals.SugarLogger.Debugf("reorderSkuMap===========%s", utils.Format4Output(reorderSkuMap, 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)
@@ -821,8 +833,10 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
case 2:
if len(updateList) > 0 {
_, err = putils.FreeBatchStoreSkuSyncInfo("更新门店商品基础信息", func(task tasksch.ITask, batchedStoreSkuList []*dao.StoreSkuSyncInfo) (result interface{}, successCount int, err error) {
globals.SugarLogger.Debugf("===============lenupdateList %d ", len(updateList))
globals.SugarLogger.Debugf("===============batchedStoreSkuList %d ", len(batchedStoreSkuList))
if storeID == 668545 {
globals.SugarLogger.Debugf("===============lenupdateList %d : %s", len(updateList), vendorStoreID)
globals.SugarLogger.Debugf("===============batchedStoreSkuList %d : %s ", len(batchedStoreSkuList), vendorStoreID)
}
var failedList []*partner.StoreSkuInfoWithErr
failedList, err = singleStoreHandler.UpdateStoreSkus(ctx, storeID, vendorStoreID, batchedStoreSkuList)
failedList, err = buildFailedListAndErr(failedList, err, nil, batchedStoreSkuList, storeID, vendorID, "更新门店商品基础信息")