1
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
product_addV2_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_addV2/response"
|
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"
|
beego "github.com/astaxie/beego/server/web"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@@ -285,9 +286,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
}
|
}
|
||||||
// 是否支持七天无理由
|
// 是否支持七天无理由
|
||||||
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
||||||
param.Supply7dayReturn = 1
|
param.AfterSaleService = map[string]string{"supply_day_return_selector": "7天"}
|
||||||
} else {
|
|
||||||
param.Supply7dayReturn = 0
|
|
||||||
}
|
}
|
||||||
updateParam.Pic = param.Pic
|
updateParam.Pic = param.Pic
|
||||||
updateParam.Description = param.Description
|
updateParam.Description = param.Description
|
||||||
@@ -358,9 +357,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
}
|
}
|
||||||
param.Name = checkNameLenght(param.Name)
|
param.Name = checkNameLenght(param.Name)
|
||||||
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
||||||
param.Supply7dayReturn = 1
|
param.AfterSaleService = map[string]string{"supply_day_return_selector": "7天"}
|
||||||
} else {
|
|
||||||
param.Supply7dayReturn = 0
|
|
||||||
}
|
}
|
||||||
// 暂时只考虑修改白底图,提高效率.其余图片不做修改
|
// 暂时只考虑修改白底图,提高效率.其余图片不做修改
|
||||||
img, descImg, whiteImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, []string{storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5})
|
img, descImg, whiteImg, err := GetTiktokImgList(api, utils.Int2Str(storeSku.StoreID), storeSku.SkuID, storeSku.DescImg, storeSku.Img, []string{storeSku.Img2, storeSku.Img3, storeSku.Img4, storeSku.Img5})
|
||||||
@@ -441,6 +438,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
//param.MainProductId = mainIdInt
|
//param.MainProductId = mainIdInt
|
||||||
//param.FreightId, _ = api.GetStoreBindTemp(utils.Str2Int64(vendorStoreID))
|
//param.FreightId, _ = api.GetStoreBindTemp(utils.Str2Int64(vendorStoreID))
|
||||||
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, mainIdInt, storeSku)
|
param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, mainIdInt, storeSku)
|
||||||
|
globals.SugarLogger.Debugf("--------param := %s", utils.Format4Output(param, false))
|
||||||
if err := api.EditStoreCommodity(param); err != nil && !strings.Contains(err.Error(), "您上传的商品主图存在重复") {
|
if err := api.EditStoreCommodity(param); err != nil && !strings.Contains(err.Error(), "您上传的商品主图存在重复") {
|
||||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorChineseNames[model.VendorIDDD], syncType)
|
||||||
//storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
|
//storeSku.VendorSkuID = utils.Int2Str(storeSku.SkuID)
|
||||||
@@ -509,9 +507,7 @@ func makeMainProductSku(db *dao.DaoDB, api *tiktokShop.API, storeSku *dao.StoreS
|
|||||||
|
|
||||||
// 是否支持七天无理由
|
// 是否支持七天无理由
|
||||||
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
if api.GetProductUpdateRule(param.CategoryLeafId) {
|
||||||
param.Supply7dayReturn = 1
|
param.AfterSaleService = map[string]string{"supply_day_return_selector": "7天"}
|
||||||
} else {
|
|
||||||
param.Supply7dayReturn = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// weight_unit 目前抖音只支持g和kg两种
|
// weight_unit 目前抖音只支持g和kg两种
|
||||||
|
|||||||
Reference in New Issue
Block a user