1
This commit is contained in:
@@ -96,6 +96,7 @@ type DelayRule struct {
|
|||||||
// 特殊日期延迟发货时间下单结束时间,时间戳,单位秒
|
// 特殊日期延迟发货时间下单结束时间,时间戳,单位秒
|
||||||
EndTime int64 `json:"end_time"`
|
EndTime int64 `json:"end_time"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProductEditV2Param struct {
|
type ProductEditV2Param struct {
|
||||||
// 商品ID
|
// 商品ID
|
||||||
ProductId int64 `json:"product_id"`
|
ProductId int64 `json:"product_id"`
|
||||||
@@ -228,3 +229,9 @@ type ProductEditV2Param struct {
|
|||||||
// 限售模板ID
|
// 限售模板ID
|
||||||
SaleLimitId int64 `json:"sale_limit_id"`
|
SaleLimitId int64 `json:"sale_limit_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ProductEditV2Param2 struct {
|
||||||
|
// 商品ID
|
||||||
|
ProductId int64 `json:"product_id"`
|
||||||
|
Commit bool `json:"commit"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,239 @@
|
|||||||
|
package product_editV2_commit_request
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
product_editV2_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_editV2/response"
|
||||||
|
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ProductEditV2Request struct {
|
||||||
|
doudian_sdk.BaseDoudianOpApiRequest
|
||||||
|
Param *ProductEditV2Param2
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ProductEditV2Request) GetUrlPath() string {
|
||||||
|
return "/product/editV2"
|
||||||
|
}
|
||||||
|
|
||||||
|
func New() *ProductEditV2Request {
|
||||||
|
request := &ProductEditV2Request{
|
||||||
|
Param: &ProductEditV2Param2{},
|
||||||
|
}
|
||||||
|
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||||
|
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||||
|
return request
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ProductEditV2Request) Execute(accessToken *doudian_sdk.AccessToken) (*product_editV2_response.ProductEditV2Response, error) {
|
||||||
|
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
response := &product_editV2_response.ProductEditV2Response{}
|
||||||
|
_ = json.Unmarshal([]byte(responseJson), response)
|
||||||
|
return response, nil
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ProductEditV2Request) GetParamObject() interface{} {
|
||||||
|
return c.Param
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ProductEditV2Request) GetParams() *ProductEditV2Param2 {
|
||||||
|
return c.Param
|
||||||
|
}
|
||||||
|
|
||||||
|
type ProductEditV2Param2 struct {
|
||||||
|
// 商品ID
|
||||||
|
ProductId int64 `json:"product_id"`
|
||||||
|
Commit bool `json:"commit"`
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//type QualityAttachmentsItem struct {
|
||||||
|
// // 1-图片,2-pdf
|
||||||
|
// MediaType int64 `json:"media_type"`
|
||||||
|
// // 凭证url
|
||||||
|
// Url string `json:"url"`
|
||||||
|
//}
|
||||||
|
//type QualityListItem struct {
|
||||||
|
// // 资质key
|
||||||
|
// QualityKey string `json:"quality_key"`
|
||||||
|
// // 资质名称
|
||||||
|
// QualityName string `json:"quality_name"`
|
||||||
|
// // 资质
|
||||||
|
// QualityAttachments []QualityAttachmentsItem `json:"quality_attachments"`
|
||||||
|
//}
|
||||||
|
//type PoiResource struct {
|
||||||
|
// // 有效时间段,从领取日开始计算,优先级高于ValidStart-ValidEnd
|
||||||
|
// ValidDays int64 `json:"valid_days"`
|
||||||
|
// // 卡券有效开始时间,秒单位时间戳
|
||||||
|
// ValidStart int64 `json:"valid_start"`
|
||||||
|
// // 卡券有效截止时间,秒单位时间戳
|
||||||
|
// ValidEnd int64 `json:"valid_end"`
|
||||||
|
// // 客服电话
|
||||||
|
// ServiceNum string `json:"service_num"`
|
||||||
|
// // 领取须知
|
||||||
|
// Notification string `json:"notification"`
|
||||||
|
// // 平台产生券码: 1 ; 合作方api实时传入的券码: 4
|
||||||
|
// CodeType int64 `json:"code_type"`
|
||||||
|
// // 券码总量,0/-1表示不限制,平台券时须\u003e0
|
||||||
|
// Count int64 `json:"count"`
|
||||||
|
// // 0-不支持二次兑换,1-支持二次兑换
|
||||||
|
// CouponSecondExchange int64 `json:"couponSecondExchange"`
|
||||||
|
// // 可核销总次数
|
||||||
|
// TotalCanUseCount int32 `json:"total_can_use_count"`
|
||||||
|
// // 兑换链接
|
||||||
|
// Link string `json:"link"`
|
||||||
|
// // 券码使用条件
|
||||||
|
// Condition string `json:"condition"`
|
||||||
|
// // 数组当前只支持一个元素且只可为 1或2,其中 1 表示随时退+过期自动退,2 表示不支持退
|
||||||
|
// CouponReturnMethods []int64 `json:"coupon_return_methods"`
|
||||||
|
//}
|
||||||
|
//type DelayRule struct {
|
||||||
|
// // 是否开启特殊日期延迟发货
|
||||||
|
// Enable bool `json:"enable"`
|
||||||
|
// // 1 时间点;2 时间范围
|
||||||
|
// ConfigType int32 `json:"config_type"`
|
||||||
|
// // 特殊日期延迟发货时间最晚发货时间,时间戳,单位秒:当config_type=1时,传时间戳,代表最晚x发货;当config_type=2时,传天数,代表延迟x天发货
|
||||||
|
// ConfigValue int64 `json:"config_value"`
|
||||||
|
// // 特殊日期延迟发货时间下单开始时间,时间戳,单位秒
|
||||||
|
// StartTime int64 `json:"start_time"`
|
||||||
|
// // 特殊日期延迟发货时间下单结束时间,时间戳,单位秒
|
||||||
|
// EndTime int64 `json:"end_time"`
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//type ProductEditV2Param struct {
|
||||||
|
// // 商品ID
|
||||||
|
// ProductId int64 `json:"product_id"`
|
||||||
|
// // 0-普通,3-虚拟,6玉石闪购,7云闪购
|
||||||
|
// ProductType int64 `json:"product_type"`
|
||||||
|
// // 叶子类目ID通过/shop/getShopCategory接口获取
|
||||||
|
// CategoryLeafId int64 `json:"category_leaf_id"`
|
||||||
|
// // 属性名称|属性值 之间用|分隔, 多组之间用^分开
|
||||||
|
// ProductFormat string `json:"product_format"`
|
||||||
|
// // 商品名称,最多60个字符(30个汉字),不能含emoj表情
|
||||||
|
// Name string `json:"name"`
|
||||||
|
// // 商家推荐语,不能含emoj表情
|
||||||
|
// RecommendRemark string `json:"recommend_remark"`
|
||||||
|
// // 商品轮播图,多张图片用 \"|\" 分开,第一张图为主图,最多5张,至少600x600,大小不超过1M 注:\"pic\"、\"description\"、\"spec_pic\"这三个字段里的传入的图片数量总和,不得超过50张。
|
||||||
|
// Pic string `json:"pic"`
|
||||||
|
// // 商品轮播图,多张图片用 \"|\" 分开,第一张图为主图,最多5张,至少600x600,大小不超过1M 注:\"pic\"、\"description\"、\"spec_pic\"这三个字段里的传入的图片数量总和,不得超过50张。
|
||||||
|
// Description string `json:"description"`
|
||||||
|
// // 已废弃,支付方式,0货到付款 1在线支付,2,货到付款+在线支付
|
||||||
|
// PayType int64 `json:"pay_type"`
|
||||||
|
// // 海南免税生效。 0:离岛免税、1:邮寄、2:离岛自提+邮寄
|
||||||
|
// DeliveryMethod int32 `json:"delivery_method"`
|
||||||
|
// // 海南免税:海关限购分类编码
|
||||||
|
// CdfCategory string `json:"cdf_category"`
|
||||||
|
// // 1 减库存类型:1-拍下减库存 2-付款减库存
|
||||||
|
// ReduceType int64 `json:"reduce_type"`
|
||||||
|
// // 同店商品推荐:为空表示使用系统推荐;多个product_id使用“|”分开
|
||||||
|
// AssocIds string `json:"assoc_ids"`
|
||||||
|
// // 运费模板id,传0表示包邮,通过/freightTemplate/list接口获取
|
||||||
|
// FreightId int64 `json:"freight_id"`
|
||||||
|
// // 重量
|
||||||
|
// Weight float64 `json:"weight"`
|
||||||
|
// // 重量单位,0-kg, 1-g
|
||||||
|
// WeightUnit int64 `json:"weight_unit"`
|
||||||
|
// // delivery_delay_day: 承诺发货时间,单位是天,不传则默认为2天。现货发货(presell_type=0)和阶梯发货模式(presell_type=2)时必填,支持传入9999 、1、 2 (分别表示当日发、次日发、48小时发),具体支持传入的参数范围/product/getProductUpdateRule
|
||||||
|
// DeliveryDelayDay int64 `json:"delivery_delay_day"`
|
||||||
|
// // 发货模式,0-现货发货,1-预售发货,2-阶梯发货,默认0
|
||||||
|
// PresellType int64 `json:"presell_type"`
|
||||||
|
// // 全款预售模式时的发货时间/阶梯模式下阶梯发货时间,具体支持传入的参数范围/product/getProductUpdateRule
|
||||||
|
// PresellDelay int64 `json:"presell_delay"`
|
||||||
|
// // 预售结束时间,格式2020-02-21 18:54:27,最多支持设置距离当前30天
|
||||||
|
// PresellEndTime string `json:"presell_end_time"`
|
||||||
|
// // 是否支持7天无理由,0不支持,1支持,2支持(拆封后不支持)
|
||||||
|
// Supply7dayReturn int64 `json:"supply_7day_return"`
|
||||||
|
// // 客服电话号码
|
||||||
|
// Mobile string `json:"mobile"`
|
||||||
|
// // false仅保存,true保存+提审
|
||||||
|
// Commit bool `json:"commit"`
|
||||||
|
// // 品牌id (请求店铺授权品牌接口获取) (效果即为商品详情页面中的品牌字段)
|
||||||
|
// BrandId int64 `json:"brand_id"`
|
||||||
|
// // 商家可见备注
|
||||||
|
// Remark string `json:"remark"`
|
||||||
|
// // 外部product_id
|
||||||
|
// OutProductId int64 `json:"out_product_id"`
|
||||||
|
// // 资质信息,可通过/product/qualificationConfig获取
|
||||||
|
// QualityList []QualityListItem `json:"quality_list"`
|
||||||
|
// // 如果不填,则规格名为各级规格名用 \"-\" 自动生成
|
||||||
|
// SpecName string `json:"spec_name"`
|
||||||
|
// // 店铺通用规格,能被同类商品通用。多规格用^分隔,规格与规格值用|分隔,多个规格值用,分隔。如果创建或编辑现货+预售商品或新预售商品时,须包含发货时效,如:颜色|黑色,白色,黄色^尺码|S,M,L^发货时效|5天内发货,15天内发货
|
||||||
|
// Specs string `json:"specs"`
|
||||||
|
// // sku详情,数量应该等于规格1规格2规格3,sku数量和规格组合数必须一致 sku不可售时,库存可设置为0。 delivery_infos为SKU物流信息,info_value为字符串类型(示例:"12"),info_type填weight,info_unit支持mg,g,kg
|
||||||
|
// SpecPrices string `json:"spec_prices"`
|
||||||
|
// // 如颜色-尺寸, 颜色就是主规格, 颜色如黑,白,黄,它们图片url以逗号分隔 注:\"pic\"、\"description\"、\"spec_pic\"这三个字段里的传入的图片数量总和,不得超过50张。
|
||||||
|
// SpecPic string `json:"spec_pic"`
|
||||||
|
// // 每个用户每次下单限购件数
|
||||||
|
// MaximumPerOrder int64 `json:"maximum_per_order"`
|
||||||
|
// // 每个用户累计限购件数
|
||||||
|
// LimitPerBuyer int64 `json:"limit_per_buyer"`
|
||||||
|
// // 每个用户每次下单至少购买的件数
|
||||||
|
// MinimumPerOrder int64 `json:"minimum_per_order"`
|
||||||
|
// // 通过/product/getCatePropertyV2获取 格式:{"property_id":[{"value":value,"name":"property_name","diy_type":0}]}, name的类型是string,value和diy_type的类型是number
|
||||||
|
// ProductFormatNew string `json:"product_format_new"`
|
||||||
|
// // spu id
|
||||||
|
// SpuId int64 `json:"spu_id"`
|
||||||
|
// // 可预约发货天数
|
||||||
|
// AppointDeliveryDay int64 `json:"appoint_delivery_day"`
|
||||||
|
// // third_url
|
||||||
|
// ThirdUrl string `json:"third_url"`
|
||||||
|
// // extra
|
||||||
|
// Extra string `json:"extra"`
|
||||||
|
// // src
|
||||||
|
// Src string `json:"src"`
|
||||||
|
// // 外部product id
|
||||||
|
// OuterProductId string `json:"outer_product_id"`
|
||||||
|
// // standard_brand_id,通过/brand/list获取,无品牌id则传596120136
|
||||||
|
// StandardBrandId int64 `json:"standard_brand_id"`
|
||||||
|
// // 卡券类型需要传true
|
||||||
|
// NeedCheckOut bool `json:"need_check_out"`
|
||||||
|
// // 卡券信息
|
||||||
|
// PoiResource *PoiResource `json:"poi_resource"`
|
||||||
|
// // 使用qualityList覆盖当前商品资质,qualityList传空代表清空
|
||||||
|
// ForceUseQualityList bool `json:"force_use_quality_list"`
|
||||||
|
// // 汽车Vin码
|
||||||
|
// CarVinCode string `json:"car_vin_code"`
|
||||||
|
// // 0:全款预售,1:sku预售,2:现货+预售 ,3:新预售
|
||||||
|
// PresellConfigLevel int64 `json:"presell_config_level"`
|
||||||
|
// // 充值模式
|
||||||
|
// NeedRechargeMode bool `json:"need_recharge_mode"`
|
||||||
|
// // 多账号模板
|
||||||
|
// AccountTemplateId string `json:"account_template_id"`
|
||||||
|
// // 全款预售和sku预售时传递,其他不传: 0 预售结束后发货 1支付完成后发货
|
||||||
|
// PresellDeliveryType int64 `json:"presell_delivery_type"`
|
||||||
|
// // 白底图url(仅素材中心url有效)
|
||||||
|
// WhiteBackGroundPicUrl string `json:"white_back_ground_pic_url"`
|
||||||
|
// // 3:4长图url(仅素材中心url有效)
|
||||||
|
// LongPicUrl string `json:"long_pic_url"`
|
||||||
|
// // 售后服务参数,key:value格式 supply_day_return_selector(7天无理由选项):N天-政策代号,N只支持7和15 supply_red_ass_return(红屁屁无忧):0不支持,1支持 supply_allergy_return(过敏无忧,仅跨境可选):0不支持,1支持 damaged_order_return(坏损包退):0不支持,1支持 support_allergy_returnV2(过敏包退,境内可选):0不支持,1支持
|
||||||
|
// AfterSaleService map[string]string `json:"after_sale_service"`
|
||||||
|
// // 售卖方式;0:全渠道手售卖,1:仅指定直播间售卖
|
||||||
|
// SellChannel []int64 `json:"sell_channel"`
|
||||||
|
// // 审核通过后上架售卖时间配置:0-立即上架售卖 1-放入仓库
|
||||||
|
// StartSaleType int64 `json:"start_sale_type"`
|
||||||
|
// // 特殊日期延迟发货规则
|
||||||
|
// DelayRule *DelayRule `json:"delay_rule"`
|
||||||
|
// // 主图视频ID,可以先通过https://op.jinritemai.com/docs/api-docs/69/1617接口上传视频,获取审核通过的视频素材ID进行传入
|
||||||
|
// MaterialVideoId string `json:"material_video_id"`
|
||||||
|
// // 提取方式新字段,推荐使用。"0": 普通商品-使用物流发货, "1": 虚拟商品-无需物流与电子交易凭证, "2": 虚拟商品-使用电子交易凭证, "3": 虚拟商品-充值直连
|
||||||
|
// PickupMethod string `json:"pickup_method"`
|
||||||
|
// // 尺码模板ID
|
||||||
|
// SizeInfoTemplateId int64 `json:"size_info_template_id"`
|
||||||
|
// // 外部商品url
|
||||||
|
// SubstituteGoodsUrl string `json:"substitute_goods_url"`
|
||||||
|
// // 销售渠道类型,可选onlineOnly(纯电商,仅在线上售卖)或sameAsOffline(专柜同款,线上线下都有售卖),云零售商家(https://fxg.jinritemai.com/ffa/merchant-growth/cloud-retail)可以设置
|
||||||
|
// SaleChannelType string `json:"sale_channel_type"`
|
||||||
|
// // 通过/product/getRecommendName接口推荐的商品标题前缀(注意系统根据类目属性生成前缀字符串时,末尾有一个空格)
|
||||||
|
// NamePrefix string `json:"name_prefix"`
|
||||||
|
// // 门店ID
|
||||||
|
// StoreId int64 `json:"store_id"`
|
||||||
|
// // 主商品ID
|
||||||
|
// MainProductId int64 `json:"main_product_id"`
|
||||||
|
// // 限售模板ID
|
||||||
|
// SaleLimitId int64 `json:"sale_limit_id"`
|
||||||
|
//}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package product_editV2_commit_request
|
||||||
|
|
||||||
|
import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||||
|
|
||||||
|
type ProductEditV2Response struct {
|
||||||
|
doudian_sdk.BaseDoudianOpApiResponse
|
||||||
|
Data *ProductEditV2Data `json:"data"`
|
||||||
|
}
|
||||||
|
type ProductEditV2Data struct {
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@ import (
|
|||||||
product_detail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_detail/request"
|
product_detail_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_detail/request"
|
||||||
product_detail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_detail/response"
|
product_detail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_detail/response"
|
||||||
product_editV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_editV2/request"
|
product_editV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_editV2/request"
|
||||||
|
product_editV2_commit_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_editV2_commit/request"
|
||||||
product_getCatePropertyV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_getCatePropertyV2/request"
|
product_getCatePropertyV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_getCatePropertyV2/request"
|
||||||
product_getCatePropertyV2_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_getCatePropertyV2/response"
|
product_getCatePropertyV2_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_getCatePropertyV2/response"
|
||||||
product_listV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_listV2/request"
|
product_listV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_listV2/request"
|
||||||
@@ -147,6 +148,21 @@ func (a *API) EditStoreCommodity(sku *product_editV2_request.ProductEditV2Param)
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// EditStoreCommodityCommit 上架商品
|
||||||
|
func (a *API) EditStoreCommodityCommit(sku *product_editV2_commit_request.ProductEditV2Param2) error {
|
||||||
|
request := product_editV2_commit_request.New()
|
||||||
|
request.Param = sku
|
||||||
|
|
||||||
|
result, err := request.Execute(a.accessTokenObj)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if result.Code != RequestSuccessCode {
|
||||||
|
return errors.New(result.SubMsg)
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// DeleteStoreCommodity 删除商品
|
// DeleteStoreCommodity 删除商品
|
||||||
func (a *API) DeleteStoreCommodity(productId int64) error {
|
func (a *API) DeleteStoreCommodity(productId int64) error {
|
||||||
request := product_del_request.New()
|
request := product_del_request.New()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
product_addV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_addV2/request"
|
product_addV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_addV2/request"
|
||||||
product_editV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_editV2/request"
|
product_editV2_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_editV2/request"
|
||||||
|
product_editV2_commit_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/product_editV2_commit/request"
|
||||||
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"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
@@ -257,6 +258,7 @@ func TestEiduPrice(t *testing.T) {
|
|||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// s上架1
|
||||||
func TestEditStoreCommodity(t *testing.T) {
|
func TestEditStoreCommodity(t *testing.T) {
|
||||||
token := `{"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":""}`
|
token := `{"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", token)
|
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
|
||||||
@@ -265,3 +267,20 @@ func TestEditStoreCommodity(t *testing.T) {
|
|||||||
Commit: true,
|
Commit: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 上架2
|
||||||
|
func TestEditStoreCommodity2(t *testing.T) {
|
||||||
|
token := `{"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", token)
|
||||||
|
a.EditStoreCommodityCommit(&product_editV2_commit_request.ProductEditV2Param2{
|
||||||
|
ProductId: 3576377564144516403,
|
||||||
|
Commit: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下架
|
||||||
|
func TestProductSetOffline(t *testing.T) {
|
||||||
|
token := `{"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", token)
|
||||||
|
a.ProductSetOffline(3576377564144516403)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user