-
Notifications
You must be signed in to change notification settings - Fork 9
/
AppleTopActivateNotifyDo.go
49 lines (44 loc) · 1.45 KB
/
AppleTopActivateNotifyDo.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
package game
import (
"sync"
)
// AppleTopActivateNotifyDo 结构体
type AppleTopActivateNotifyDo struct {
// 电子卡卡号
CardNo string `json:"card_no,omitempty" xml:"card_no,omitempty"`
// 商品编号
GoodsId string `json:"goods_id,omitempty" xml:"goods_id,omitempty"`
// 商户唯一订单号
OrderNo string `json:"order_no,omitempty" xml:"order_no,omitempty"`
// 附加信息,后续可以扩展
Memo string `json:"memo,omitempty" xml:"memo,omitempty"`
// 商户上送UCI
Uci string `json:"uci,omitempty" xml:"uci,omitempty"`
// 面值,单位分
FacePrice string `json:"face_price,omitempty" xml:"face_price,omitempty"`
// 网关订单号
GatewayOrderNo string `json:"gateway_order_no,omitempty" xml:"gateway_order_no,omitempty"`
// 电子卡密码
CardPass string `json:"card_pass,omitempty" xml:"card_pass,omitempty"`
}
var poolAppleTopActivateNotifyDo = sync.Pool{
New: func() any {
return new(AppleTopActivateNotifyDo)
},
}
// GetAppleTopActivateNotifyDo() 从对象池中获取AppleTopActivateNotifyDo
func GetAppleTopActivateNotifyDo() *AppleTopActivateNotifyDo {
return poolAppleTopActivateNotifyDo.Get().(*AppleTopActivateNotifyDo)
}
// ReleaseAppleTopActivateNotifyDo 释放AppleTopActivateNotifyDo
func ReleaseAppleTopActivateNotifyDo(v *AppleTopActivateNotifyDo) {
v.CardNo = ""
v.GoodsId = ""
v.OrderNo = ""
v.Memo = ""
v.Uci = ""
v.FacePrice = ""
v.GatewayOrderNo = ""
v.CardPass = ""
poolAppleTopActivateNotifyDo.Put(v)
}