From 04fdd63b39b95ee37cb0a919924645b687e9e8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 13 Jan 2023 11:45:27 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/sync_store_sku.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 39cb9b1ae..729a723c9 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -204,28 +204,23 @@ 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) switch step { case 0: if singleStoreHandler != nil { - globals.SugarLogger.Debugf("amendAndPruneStoreStuff --------[%d]", storeID) // _, err = ClearRemoteStoreStuffAndSetNew(ctx, task, vendorID, storeID, vendorStoreID, false, isContinueWhenError) _, err = amendAndPruneStoreStuff(ctx, parentTask, vendorID, storeID, vendorStoreID, false, isContinueWhenError, AmendPruneAll, false) } else { - globals.SugarLogger.Debugf("SetStoreSkuSyncStatus --------[%d]", storeID) _, err = dao.SetStoreSkuSyncStatus(dao.GetDB(), vendorID, []int{storeID}, nil, model.SyncFlagStoreSkuOnlyMask) } case 1: if singleStoreHandler != nil { // 同步分类在同步商品 - globals.SugarLogger.Debugf("SyncStoreSkuNew --------[%d]", storeID) _, err = SyncStoreSkuNew(ctx, task, 0, vendorID, storeID, vendorStoreID, "", nil, nil, excludeSkuIDs, false, isContinueWhenError) } else { // 直接同步商品 - globals.SugarLogger.Debugf("syncStoreSkuNew --------[%d]", storeID) err = syncStoreSkuNew(ctx, task, 0, true, vendorID, storeID, "", nil, nil, excludeSkuIDs, false, isContinueWhenError) } } @@ -706,6 +701,17 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag // api.JdShop2API.SetCookieWithStr(configs[0].Value) // } } + if vendorOrgCode == "381564" { + 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) {