This commit is contained in:
邹宗楠
2026-03-25 14:27:13 +08:00
parent 8fd42c70a0
commit 5bac8ba0d1

View File

@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
product_addV2_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_addV2/response"
"git.rosy.net.cn/jx-callback/globals"
beego "github.com/astaxie/beego/server/web"
"strings"
"time"
@@ -979,7 +980,10 @@ func BatchGetChannelCategoryMapping() error {
if err := dao.GetRows(db, &data, sql, nil); err != nil {
return err
}
if len(data) == 0 {
return fmt.Errorf("未查询到数据")
}
globals.SugarLogger.Debugf("--------len := %d", len(data))
count := len(data) / 50
if len(data)%50 != 0 {
count = count + 1
@@ -993,6 +997,7 @@ func BatchGetChannelCategoryMapping() error {
}
api := getAPI("260477060", 0, "")
for i := 1; i <= count; i++ {
globals.SugarLogger.Debugf("--------i := %d", i)
cats := make(map[int64]int64, 50)
if i == count {
cats, _ = api.BatchGetChannelCategoryMapping(categoryList[(i-1)*50:])