/
PriceTagReqParam.go
40 lines (35 loc) · 1.02 KB
/
PriceTagReqParam.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
package dt
import (
"sync"
)
// PriceTagReqParam 结构体
type PriceTagReqParam struct {
// 图片名称,不能重复
ObjKeyName string `json:"obj_key_name,omitempty" xml:"obj_key_name,omitempty"`
// 业务编码
BusiCode string `json:"busi_code,omitempty" xml:"busi_code,omitempty"`
// 业务来源
Source string `json:"source,omitempty" xml:"source,omitempty"`
// 条码
BarCode string `json:"bar_code,omitempty" xml:"bar_code,omitempty"`
// 扩展信息
ExtendInfoMap string `json:"extend_info_map,omitempty" xml:"extend_info_map,omitempty"`
}
var poolPriceTagReqParam = sync.Pool{
New: func() any {
return new(PriceTagReqParam)
},
}
// GetPriceTagReqParam() 从对象池中获取PriceTagReqParam
func GetPriceTagReqParam() *PriceTagReqParam {
return poolPriceTagReqParam.Get().(*PriceTagReqParam)
}
// ReleasePriceTagReqParam 释放PriceTagReqParam
func ReleasePriceTagReqParam(v *PriceTagReqParam) {
v.ObjKeyName = ""
v.BusiCode = ""
v.Source = ""
v.BarCode = ""
v.ExtendInfoMap = ""
poolPriceTagReqParam.Put(v)
}