-
Notifications
You must be signed in to change notification settings - Fork 9
/
PoiInfoDto.go
109 lines (104 loc) · 3.15 KB
/
PoiInfoDto.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
package store
import (
"sync"
)
// PoiInfoDto 结构体
type PoiInfoDto struct {
// 地址
Address string `json:"address,omitempty" xml:"address,omitempty"`
// 地址别名
AddressAlias string `json:"address_alias,omitempty" xml:"address_alias,omitempty"`
// 英文地址
AddressEn string `json:"address_en,omitempty" xml:"address_en,omitempty"`
// 当地语言地址
AddressLocal string `json:"address_local,omitempty" xml:"address_local,omitempty"`
// 铺位号
Bunk string `json:"bunk,omitempty" xml:"bunk,omitempty"`
// 营业面积
BusinessArea string `json:"business_area,omitempty" xml:"business_area,omitempty"`
// 市名
CityName string `json:"city_name,omitempty" xml:"city_name,omitempty"`
// 洲名
ContinentName string `json:"continent_name,omitempty" xml:"continent_name,omitempty"`
// 国家名
CountryName string `json:"country_name,omitempty" xml:"country_name,omitempty"`
// 区域名
DistrictName string `json:"district_name,omitempty" xml:"district_name,omitempty"`
// 楼层
Floor string `json:"floor,omitempty" xml:"floor,omitempty"`
// 楼层名
FullAddress string `json:"full_address,omitempty" xml:"full_address,omitempty"`
// 邮政编码
PostCode string `json:"post_code,omitempty" xml:"post_code,omitempty"`
// 经度
Posx string `json:"posx,omitempty" xml:"posx,omitempty"`
// 纬度
Posy string `json:"posy,omitempty" xml:"posy,omitempty"`
// 省名
ProvName string `json:"prov_name,omitempty" xml:"prov_name,omitempty"`
// 街道名
TownName string `json:"town_name,omitempty" xml:"town_name,omitempty"`
// 市
City int64 `json:"city,omitempty" xml:"city,omitempty"`
// 省
CityInt int64 `json:"city_int,omitempty" xml:"city_int,omitempty"`
// 洲
Continent int64 `json:"continent,omitempty" xml:"continent,omitempty"`
// 国家
Country int64 `json:"country,omitempty" xml:"country,omitempty"`
// 区域
District int64 `json:"district,omitempty" xml:"district,omitempty"`
// 区域
DistrictInt int64 `json:"district_int,omitempty" xml:"district_int,omitempty"`
// 行政区code类型
DivisionType int64 `json:"division_type,omitempty" xml:"division_type,omitempty"`
// 省
Prov int64 `json:"prov,omitempty" xml:"prov,omitempty"`
// 省
ProvInt int64 `json:"prov_int,omitempty" xml:"prov_int,omitempty"`
// 街道
Town int64 `json:"town,omitempty" xml:"town,omitempty"`
// 街道
TownInt int64 `json:"town_int,omitempty" xml:"town_int,omitempty"`
}
var poolPoiInfoDto = sync.Pool{
New: func() any {
return new(PoiInfoDto)
},
}
// GetPoiInfoDto() 从对象池中获取PoiInfoDto
func GetPoiInfoDto() *PoiInfoDto {
return poolPoiInfoDto.Get().(*PoiInfoDto)
}
// ReleasePoiInfoDto 释放PoiInfoDto
func ReleasePoiInfoDto(v *PoiInfoDto) {
v.Address = ""
v.AddressAlias = ""
v.AddressEn = ""
v.AddressLocal = ""
v.Bunk = ""
v.BusinessArea = ""
v.CityName = ""
v.ContinentName = ""
v.CountryName = ""
v.DistrictName = ""
v.Floor = ""
v.FullAddress = ""
v.PostCode = ""
v.Posx = ""
v.Posy = ""
v.ProvName = ""
v.TownName = ""
v.City = 0
v.CityInt = 0
v.Continent = 0
v.Country = 0
v.District = 0
v.DistrictInt = 0
v.DivisionType = 0
v.Prov = 0
v.ProvInt = 0
v.Town = 0
v.TownInt = 0
poolPoiInfoDto.Put(v)
}