From e607e62f1d4d0841255dbd0b606c471233ea0d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Sun, 27 Apr 2025 13:53:28 +0800 Subject: [PATCH] 1 --- business/partner/purchase/tiktok_store/store_sku2_utils.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index d64085600..55514c110 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -5,7 +5,6 @@ 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" @@ -1096,7 +1095,6 @@ func MakeProductFormatNew(api *tiktokShop.API, skuNameId int64, categoryLeafId i } categoryMap := make(map[string][]map[string]interface{}) tiktokBrandId, _ := getTiktokBrandId(api, db, upcCode, upcBrandName, upcTiktokBrandId, categoryLeafId) - globals.SugarLogger.Debugf("---------categoryList.Data.Data- := %s", utils.Format4Output(categoryList.Data.Data, false)) for _, v := range categoryList.Data.Data { if v.Required != model.YES { continue @@ -1108,16 +1106,14 @@ func MakeProductFormatNew(api *tiktokShop.API, skuNameId int64, categoryLeafId i } else if v.PropertyName == "产地" { options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 13850, "diy_type": v.DiyType}) categoryMap[utils.Int64ToStr(v.PropertyId)] = options - } else if len(options) == 0 { + } else if len(v.Options) == 0 { options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 0, "diy_type": v.DiyType}) categoryMap[utils.Int64ToStr(v.PropertyId)] = options } else { - globals.SugarLogger.Debugf("---------Options- := %s", utils.Format4Output(v.Options, false)) options = append(options, map[string]interface{}{"name": v.PropertyName, "value": v.Options[0].Value, "diy_type": v.DiyType}) categoryMap[utils.Int64ToStr(v.PropertyId)] = options } } - globals.SugarLogger.Debugf("---------ccategoryMap- := %s", utils.Format4Output(categoryMap, false)) productFormatNew := utils.Format4Output(categoryMap, false) dao.UpdateSkuNameTiktokAttr(dao.GetDB(), skuNameId, productFormatNew) return utils.Format4Output(categoryMap, false), tiktokBrandId, nil