1
This commit is contained in:
@@ -17,6 +17,8 @@ import (
|
|||||||
sku_editPrice_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_editPrice/request"
|
sku_editPrice_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_editPrice/request"
|
||||||
sku_syncStock_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_syncStock/request"
|
sku_syncStock_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_syncStock/request"
|
||||||
sku_syncStockBatch_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_syncStockBatch/request"
|
sku_syncStockBatch_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/sku_syncStockBatch/request"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UpdateSkuStock
|
// UpdateSkuStock
|
||||||
@@ -107,6 +109,8 @@ func (a *API) CreateStoreCommodity(skuParam *product_addV2_request.ProductAddV2P
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
globals.SugarLogger.Debug("=========", utils.Format4Output(result, false))
|
||||||
if result.Code != RequestSuccessCode {
|
if result.Code != RequestSuccessCode {
|
||||||
return nil, errors.New(result.SubMsg)
|
return nil, errors.New(result.SubMsg)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,73 +41,73 @@ func TestGetCatePropertyV2(t *testing.T) {
|
|||||||
|
|
||||||
// 新增总部商品
|
// 新增总部商品
|
||||||
func TestCreateStoreCommodity(t *testing.T) {
|
func TestCreateStoreCommodity(t *testing.T) {
|
||||||
accesstoken := `{"access_token":"6c4d71b3-831c-4a96-8d2e-977e37afba5a","expires_in":462248,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"65aae144-4cc0-44d2-89ba-5d3062caca41","authority_id":""}`
|
accesstoken := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}`
|
||||||
|
|
||||||
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||||
param := &product_addV2_request.ProductAddV2Param{
|
param := &product_addV2_request.ProductAddV2Param{
|
||||||
ProductType: 0,
|
//ProductType: 0,
|
||||||
CategoryLeafId: 23065,
|
CategoryLeafId: 23065,
|
||||||
ProductFormat: "",
|
ProductFormat: "",
|
||||||
Name: "精华补水液",
|
Name: "精华补水液",
|
||||||
RecommendRemark: "商家推荐话术",
|
RecommendRemark: "商家推荐话术",
|
||||||
Pic: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_b3dbe91196472e0f4bb05e779a21bf81_sx_112313_www800-800|https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_8433e90bec56f791d4bfa4d47ee1e12c_sx_206128_www800-800", //轮播图,第一张为主图
|
Pic: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_b3dbe91196472e0f4bb05e779a21bf81_sx_112313_www800-800|https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_8433e90bec56f791d4bfa4d47ee1e12c_sx_206128_www800-800", //轮播图,第一张为主图
|
||||||
Description: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_b3dbe91196472e0f4bb05e779a21bf81_sx_112313_www800-800|https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_8433e90bec56f791d4bfa4d47ee1e12c_sx_206128_www800-800", //商品描述图
|
Description: "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_b3dbe91196472e0f4bb05e779a21bf81_sx_112313_www800-800|https://p3-aio.ecombdimg.com/obj/ecom-shop-material/mXJgSMMc_m_8433e90bec56f791d4bfa4d47ee1e12c_sx_206128_www800-800", //商品描述图
|
||||||
PayType: 0,
|
//PayType: 0,
|
||||||
DeliveryMethod: 0,
|
//DeliveryMethod: 0,
|
||||||
CdfCategory: "",
|
//CdfCategory: "",
|
||||||
ReduceType: SkuReduceTypePayMakeOrder, //1 减库存类型:1-拍下减库存 2-付款减库存
|
ReduceType: SkuReduceTypePayMakeOrder, //1 减库存类型:1-拍下减库存 2-付款减库存
|
||||||
AssocIds: "",
|
//AssocIds: "",
|
||||||
FreightId: 11111, // 运费模板id
|
FreightId: 11111, // 运费模板id
|
||||||
Weight: 0,
|
//Weight: 0,
|
||||||
WeightUnit: 0,
|
//WeightUnit: 0,
|
||||||
DeliveryDelayDay: DeliveryDelayDayToDay, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
|
DeliveryDelayDay: DeliveryDelayDayToDay, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
|
||||||
PresellType: SendGoodsTypeNow, // 0现发货/1预售发货/2阶梯发货
|
PresellType: SendGoodsTypeNow, // 0现发货/1预售发货/2阶梯发货
|
||||||
PresellDelay: 0,
|
//PresellDelay: 0,
|
||||||
PresellEndTime: "",
|
//PresellEndTime: "",
|
||||||
Supply7dayReturn: 0,
|
//Supply7dayReturn: 0,
|
||||||
Mobile: "18981810340",
|
Mobile: "18981810340",
|
||||||
Commit: false,
|
Commit: false,
|
||||||
BrandId: 0,
|
//BrandId: 0,
|
||||||
Remark: "商家备注",
|
Remark: "商家备注",
|
||||||
OutProductId: 0,
|
//OutProductId: 0,
|
||||||
QualityList: nil,
|
//QualityList: nil,
|
||||||
SpecName: "",
|
//SpecName: "",
|
||||||
Specs: "颜色|红色,黑色",
|
Specs: "颜色|红色,黑色",
|
||||||
SpecPrices: "",
|
//SpecPrices: "",
|
||||||
SpecPic: "",
|
//SpecPic: "",
|
||||||
MaximumPerOrder: 0,
|
//MaximumPerOrder: 0,
|
||||||
LimitPerBuyer: 0,
|
//LimitPerBuyer: 0,
|
||||||
MinimumPerOrder: 0,
|
//MinimumPerOrder: 0,
|
||||||
ProductFormatNew: "",
|
//ProductFormatNew: "",
|
||||||
SpuId: 0,
|
//SpuId: 0,
|
||||||
AppointDeliveryDay: 0,
|
//AppointDeliveryDay: 0,
|
||||||
ThirdUrl: "",
|
//ThirdUrl: "",
|
||||||
Extra: "",
|
//Extra: "",
|
||||||
Src: "",
|
//Src: "",
|
||||||
StandardBrandId: 0,
|
//StandardBrandId: 0,
|
||||||
NeedCheckOut: true,
|
//NeedCheckOut: false,
|
||||||
PoiResource: nil,
|
//PoiResource: nil,
|
||||||
CarVinCode: "",
|
//CarVinCode: "",
|
||||||
PresellConfigLevel: 0,
|
//PresellConfigLevel: 0,
|
||||||
NeedRechargeMode: true,
|
//NeedRechargeMode: false,
|
||||||
AccountTemplateId: "",
|
//AccountTemplateId: "",
|
||||||
PresellDeliveryType: 0,
|
//PresellDeliveryType: 0,
|
||||||
WhiteBackGroundPicUrl: "",
|
//WhiteBackGroundPicUrl: "",
|
||||||
LongPicUrl: "",
|
//LongPicUrl: "",
|
||||||
AfterSaleService: nil,
|
//AfterSaleService: nil,
|
||||||
SellChannel: nil,
|
//SellChannel: nil,
|
||||||
StartSaleType: 0, // 立即上架
|
StartSaleType: 0, // 立即上架
|
||||||
DelayRule: nil,
|
//DelayRule: nil,
|
||||||
MaterialVideoId: "",
|
//MaterialVideoId: "",
|
||||||
PickupMethod: "0",
|
PickupMethod: "0",
|
||||||
SizeInfoTemplateId: 0,
|
//SizeInfoTemplateId: 0,
|
||||||
SubstituteGoodsUrl: "",
|
//SubstituteGoodsUrl: "",
|
||||||
SaleChannelType: "",
|
//SaleChannelType: "",
|
||||||
RecruitInfo: nil,
|
//RecruitInfo: nil,
|
||||||
StoreId: 0,
|
//StoreId: 0,
|
||||||
MainProductId: 0,
|
//MainProductId: 0,
|
||||||
SaleLimitId: 0,
|
//SaleLimitId: 0,
|
||||||
NamePrefix: "",
|
//NamePrefix: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取属性
|
// 获取属性
|
||||||
|
|||||||
Reference in New Issue
Block a user