-
Notifications
You must be signed in to change notification settings - Fork 9
/
TaobaoUsceslIteminfoBatchPutAPIRequest.go
94 lines (79 loc) · 2.85 KB
/
TaobaoUsceslIteminfoBatchPutAPIRequest.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
package uscesl
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// TaobaoUsceslIteminfoBatchPutAPIRequest 批量写入商品信息接口 API请求
// taobao.uscesl.iteminfo.batch.put
//
// 电子架签批量写入商品数据,用于电子价签展示
type TaobaoUsceslIteminfoBatchPutAPIRequest struct {
model.Params
// 商品变更信息集合
_itemChangeBOList []ItemChangeBo
// 门店ID
_shopId int64
}
// NewTaobaoUsceslIteminfoBatchPutRequest 初始化TaobaoUsceslIteminfoBatchPutAPIRequest对象
func NewTaobaoUsceslIteminfoBatchPutRequest() *TaobaoUsceslIteminfoBatchPutAPIRequest {
return &TaobaoUsceslIteminfoBatchPutAPIRequest{
Params: model.NewParams(2),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TaobaoUsceslIteminfoBatchPutAPIRequest) Reset() {
r._itemChangeBOList = r._itemChangeBOList[:0]
r._shopId = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoUsceslIteminfoBatchPutAPIRequest) GetApiMethodName() string {
return "taobao.uscesl.iteminfo.batch.put"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoUsceslIteminfoBatchPutAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoUsceslIteminfoBatchPutAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetItemChangeBOList is ItemChangeBOList Setter
// 商品变更信息集合
func (r *TaobaoUsceslIteminfoBatchPutAPIRequest) SetItemChangeBOList(_itemChangeBOList []ItemChangeBo) error {
r._itemChangeBOList = _itemChangeBOList
r.Set("item_change_b_o_list", _itemChangeBOList)
return nil
}
// GetItemChangeBOList ItemChangeBOList Getter
func (r TaobaoUsceslIteminfoBatchPutAPIRequest) GetItemChangeBOList() []ItemChangeBo {
return r._itemChangeBOList
}
// SetShopId is ShopId Setter
// 门店ID
func (r *TaobaoUsceslIteminfoBatchPutAPIRequest) SetShopId(_shopId int64) error {
r._shopId = _shopId
r.Set("shop_id", _shopId)
return nil
}
// GetShopId ShopId Getter
func (r TaobaoUsceslIteminfoBatchPutAPIRequest) GetShopId() int64 {
return r._shopId
}
var poolTaobaoUsceslIteminfoBatchPutAPIRequest = sync.Pool{
New: func() any {
return NewTaobaoUsceslIteminfoBatchPutRequest()
},
}
// GetTaobaoUsceslIteminfoBatchPutRequest 从 sync.Pool 获取 TaobaoUsceslIteminfoBatchPutAPIRequest
func GetTaobaoUsceslIteminfoBatchPutAPIRequest() *TaobaoUsceslIteminfoBatchPutAPIRequest {
return poolTaobaoUsceslIteminfoBatchPutAPIRequest.Get().(*TaobaoUsceslIteminfoBatchPutAPIRequest)
}
// ReleaseTaobaoUsceslIteminfoBatchPutAPIRequest 将 TaobaoUsceslIteminfoBatchPutAPIRequest 放入 sync.Pool
func ReleaseTaobaoUsceslIteminfoBatchPutAPIRequest(v *TaobaoUsceslIteminfoBatchPutAPIRequest) {
v.Reset()
poolTaobaoUsceslIteminfoBatchPutAPIRequest.Put(v)
}