From 48cf10b07ce8066332cf65fb9e047bb38eff52ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 11 Jan 2023 11:05:39 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/sync2.go | 2 ++ business/model/dao/sku.go | 3 +++ 2 files changed, 5 insertions(+) diff --git a/business/jxstore/cms/sync2.go b/business/jxstore/cms/sync2.go index 800ca15cf..27363835a 100644 --- a/business/jxstore/cms/sync2.go +++ b/business/jxstore/cms/sync2.go @@ -97,6 +97,8 @@ 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) { db := dao.GetDB() catList, err := dao.GetSkuCategoryWithVendor(db, vendorIDs, appOrgCodes, -1, catIDs, true) + globals.SugarLogger.Debug("========catList %s", utils.Format4Output(catList, false)) + globals.SugarLogger.Debug("========err %v", err) if err == nil && len(catList) > 0 { //TODO 同一平台不同账号会有影响needSyncParentIDs,暂不处理 var needSyncParentIDs []int diff --git a/business/model/dao/sku.go b/business/model/dao/sku.go index 2c0033b68..b25aa4fef 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" @@ -290,6 +291,8 @@ func GetSkuCategoryWithVendor(db *DaoDB, vendorIDs []int, appOrgCodes []string, sqlParams = append(sqlParams, parentCatID) } sql += " ORDER BY t1.seq" + globals.SugarLogger.Debug("==sql %s", sql) + globals.SugarLogger.Debug("==sql %s", utils.Format4Output(sqlParams, false)) err = GetRows(db, &catList, sql, sqlParams...) return catList, err }