-
Notifications
You must be signed in to change notification settings - Fork 9
/
FastBuyPosCloseResult.go
37 lines (32 loc) · 1.03 KB
/
FastBuyPosCloseResult.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 trade
import (
"sync"
)
// FastBuyPosCloseResult 结构体
type FastBuyPosCloseResult struct {
// 错误码
ReturnCode string `json:"return_code,omitempty" xml:"return_code,omitempty"`
// 错误信息
ReturnMsg string `json:"return_msg,omitempty" xml:"return_msg,omitempty"`
// 关单结果状态: 1为成功,2为失败
ResultResult int64 `json:"result_result,omitempty" xml:"result_result,omitempty"`
// 接口调用是否成功
Success bool `json:"success,omitempty" xml:"success,omitempty"`
}
var poolFastBuyPosCloseResult = sync.Pool{
New: func() any {
return new(FastBuyPosCloseResult)
},
}
// GetFastBuyPosCloseResult() 从对象池中获取FastBuyPosCloseResult
func GetFastBuyPosCloseResult() *FastBuyPosCloseResult {
return poolFastBuyPosCloseResult.Get().(*FastBuyPosCloseResult)
}
// ReleaseFastBuyPosCloseResult 释放FastBuyPosCloseResult
func ReleaseFastBuyPosCloseResult(v *FastBuyPosCloseResult) {
v.ReturnCode = ""
v.ReturnMsg = ""
v.ResultResult = 0
v.Success = false
poolFastBuyPosCloseResult.Put(v)
}