1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user