This commit is contained in:
邹宗楠
2022-11-18 17:39:58 +08:00
parent e745cd50db
commit 927df8a02a
2 changed files with 16 additions and 18 deletions

View File

@@ -9,7 +9,6 @@ import (
sku_syncStock_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_syncStock/request"
tiktokShop "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
"git.rosy.net.cn/jx-callback/business/model"
@@ -436,7 +435,7 @@ func (p *PurchaseHandler) UpdateStoreSkusSpecTag(ctx *jxcontext.Context, vendorO
return err
}
func GetProductAuditList(vendorOrgCode string) (string, error) {
func GetProductAuditList(vendorOrgCode string) map[string]string {
var page int64 = 1
var pageSize int64 = 100
@@ -451,23 +450,12 @@ func GetProductAuditList(vendorOrgCode string) (string, error) {
if strings.Contains(v.AuditReason["综合原因"][0], "该商品类目选择错误,推荐放置在") {
list := strings.Split(v.AuditReason["综合原因"][0], ``)
categoryNameList := strings.Split(list[1], "/")
vendorCatgory, err := cms.GetVendorCategoriesByName(14, categoryNameList[len(categoryNameList)])
if err != nil {
return utils.Format4Output(updateCategory, false), err
}
if vendorCatgory != nil {
updateCategory[utils.Int64ToStr(v.ProductId)] = vendorCatgory.VendorCategoryID
} else {
updateCategory[utils.Int64ToStr(v.ProductId)] = "-1"
}
updateCategory[utils.Int64ToStr(v.ProductId)] = categoryNameList[len(categoryNameList)]
}
}
}
if len(data) >= 100 {
page++
}
break
}
globals.SugarLogger.Debugf("=================111:= %s", utils.Format4Output(updateCategory, false))
return utils.Format4Output(updateCategory, false), nil
return updateCategory
}