1
This commit is contained in:
@@ -126,7 +126,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
syncType = "创建商品"
|
||||
for _, storeSku := range storeSkuList { // 创建商品
|
||||
param := &product_addV2_request.ProductAddV2Param{
|
||||
CategoryLeafId: utils.Str2Int64(storeSku.SkuVendorMapCatID),
|
||||
Name: utils.LimitUTF8StringLen(storeSku.SkuName, mtwmapi.MaxSkuNameCharCount),
|
||||
PayType: tiktokShop.TiktokPayType1,
|
||||
ReduceType: tiktokShop.SkuReduceTypePayMakeOrder,
|
||||
@@ -143,6 +142,12 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
PickupMethod: "0",
|
||||
OuterProductId: utils.Int2Str(storeSku.SkuID), // 本地skuId为外部商品id
|
||||
}
|
||||
if storeSku.SkuVendorMapCatID != "" {
|
||||
param.CategoryLeafId = utils.Str2Int64(storeSku.SkuVendorMapCatID)
|
||||
} else {
|
||||
param.CategoryLeafId = storeSku.VendorVendorCatID
|
||||
}
|
||||
|
||||
// param.AccountTemplateId = ""
|
||||
// 获取上传图,商品轮播图
|
||||
img, err := GetTiktokImgList(utils.Int2Str(storeSku.StoreID), storeDetail.VendorOrgCode, storeSku.ImgOrigin, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5)
|
||||
@@ -288,7 +293,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
for _, storeSku := range storeSkuList {
|
||||
// 更新商品(目前只更新子商品,主商品暂不支持)
|
||||
param := &product_editV2_request.ProductEditV2Param{
|
||||
CategoryLeafId: utils.Str2Int64(storeSku.SkuVendorMapCatID),
|
||||
Name: storeSku.Name,
|
||||
PayType: tiktokShop.TiktokPayType1,
|
||||
ReduceType: tiktokShop.SkuReduceTypePayMakeOrder,
|
||||
@@ -304,6 +308,11 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
StartSaleType: 0,
|
||||
PickupMethod: "0",
|
||||
}
|
||||
if storeSku.SkuVendorMapCatID != "" {
|
||||
param.CategoryLeafId = utils.Str2Int64(storeSku.SkuVendorMapCatID)
|
||||
} else {
|
||||
param.CategoryLeafId = storeSku.VendorVendorCatID
|
||||
}
|
||||
// param.AccountTemplateId = ""
|
||||
// 获取上传图,商品轮播图
|
||||
img, err := GetTiktokImgList(utils.Int2Str(storeSku.StoreID), storeDetail.VendorOrgCode, storeSku.ImgOrigin, storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5)
|
||||
|
||||
Reference in New Issue
Block a user