-
Notifications
You must be signed in to change notification settings - Fork 12
/
AgentMultipleRefundRq.go
52 lines (47 loc) · 2.14 KB
/
AgentMultipleRefundRq.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
50
51
52
package bus
import (
"sync"
)
// AgentMultipleRefundRq 结构体
type AgentMultipleRefundRq struct {
// 退款明细数据
RefundTicketDetailList []AgentMultipleRefundTicketInfo `json:"refund_ticket_detail_list,omitempty" xml:"refund_ticket_detail_list>agent_multiple_refund_ticket_info,omitempty"`
// 商家订单号
AgentOrderId string `json:"agent_order_id,omitempty" xml:"agent_order_id,omitempty"`
// 退款原因必填
AgentRefundReason string `json:"agent_refund_reason,omitempty" xml:"agent_refund_reason,omitempty"`
// 退款流水号唯一标识,防止重复退款
AgentRefundTransNo string `json:"agent_refund_trans_no,omitempty" xml:"agent_refund_trans_no,omitempty"`
// 选择不可抗力场景后飞猪平台会发送停运短信给用户
RefundScene string `json:"refund_scene,omitempty" xml:"refund_scene,omitempty"`
// 通知用户停运原因
RefundSceneOfficialReasonCode string `json:"refund_scene_official_reason_code,omitempty" xml:"refund_scene_official_reason_code,omitempty"`
// 飞猪平台订单号
MainBizOrderId int64 `json:"main_biz_order_id,omitempty" xml:"main_biz_order_id,omitempty"`
// 退款总金额(票款+服务费)(分)
TotalRefundAmount int64 `json:"total_refund_amount,omitempty" xml:"total_refund_amount,omitempty"`
// 退服务费总金额(分)
TotalServiceChargeRefundAmount int64 `json:"total_service_charge_refund_amount,omitempty" xml:"total_service_charge_refund_amount,omitempty"`
}
var poolAgentMultipleRefundRq = sync.Pool{
New: func() any {
return new(AgentMultipleRefundRq)
},
}
// GetAgentMultipleRefundRq() 从对象池中获取AgentMultipleRefundRq
func GetAgentMultipleRefundRq() *AgentMultipleRefundRq {
return poolAgentMultipleRefundRq.Get().(*AgentMultipleRefundRq)
}
// ReleaseAgentMultipleRefundRq 释放AgentMultipleRefundRq
func ReleaseAgentMultipleRefundRq(v *AgentMultipleRefundRq) {
v.RefundTicketDetailList = v.RefundTicketDetailList[:0]
v.AgentOrderId = ""
v.AgentRefundReason = ""
v.AgentRefundTransNo = ""
v.RefundScene = ""
v.RefundSceneOfficialReasonCode = ""
v.MainBizOrderId = 0
v.TotalRefundAmount = 0
v.TotalServiceChargeRefundAmount = 0
poolAgentMultipleRefundRq.Put(v)
}