-
Notifications
You must be signed in to change notification settings - Fork 9
/
ResultData.go
163 lines (158 loc) · 6.22 KB
/
ResultData.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
package tmallservice
import (
"sync"
)
// ResultData 结构体
type ResultData struct {
// 数据
OnePagedDataList []OnePagedDataList `json:"one_paged_data_list,omitempty" xml:"one_paged_data_list>one_paged_data_list,omitempty"`
// 服务产品sku列表
SimpleServiceSkuList []SimpleServiceSkuDtOs `json:"simple_service_sku_list,omitempty" xml:"simple_service_sku_list>simple_service_sku_dt_os,omitempty"`
// 街道地址编码
TownCode string `json:"town_code,omitempty" xml:"town_code,omitempty"`
// 网点名称
ServiceStoreName string `json:"service_store_name,omitempty" xml:"service_store_name,omitempty"`
// 网点负责人姓名
ManagerName string `json:"manager_name,omitempty" xml:"manager_name,omitempty"`
// 门店类型
Type string `json:"type,omitempty" xml:"type,omitempty"`
// 品牌认证资料
BrandCertification string `json:"brand_certification,omitempty" xml:"brand_certification,omitempty"`
// 网点详细地址
AddressDetail string `json:"address_detail,omitempty" xml:"address_detail,omitempty"`
// 别名
ServiceStoreAlias string `json:"service_store_alias,omitempty" xml:"service_store_alias,omitempty"`
// 网点所在市
AddressCity string `json:"address_city,omitempty" xml:"address_city,omitempty"`
// 经度
Longitude string `json:"longitude,omitempty" xml:"longitude,omitempty"`
// 营业执照照片
LicensePhoto string `json:"license_photo,omitempty" xml:"license_photo,omitempty"`
// 服务场所编码
ServiceSiteCode string `json:"service_site_code,omitempty" xml:"service_site_code,omitempty"`
// 网点所在区
AddressDistrict string `json:"address_district,omitempty" xml:"address_district,omitempty"`
// 网点所在省
AddressProvince string `json:"address_province,omitempty" xml:"address_province,omitempty"`
// 区地址编码
DistrictCode string `json:"district_code,omitempty" xml:"district_code,omitempty"`
// 业务类型
BizType string `json:"biz_type,omitempty" xml:"biz_type,omitempty"`
// 有效期
GmtExpire string `json:"gmt_expire,omitempty" xml:"gmt_expire,omitempty"`
// 城市地址编码
CityCode string `json:"city_code,omitempty" xml:"city_code,omitempty"`
// 纬度
Latitude string `json:"latitude,omitempty" xml:"latitude,omitempty"`
// 网点所在街道
AddressTown string `json:"address_town,omitempty" xml:"address_town,omitempty"`
// 门头照片
FrontPhoto string `json:"front_photo,omitempty" xml:"front_photo,omitempty"`
// 认证的天猫品牌id列表
CertificatedBrandIds string `json:"certificated_brand_ids,omitempty" xml:"certificated_brand_ids,omitempty"`
// 省地址编码
ProvinceCode string `json:"province_code,omitempty" xml:"province_code,omitempty"`
// 营业时间
BusinessHours string `json:"business_hours,omitempty" xml:"business_hours,omitempty"`
// 商户中心门店id
PlaceStoreId string `json:"place_store_id,omitempty" xml:"place_store_id,omitempty"`
// 网点编码
ServiceStoreCode string `json:"service_store_code,omitempty" xml:"service_store_code,omitempty"`
// 对外服务手机号
ServiceMobile string `json:"service_mobile,omitempty" xml:"service_mobile,omitempty"`
// 额外属性
Attributes string `json:"attributes,omitempty" xml:"attributes,omitempty"`
// 公司名称
CompanyName string `json:"company_name,omitempty" xml:"company_name,omitempty"`
// 统一社会信用代码
SocialCreditCode string `json:"social_credit_code,omitempty" xml:"social_credit_code,omitempty"`
// 创建时间
CreateTime string `json:"create_time,omitempty" xml:"create_time,omitempty"`
// 服务产品title
Title string `json:"title,omitempty" xml:"title,omitempty"`
// 服务产品介绍
ServiceProductContent string `json:"service_product_content,omitempty" xml:"service_product_content,omitempty"`
// 服务名称
ServiceCode string `json:"service_code,omitempty" xml:"service_code,omitempty"`
// 错误码
FailureCode string `json:"failure_code,omitempty" xml:"failure_code,omitempty"`
// 出错因子列表
FailurePriceFactors string `json:"failure_price_factors,omitempty" xml:"failure_price_factors,omitempty"`
// 错误详情
FailureDetail string `json:"failure_detail,omitempty" xml:"failure_detail,omitempty"`
// 页面大小
PageSize int64 `json:"page_size,omitempty" xml:"page_size,omitempty"`
// 总数量
TotalCount int64 `json:"total_count,omitempty" xml:"total_count,omitempty"`
// 状态
Status int64 `json:"status,omitempty" xml:"status,omitempty"`
// 网点地址编码
AddressCode int64 `json:"address_code,omitempty" xml:"address_code,omitempty"`
// 服务产品id
ServiceProductId int64 `json:"service_product_id,omitempty" xml:"service_product_id,omitempty"`
// 服务产品状态
ServiceProductStatus int64 `json:"service_product_status,omitempty" xml:"service_product_status,omitempty"`
// 服务产品类型
ServiceProductType int64 `json:"service_product_type,omitempty" xml:"service_product_type,omitempty"`
// 上传结果是否成功
Success bool `json:"success,omitempty" xml:"success,omitempty"`
}
var poolResultData = sync.Pool{
New: func() any {
return new(ResultData)
},
}
// GetResultData() 从对象池中获取ResultData
func GetResultData() *ResultData {
return poolResultData.Get().(*ResultData)
}
// ReleaseResultData 释放ResultData
func ReleaseResultData(v *ResultData) {
v.OnePagedDataList = v.OnePagedDataList[:0]
v.SimpleServiceSkuList = v.SimpleServiceSkuList[:0]
v.TownCode = ""
v.ServiceStoreName = ""
v.ManagerName = ""
v.Type = ""
v.BrandCertification = ""
v.AddressDetail = ""
v.ServiceStoreAlias = ""
v.AddressCity = ""
v.Longitude = ""
v.LicensePhoto = ""
v.ServiceSiteCode = ""
v.AddressDistrict = ""
v.AddressProvince = ""
v.DistrictCode = ""
v.BizType = ""
v.GmtExpire = ""
v.CityCode = ""
v.Latitude = ""
v.AddressTown = ""
v.FrontPhoto = ""
v.CertificatedBrandIds = ""
v.ProvinceCode = ""
v.BusinessHours = ""
v.PlaceStoreId = ""
v.ServiceStoreCode = ""
v.ServiceMobile = ""
v.Attributes = ""
v.CompanyName = ""
v.SocialCreditCode = ""
v.CreateTime = ""
v.Title = ""
v.ServiceProductContent = ""
v.ServiceCode = ""
v.FailureCode = ""
v.FailurePriceFactors = ""
v.FailureDetail = ""
v.PageSize = 0
v.TotalCount = 0
v.Status = 0
v.AddressCode = 0
v.ServiceProductId = 0
v.ServiceProductStatus = 0
v.ServiceProductType = 0
v.Success = false
poolResultData.Put(v)
}