1
This commit is contained in:
@@ -159,7 +159,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
continue
|
||||
}
|
||||
if len(param.Name) < 23 { // 中文字符一个汉字三个长度符号/数字/字母两个长度,商品名称不能大于
|
||||
param.Name += utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit
|
||||
param.Name += utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit + " "
|
||||
} else if len(param.Name) > 90 { // 抖音最大60个字符,三十个汉字
|
||||
param.Name = param.Name[0:90]
|
||||
}
|
||||
@@ -206,7 +206,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
//if err != nil {
|
||||
// return nil, err
|
||||
//}
|
||||
param.StandardBrandId = 789194134 // 默认品牌京西菜市
|
||||
param.StandardBrandId = 596120136 // 默认品牌京西菜市
|
||||
|
||||
// 根据本地商品id获取线上商品是否存在,存在则只创建子商品
|
||||
var tiktokResultProductId int64 = 0
|
||||
@@ -333,6 +333,12 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
param.CategoryLeafId = storeSku.VendorVendorCatID
|
||||
}
|
||||
|
||||
if len(param.Name) < 23 { // 中文字符一个汉字三个长度符号/数字/字母两个长度,商品名称不能大于
|
||||
param.Name += utils.Float64ToStr(float64(storeSku.SpecQuality)) + storeSku.SpecUnit + " "
|
||||
} else if len(param.Name) > 90 { // 抖音最大60个字符,三十个汉字
|
||||
param.Name = param.Name[0:90]
|
||||
}
|
||||
|
||||
// 获取上传图,商品轮播图
|
||||
img, detailImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeDetail.VendorOrgCode, storeSku.DescImg, storeSku.ImgOrigin, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5)
|
||||
if err != nil {
|
||||
@@ -361,7 +367,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
}
|
||||
|
||||
// 获取品牌
|
||||
param.StandardBrandId = 789194134 // 默认品牌京西菜市
|
||||
param.StandardBrandId = 596120136 // 默认品牌京西菜市
|
||||
|
||||
//tiktokResult, err := api.EditStoreCommodity(param) // 创建主商品
|
||||
//if err != nil {
|
||||
@@ -597,7 +603,7 @@ func MakeProductFormatNew(api *tiktokShop.API, skuNameId int64, categoryLeafId i
|
||||
}
|
||||
options := make([]map[string]interface{}, 0)
|
||||
if v.PropertyName == "品牌" {
|
||||
options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 789194134, "diy_type": v.DiyType})
|
||||
options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 596120136, "diy_type": v.DiyType})
|
||||
categoryMap[utils.Int64ToStr(v.PropertyId)] = options
|
||||
} else if v.PropertyName == "产地" {
|
||||
options = append(options, map[string]interface{}{"name": v.PropertyName, "value": 13850, "diy_type": v.DiyType})
|
||||
|
||||
Reference in New Issue
Block a user