-
Notifications
You must be signed in to change notification settings - Fork 9
/
ModifyDeliveryRequest.go
43 lines (38 loc) · 1.58 KB
/
ModifyDeliveryRequest.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
package mtopopen
import (
"sync"
)
// ModifyDeliveryRequest 结构体
type ModifyDeliveryRequest struct {
// 订单ID
OrderCode string `json:"order_code,omitempty" xml:"order_code,omitempty"`
// 快递公司标准编码
CpCode string `json:"cp_code,omitempty" xml:"cp_code,omitempty"`
// 快递单号
MailNo string `json:"mail_no,omitempty" xml:"mail_no,omitempty"`
// 收货方式对应的参数,送货上门:{"day":"2023-03-22","times":"10:00-13:00"} 派送到指定地点:{"point":"物业"} 找人代收:{"fullName":"xxxx","mobile":"xxxxxx"}
ExtendParam string `json:"extend_param,omitempty" xml:"extend_param,omitempty"`
// 修改渠道-淘宝小程序:taoBao,非淘宝:others
Channel string `json:"channel,omitempty" xml:"channel,omitempty"`
// 收货方式「送货上门:0,快递柜/代收点:1,指定地点:2,找人代收:3,其他:-1」
ReceiveType int64 `json:"receive_type,omitempty" xml:"receive_type,omitempty"`
}
var poolModifyDeliveryRequest = sync.Pool{
New: func() any {
return new(ModifyDeliveryRequest)
},
}
// GetModifyDeliveryRequest() 从对象池中获取ModifyDeliveryRequest
func GetModifyDeliveryRequest() *ModifyDeliveryRequest {
return poolModifyDeliveryRequest.Get().(*ModifyDeliveryRequest)
}
// ReleaseModifyDeliveryRequest 释放ModifyDeliveryRequest
func ReleaseModifyDeliveryRequest(v *ModifyDeliveryRequest) {
v.OrderCode = ""
v.CpCode = ""
v.MailNo = ""
v.ExtendParam = ""
v.Channel = ""
v.ReceiveType = 0
poolModifyDeliveryRequest.Put(v)
}