1
This commit is contained in:
@@ -25,6 +25,43 @@ func New() *FreightTemplateDetailRequest {
|
||||
|
||||
}
|
||||
|
||||
type T struct {
|
||||
Code int `json:"code"`
|
||||
Data struct {
|
||||
Columns []struct {
|
||||
AddNum int `json:"add_num"`
|
||||
AddNumPrice int `json:"add_num_price"`
|
||||
AddWeight int `json:"add_weight"`
|
||||
AddWeightPrice int `json:"add_weight_price"`
|
||||
FirstNum int `json:"first_num"`
|
||||
FirstNumPrice int `json:"first_num_price"`
|
||||
FirstWeight int `json:"first_weight"`
|
||||
FirstWeightPrice int `json:"first_weight_price"`
|
||||
IsDefault int `json:"is_default"`
|
||||
IsLimited bool `json:"is_limited"`
|
||||
IsOverFree bool `json:"is_over_free"`
|
||||
OverAmount int `json:"over_amount"`
|
||||
OverNum int `json:"over_num"`
|
||||
OverWeight int `json:"over_weight"`
|
||||
ProvinceInfos []interface{} `json:"province_infos"`
|
||||
} `json:"columns"`
|
||||
Template struct {
|
||||
CalculateType int `json:"calculate_type"`
|
||||
FixedAmount int `json:"fixed_amount"`
|
||||
Id int `json:"id"`
|
||||
ProductCity string `json:"product_city"`
|
||||
ProductProvince string `json:"product_province"`
|
||||
RuleType int `json:"rule_type"`
|
||||
TemplateName string `json:"template_name"`
|
||||
TransferType int `json:"transfer_type"`
|
||||
} `json:"template"`
|
||||
} `json:"data"`
|
||||
LogId string `json:"log_id"`
|
||||
Msg string `json:"msg"`
|
||||
SubCode string `json:"sub_code"`
|
||||
SubMsg string `json:"sub_msg"`
|
||||
}
|
||||
|
||||
func (c *FreightTemplateDetailRequest) Execute(accessToken *doudian_sdk.AccessToken) (*freightTemplate_detail_response.FreightTemplateDetailResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
|
||||
@@ -4,8 +4,9 @@ import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/c
|
||||
|
||||
type FreightTemplateDetailResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *FreightTemplateDetailData `json:"data"`
|
||||
Data *Data `json:"data"`
|
||||
}
|
||||
|
||||
type ColumnsItem struct {
|
||||
// 首重(单位:kg) 按重量计价必填 0.1-999.9之间的小数,小数点后一位
|
||||
FirstWeight float64 `json:"first_weight"`
|
||||
@@ -35,19 +36,17 @@ type ColumnsItem struct {
|
||||
OverAmount int64 `json:"over_amount"`
|
||||
// 满xx件包邮 1-10之间的整数
|
||||
OverNum int64 `json:"over_num"`
|
||||
// 当前规则生效的地址,统一以List<Struct>结构返回,该结构为嵌套结构。对应的json格式为[{"id":"32","children":[{"id":"320500","children":[{"id":"320508","children":[{"id":"320508014"},{"id":"320508004"}]}]}]}] 注意:返回的为最新的四级地址版本(地址存储升级变更的可能,以最新的返回)
|
||||
//当前规则生效的地址,统一以List<Struct>结构返回,该结构为嵌套结构。对应的json格式为[{"id":"32","children":[{"id":"320500","children":[{"id":"320508","children":[{"id":"320508014"},{"id":"320508004"}]}]}]}] 注意:返回的为最新的四级地址版本(地址存储升级变更的可能,以最新的返回)
|
||||
ProvinceInfos []ProvinceInfosItem `json:"province_infos"`
|
||||
}
|
||||
|
||||
type Data struct {
|
||||
// 模板信息
|
||||
Template *Template `json:"template"`
|
||||
// 规则
|
||||
Columns []ColumnsItem `json:"columns"`
|
||||
}
|
||||
type FreightTemplateDetailData struct {
|
||||
// 模板详情
|
||||
Data *Data `json:"data"`
|
||||
}
|
||||
|
||||
type Template struct {
|
||||
// 模板id
|
||||
Id int64 `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user