This commit is contained in:
邹宗楠
2023-02-28 15:38:24 +08:00
parent 22fd0e3c30
commit 8bc59cac2e

View File

@@ -257,7 +257,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
updateParam.Pic = param.Pic
updateParam.Description = param.Description
updateParam.WeightUnit = tiktokShop.WeightUint_G
//updateParam.StandardBrandId, _ = getTiktokBrandId(api, db, storeSku.Upc, storeSku.UpcBrandName, storeSku.UpcTiktokBrandId, updateParam.CategoryLeafId)
updateParam.ProductId = mainOrderDetail.ProductId
updateParam.MainProductId = mainProductId
@@ -930,14 +929,13 @@ func MakeProductFormatNew(api *tiktokShop.API, skuNameId int64, categoryLeafId i
return "", 0, err
}
categoryMap := make(map[string][]map[string]interface{})
var tiktokBrandId int64 = 0
tiktokBrandId, _ := getTiktokBrandId(api, db, upcCode, upcBrandName, upcTiktokBrandId, categoryLeafId)
for _, v := range categoryList.Data.Data {
if v.Required != model.YES {
continue
}
options := make([]map[string]interface{}, 0)
if v.PropertyName == "品牌" {
tiktokBrandId, _ = getTiktokBrandId(api, db, upcCode, upcBrandName, upcTiktokBrandId, categoryLeafId)
options = append(options, map[string]interface{}{"name": v.PropertyName, "value": tiktokBrandId, "diy_type": v.DiyType})
categoryMap[utils.Int64ToStr(v.PropertyId)] = options
} else if v.PropertyName == "产地" {