-
Notifications
You must be signed in to change notification settings - Fork 9
/
FulfilplatformResult.go
55 lines (50 loc) · 1.73 KB
/
FulfilplatformResult.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
53
54
55
package tmallservice
import (
"sync"
)
// FulfilplatformResult 结构体
type FulfilplatformResult struct {
// 服务单列表数据
ResultList []SpServiceOrderDto `json:"result_list,omitempty" xml:"result_list>sp_service_order_dto,omitempty"`
// 错误信息
MsgInfo string `json:"msg_info,omitempty" xml:"msg_info,omitempty"`
// 错误编码
MsgCode string `json:"msg_code,omitempty" xml:"msg_code,omitempty"`
// 展示信息
DisplayMsg string `json:"display_msg,omitempty" xml:"display_msg,omitempty"`
// 错误名称
ErrorName string `json:"error_name,omitempty" xml:"error_name,omitempty"`
// 错误类型
ErrorType string `json:"error_type,omitempty" xml:"error_type,omitempty"`
// 物流类型 消费者--> 商家 STAGE1;商家--->消费者 STAGE2
StageType string `json:"stage_type,omitempty" xml:"stage_type,omitempty"`
// 核销单id
ResultData int64 `json:"result_data,omitempty" xml:"result_data,omitempty"`
// 工单Id
WorkcardId int64 `json:"workcard_id,omitempty" xml:"workcard_id,omitempty"`
// 是否执行成功
Success bool `json:"success,omitempty" xml:"success,omitempty"`
}
var poolFulfilplatformResult = sync.Pool{
New: func() any {
return new(FulfilplatformResult)
},
}
// GetFulfilplatformResult() 从对象池中获取FulfilplatformResult
func GetFulfilplatformResult() *FulfilplatformResult {
return poolFulfilplatformResult.Get().(*FulfilplatformResult)
}
// ReleaseFulfilplatformResult 释放FulfilplatformResult
func ReleaseFulfilplatformResult(v *FulfilplatformResult) {
v.ResultList = v.ResultList[:0]
v.MsgInfo = ""
v.MsgCode = ""
v.DisplayMsg = ""
v.ErrorName = ""
v.ErrorType = ""
v.StageType = ""
v.ResultData = 0
v.WorkcardId = 0
v.Success = false
poolFulfilplatformResult.Put(v)
}