From 68c62458805c779d6806b516dbf2d30ab0552d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 17 Nov 2022 10:48:40 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/sync2.go | 4 ++++ business/model/dao/sku.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/business/jxstore/cms/sync2.go b/business/jxstore/cms/sync2.go index a6b2a8018..9c27998a4 100644 --- a/business/jxstore/cms/sync2.go +++ b/business/jxstore/cms/sync2.go @@ -42,6 +42,7 @@ func getMultiStoreVendorInfoList() (list []*MultiStoreVendorInfo) { } func syncCategories(ctx *jxcontext.Context, db *dao.DaoDB, parentTask tasksch.ITask, catList []*dao.SkuStoreCatInfo, isAsync bool) (hint string, err error) { + defer globals.SugarLogger.Debugf("syncCategories err := %s", err) if len(catList) > 0 { // todo 按vendorID orgCode合并操作 task := tasksch.NewParallelTask(fmt.Sprintf("同步分类2:%d", len(catList)), tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, @@ -95,6 +96,7 @@ func syncCategories(ctx *jxcontext.Context, db *dao.DaoDB, parentTask tasksch.IT } func SyncCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs []int, appOrgCodes []string, catIDs []int, isAsync bool) (hint string, err error) { + defer globals.SugarLogger.Debugf("SyncCategories err := %s", err) db := dao.GetDB() catList, err := dao.GetSkuCategoryWithVendor(db, vendorIDs, appOrgCodes, -1, catIDs, true) if err == nil && len(catList) > 0 { @@ -139,6 +141,7 @@ func SyncCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs } func SyncSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs []int, appOrgCodes []string, nameIDs, skuIDs []int, isAsync bool) (hint string, err error) { + defer globals.SugarLogger.Debugf("SyncSkus err := %s", err) db := dao.GetDB() skuList, err := dao.GetSkusWithVendor(db, vendorIDs, appOrgCodes, nameIDs, skuIDs, true) @@ -535,6 +538,7 @@ func updateThingMapEntity(db *dao.DaoDB, thingMap *model.ThingMap) { } func amendAndPruneVendorStuff(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID, vendorID int, vendorOrgCode string, isAsync, isContinueWhenError bool, opType int, isForceUpdate bool) (hint string, err error) { + defer globals.SugarLogger.Debugf("amendAndPruneVendorStuff err := %s", err) handler, _ := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.IMultipleStoresHandler) if handler == nil { return "", fmt.Errorf("平台:%s不支持此操作", model.VendorChineseNames[vendorID]) diff --git a/business/model/dao/sku.go b/business/model/dao/sku.go index 2c0033b68..68e43698d 100644 --- a/business/model/dao/sku.go +++ b/business/model/dao/sku.go @@ -1,6 +1,7 @@ package dao import ( + "git.rosy.net.cn/jx-callback/globals" "time" "git.rosy.net.cn/baseapi/platformapi/aliupcapi" @@ -227,6 +228,7 @@ func GetSkuByCats(db *DaoDB, catIDs []int) (skuList []*model.Sku, err error) { // 多门店平台使用,当前只有京东 func GetSkuCategoryWithVendor(db *DaoDB, vendorIDs []int, appOrgCodes []string, parentCatID int, catIDs []int, mustDirty bool) (catList []*SkuStoreCatInfo, err error) { + defer globals.SugarLogger.Debugf("GetSkuCategoryWithVendor err := %s", err) sqlParams := []interface{}{} sql := ` SELECT