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_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"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
// UpdateSkuStock
|
||||
@@ -107,6 +109,8 @@ func (a *API) CreateStoreCommodity(skuParam *product_addV2_request.ProductAddV2P
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debug("=========", utils.Format4Output(result, false))
|
||||
if result.Code != RequestSuccessCode {
|
||||
return nil, errors.New(result.SubMsg)
|
||||
}
|
||||
|
||||
@@ -41,73 +41,73 @@ func TestGetCatePropertyV2(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)
|
||||
param := &product_addV2_request.ProductAddV2Param{
|
||||
ProductType: 0,
|
||||
CategoryLeafId: 23065,
|
||||
ProductFormat: "",
|
||||
Name: "精华补水液",
|
||||
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", //轮播图,第一张为主图
|
||||
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,
|
||||
DeliveryMethod: 0,
|
||||
CdfCategory: "",
|
||||
ReduceType: SkuReduceTypePayMakeOrder, //1 减库存类型:1-拍下减库存 2-付款减库存
|
||||
AssocIds: "",
|
||||
FreightId: 11111, // 运费模板id
|
||||
Weight: 0,
|
||||
WeightUnit: 0,
|
||||
DeliveryDelayDay: DeliveryDelayDayToDay, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
|
||||
PresellType: SendGoodsTypeNow, // 0现发货/1预售发货/2阶梯发货
|
||||
PresellDelay: 0,
|
||||
PresellEndTime: "",
|
||||
Supply7dayReturn: 0,
|
||||
Mobile: "18981810340",
|
||||
Commit: false,
|
||||
BrandId: 0,
|
||||
Remark: "商家备注",
|
||||
OutProductId: 0,
|
||||
QualityList: nil,
|
||||
SpecName: "",
|
||||
Specs: "颜色|红色,黑色",
|
||||
SpecPrices: "",
|
||||
SpecPic: "",
|
||||
MaximumPerOrder: 0,
|
||||
LimitPerBuyer: 0,
|
||||
MinimumPerOrder: 0,
|
||||
ProductFormatNew: "",
|
||||
SpuId: 0,
|
||||
AppointDeliveryDay: 0,
|
||||
ThirdUrl: "",
|
||||
Extra: "",
|
||||
Src: "",
|
||||
StandardBrandId: 0,
|
||||
NeedCheckOut: true,
|
||||
PoiResource: nil,
|
||||
CarVinCode: "",
|
||||
PresellConfigLevel: 0,
|
||||
NeedRechargeMode: true,
|
||||
AccountTemplateId: "",
|
||||
PresellDeliveryType: 0,
|
||||
WhiteBackGroundPicUrl: "",
|
||||
LongPicUrl: "",
|
||||
AfterSaleService: nil,
|
||||
SellChannel: nil,
|
||||
StartSaleType: 0, // 立即上架
|
||||
DelayRule: nil,
|
||||
MaterialVideoId: "",
|
||||
PickupMethod: "0",
|
||||
SizeInfoTemplateId: 0,
|
||||
SubstituteGoodsUrl: "",
|
||||
SaleChannelType: "",
|
||||
RecruitInfo: nil,
|
||||
StoreId: 0,
|
||||
MainProductId: 0,
|
||||
SaleLimitId: 0,
|
||||
NamePrefix: "",
|
||||
//ProductType: 0,
|
||||
CategoryLeafId: 23065,
|
||||
ProductFormat: "",
|
||||
Name: "精华补水液",
|
||||
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", //轮播图,第一张为主图
|
||||
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,
|
||||
//DeliveryMethod: 0,
|
||||
//CdfCategory: "",
|
||||
ReduceType: SkuReduceTypePayMakeOrder, //1 减库存类型:1-拍下减库存 2-付款减库存
|
||||
//AssocIds: "",
|
||||
FreightId: 11111, // 运费模板id
|
||||
//Weight: 0,
|
||||
//WeightUnit: 0,
|
||||
DeliveryDelayDay: DeliveryDelayDayToDay, // 现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填
|
||||
PresellType: SendGoodsTypeNow, // 0现发货/1预售发货/2阶梯发货
|
||||
//PresellDelay: 0,
|
||||
//PresellEndTime: "",
|
||||
//Supply7dayReturn: 0,
|
||||
Mobile: "18981810340",
|
||||
Commit: false,
|
||||
//BrandId: 0,
|
||||
Remark: "商家备注",
|
||||
//OutProductId: 0,
|
||||
//QualityList: nil,
|
||||
//SpecName: "",
|
||||
Specs: "颜色|红色,黑色",
|
||||
//SpecPrices: "",
|
||||
//SpecPic: "",
|
||||
//MaximumPerOrder: 0,
|
||||
//LimitPerBuyer: 0,
|
||||
//MinimumPerOrder: 0,
|
||||
//ProductFormatNew: "",
|
||||
//SpuId: 0,
|
||||
//AppointDeliveryDay: 0,
|
||||
//ThirdUrl: "",
|
||||
//Extra: "",
|
||||
//Src: "",
|
||||
//StandardBrandId: 0,
|
||||
//NeedCheckOut: false,
|
||||
//PoiResource: nil,
|
||||
//CarVinCode: "",
|
||||
//PresellConfigLevel: 0,
|
||||
//NeedRechargeMode: false,
|
||||
//AccountTemplateId: "",
|
||||
//PresellDeliveryType: 0,
|
||||
//WhiteBackGroundPicUrl: "",
|
||||
//LongPicUrl: "",
|
||||
//AfterSaleService: nil,
|
||||
//SellChannel: nil,
|
||||
StartSaleType: 0, // 立即上架
|
||||
//DelayRule: nil,
|
||||
//MaterialVideoId: "",
|
||||
PickupMethod: "0",
|
||||
//SizeInfoTemplateId: 0,
|
||||
//SubstituteGoodsUrl: "",
|
||||
//SaleChannelType: "",
|
||||
//RecruitInfo: nil,
|
||||
//StoreId: 0,
|
||||
//MainProductId: 0,
|
||||
//SaleLimitId: 0,
|
||||
//NamePrefix: "",
|
||||
}
|
||||
|
||||
// 获取属性
|
||||
|
||||
Reference in New Issue
Block a user