-
Notifications
You must be signed in to change notification settings - Fork 9
/
ExpandCardInfo.go
37 lines (32 loc) · 1015 Bytes
/
ExpandCardInfo.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
package tbtrade
import (
"sync"
)
// ExpandCardInfo 结构体
type ExpandCardInfo struct {
// 买卡订单本金
BasicPrice string `json:"basic_price,omitempty" xml:"basic_price,omitempty"`
// 买卡订单权益金
ExpandPrice string `json:"expand_price,omitempty" xml:"expand_price,omitempty"`
// 用卡订单使用的本金
BasicPriceUsed string `json:"basic_price_used,omitempty" xml:"basic_price_used,omitempty"`
// 用卡订单使用的权益金
ExpandPriceUsed string `json:"expand_price_used,omitempty" xml:"expand_price_used,omitempty"`
}
var poolExpandCardInfo = sync.Pool{
New: func() any {
return new(ExpandCardInfo)
},
}
// GetExpandCardInfo() 从对象池中获取ExpandCardInfo
func GetExpandCardInfo() *ExpandCardInfo {
return poolExpandCardInfo.Get().(*ExpandCardInfo)
}
// ReleaseExpandCardInfo 释放ExpandCardInfo
func ReleaseExpandCardInfo(v *ExpandCardInfo) {
v.BasicPrice = ""
v.ExpandPrice = ""
v.BasicPriceUsed = ""
v.ExpandPriceUsed = ""
poolExpandCardInfo.Put(v)
}