-
Notifications
You must be signed in to change notification settings - Fork 9
/
WaybillCloudPrintResponse.go
46 lines (41 loc) · 2.04 KB
/
WaybillCloudPrintResponse.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
package waybill
import (
"sync"
)
// WaybillCloudPrintResponse 结构体
type WaybillCloudPrintResponse struct {
// 请求id
ObjectId string `json:"object_id,omitempty" xml:"object_id,omitempty"`
// 云打印内容(encryptedData表示加密结果,data表示非加密结果);模板内容,具体解释见<a href="http://open.taobao.com/doc2/detail.htm?spm=a219a.7629140.0.0.8cf9Nj&treeId=17&articleId=105085&docType=1#12">链接</a>
PrintData string `json:"print_data,omitempty" xml:"print_data,omitempty"`
// 面单号, 子母件模式下为子面单号
WaybillCode string `json:"waybill_code,omitempty" xml:"waybill_code,omitempty"`
// 子母件中的母单号,当为子母件模式时,需要此单号为实际挂载物流详情的单号,需要使用此单号进行发货,查询物流详情,非子母件,此字段为空
ParentWaybillCode string `json:"parent_waybill_code,omitempty" xml:"parent_waybill_code,omitempty"`
// 拓展信息,特殊场景下使用
ExtraInfo string `json:"extra_info,omitempty" xml:"extra_info,omitempty"`
// cp_code,跟入参传入的cp_code保持一致
CpCode string `json:"cp_code,omitempty" xml:"cp_code,omitempty"`
// 真实取号的cp_code,在淘特官方物流等虚拟cp的场景中real_cp_code和入参中的cp_code不一样,其他场景二者一样
RealCpCode string `json:"real_cp_code,omitempty" xml:"real_cp_code,omitempty"`
}
var poolWaybillCloudPrintResponse = sync.Pool{
New: func() any {
return new(WaybillCloudPrintResponse)
},
}
// GetWaybillCloudPrintResponse() 从对象池中获取WaybillCloudPrintResponse
func GetWaybillCloudPrintResponse() *WaybillCloudPrintResponse {
return poolWaybillCloudPrintResponse.Get().(*WaybillCloudPrintResponse)
}
// ReleaseWaybillCloudPrintResponse 释放WaybillCloudPrintResponse
func ReleaseWaybillCloudPrintResponse(v *WaybillCloudPrintResponse) {
v.ObjectId = ""
v.PrintData = ""
v.WaybillCode = ""
v.ParentWaybillCode = ""
v.ExtraInfo = ""
v.CpCode = ""
v.RealCpCode = ""
poolWaybillCloudPrintResponse.Put(v)
}