-
Notifications
You must be signed in to change notification settings - Fork 9
/
B2BRefundOrderRp.go
40 lines (35 loc) · 1014 Bytes
/
B2BRefundOrderRp.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 bus
import (
"sync"
)
// B2BRefundOrderRp 结构体
type B2BRefundOrderRp struct {
// results
Results []string `json:"results,omitempty" xml:"results>string,omitempty"`
// errorCode
ErrorCode string `json:"error_code,omitempty" xml:"error_code,omitempty"`
// errorMsg
ErrorMsg string `json:"error_msg,omitempty" xml:"error_msg,omitempty"`
// success
Success bool `json:"success,omitempty" xml:"success,omitempty"`
// success1
Success1 bool `json:"success1,omitempty" xml:"success1,omitempty"`
}
var poolB2BRefundOrderRp = sync.Pool{
New: func() any {
return new(B2BRefundOrderRp)
},
}
// GetB2BRefundOrderRp() 从对象池中获取B2BRefundOrderRp
func GetB2BRefundOrderRp() *B2BRefundOrderRp {
return poolB2BRefundOrderRp.Get().(*B2BRefundOrderRp)
}
// ReleaseB2BRefundOrderRp 释放B2BRefundOrderRp
func ReleaseB2BRefundOrderRp(v *B2BRefundOrderRp) {
v.Results = v.Results[:0]
v.ErrorCode = ""
v.ErrorMsg = ""
v.Success = false
v.Success1 = false
poolB2BRefundOrderRp.Put(v)
}