-
Notifications
You must be signed in to change notification settings - Fork 9
/
TaobaoWlbWmsSkuGetAPIResponse.go
172 lines (163 loc) · 6.24 KB
/
TaobaoWlbWmsSkuGetAPIResponse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
package wms
import (
"encoding/xml"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoWlbWmsSkuGetAPIResponse 商品信息查询 API返回值
// taobao.wlb.wms.sku.get
//
// 商品信息查询
type TaobaoWlbWmsSkuGetAPIResponse struct {
model.CommonResponse
TaobaoWlbWmsSkuGetAPIResponseModel
}
// Reset 清空结构体
func (m *TaobaoWlbWmsSkuGetAPIResponse) Reset() {
(&m.CommonResponse).Reset()
(&m.TaobaoWlbWmsSkuGetAPIResponseModel).Reset()
}
// TaobaoWlbWmsSkuGetAPIResponseModel is 商品信息查询 成功返回结果
type TaobaoWlbWmsSkuGetAPIResponseModel struct {
XMLName xml.Name `xml:"wlb_wms_sku_get_response"`
// 平台颁发的每次请求访问的唯一标识
RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"`
// 拓展属性, key-value结构,格式要求: 以英文分号“;”分隔每组key-value,以英文冒号“:”分隔key与value。如果value中带有分号,需要转成下划线“_”,如果带有冒号,需要转成中划线“-”
ExtendFields string `json:"extend_fields,omitempty" xml:"extend_fields,omitempty"`
// 批准文号
ApprovalNumber string `json:"approval_number,omitempty" xml:"approval_number,omitempty"`
// 尺寸
Size string `json:"size,omitempty" xml:"size,omitempty"`
// 颜色
Color string `json:"color,omitempty" xml:"color,omitempty"`
// 规格
Specification string `json:"specification,omitempty" xml:"specification,omitempty"`
// 品牌名称
BrandName string `json:"brand_name,omitempty" xml:"brand_name,omitempty"`
// 品牌编码
Brand string `json:"brand,omitempty" xml:"brand,omitempty"`
// 商品类别名称
CategoryName string `json:"category_name,omitempty" xml:"category_name,omitempty"`
// 商品类别编码(外部系统类别)
Category string `json:"category,omitempty" xml:"category,omitempty"`
// 商品类别 NORMAL:普通商品、 COMBINE:组合商品、 DISTRIBUTION:分销商品
Type string `json:"type,omitempty" xml:"type,omitempty"`
// 商品标题
Title string `json:"title,omitempty" xml:"title,omitempty"`
// 商品名称
Name string `json:"name,omitempty" xml:"name,omitempty"`
// 条形码,多条码请用”;”分隔;
BarCode string `json:"bar_code,omitempty" xml:"bar_code,omitempty"`
// 商家商品编码,与itemid必须有一个值不为空
IitemCode string `json:"iitem_code,omitempty" xml:"iitem_code,omitempty"`
// 菜鸟商品ID,与itemcode必须有一个值不为空
ItemId string `json:"item_id,omitempty" xml:"item_id,omitempty"`
// 错误信息
WlErrorMsg string `json:"wl_error_msg,omitempty" xml:"wl_error_msg,omitempty"`
// 错误编码
WlErrorCode string `json:"wl_error_code,omitempty" xml:"wl_error_code,omitempty"`
// 成本价,单位分
CostPrice int64 `json:"cost_price,omitempty" xml:"cost_price,omitempty"`
// 零售价,单位分
ItemPrice int64 `json:"item_price,omitempty" xml:"item_price,omitempty"`
// 吊牌价,单位分
TagPrice int64 `json:"tag_price,omitempty" xml:"tag_price,omitempty"`
// 保质期预警天数
AdventLifecycle int64 `json:"advent_lifecycle,omitempty" xml:"advent_lifecycle,omitempty"`
// 保质期禁售天数
LockupLifecycle int64 `json:"lockup_lifecycle,omitempty" xml:"lockup_lifecycle,omitempty"`
// 保质期禁收天数
RejectLifecycle int64 `json:"reject_lifecycle,omitempty" xml:"reject_lifecycle,omitempty"`
// 保质期天数
Lifecycle int64 `json:"lifecycle,omitempty" xml:"lifecycle,omitempty"`
// 场地
OriginAddress int64 `json:"origin_address,omitempty" xml:"origin_address,omitempty"`
// 箱规
Pcs int64 `json:"pcs,omitempty" xml:"pcs,omitempty"`
// 体积,单位立方厘米
Volume int64 `json:"volume,omitempty" xml:"volume,omitempty"`
// 高度,单位毫米
Height int64 `json:"height,omitempty" xml:"height,omitempty"`
// 宽度,单位毫米
Width int64 `json:"width,omitempty" xml:"width,omitempty"`
// 长度,单位毫米
Length int64 `json:"length,omitempty" xml:"length,omitempty"`
// 净重,单位克
NetWeight int64 `json:"net_weight,omitempty" xml:"net_weight,omitempty"`
// 毛重,单位克
GrossWeight int64 `json:"gross_weight,omitempty" xml:"gross_weight,omitempty"`
// 是否启用批次管理
IsBatchMgt bool `json:"is_batch_mgt,omitempty" xml:"is_batch_mgt,omitempty"`
// 启用标识
UseYn bool `json:"use_yn,omitempty" xml:"use_yn,omitempty"`
// 是否危险品
IsDanger bool `json:"is_danger,omitempty" xml:"is_danger,omitempty"`
// 是否易碎品
IsHygroscopic bool `json:"is_hygroscopic,omitempty" xml:"is_hygroscopic,omitempty"`
// 是否启用序列号管理
IsSnMgt bool `json:"is_sn_mgt,omitempty" xml:"is_sn_mgt,omitempty"`
// 是否启用保质期管理
IsShelflife bool `json:"is_shelflife,omitempty" xml:"is_shelflife,omitempty"`
// 是否成功
WlSuccess bool `json:"wl_success,omitempty" xml:"wl_success,omitempty"`
// 是否区域销售
IsAreaSale bool `json:"is_area_sale,omitempty" xml:"is_area_sale,omitempty"`
}
// Reset 清空结构体
func (m *TaobaoWlbWmsSkuGetAPIResponseModel) Reset() {
m.RequestId = ""
m.ExtendFields = ""
m.ApprovalNumber = ""
m.Size = ""
m.Color = ""
m.Specification = ""
m.BrandName = ""
m.Brand = ""
m.CategoryName = ""
m.Category = ""
m.Type = ""
m.Title = ""
m.Name = ""
m.BarCode = ""
m.IitemCode = ""
m.ItemId = ""
m.WlErrorMsg = ""
m.WlErrorCode = ""
m.CostPrice = 0
m.ItemPrice = 0
m.TagPrice = 0
m.AdventLifecycle = 0
m.LockupLifecycle = 0
m.RejectLifecycle = 0
m.Lifecycle = 0
m.OriginAddress = 0
m.Pcs = 0
m.Volume = 0
m.Height = 0
m.Width = 0
m.Length = 0
m.NetWeight = 0
m.GrossWeight = 0
m.IsBatchMgt = false
m.UseYn = false
m.IsDanger = false
m.IsHygroscopic = false
m.IsSnMgt = false
m.IsShelflife = false
m.WlSuccess = false
m.IsAreaSale = false
}
var poolTaobaoWlbWmsSkuGetAPIResponse = sync.Pool{
New: func() any {
return new(TaobaoWlbWmsSkuGetAPIResponse)
},
}
// GetTaobaoWlbWmsSkuGetAPIResponse 从 sync.Pool 获取 TaobaoWlbWmsSkuGetAPIResponse
func GetTaobaoWlbWmsSkuGetAPIResponse() *TaobaoWlbWmsSkuGetAPIResponse {
return poolTaobaoWlbWmsSkuGetAPIResponse.Get().(*TaobaoWlbWmsSkuGetAPIResponse)
}
// ReleaseTaobaoWlbWmsSkuGetAPIResponse 将 TaobaoWlbWmsSkuGetAPIResponse 保存到 sync.Pool
func ReleaseTaobaoWlbWmsSkuGetAPIResponse(v *TaobaoWlbWmsSkuGetAPIResponse) {
v.Reset()
poolTaobaoWlbWmsSkuGetAPIResponse.Put(v)
}