-
Notifications
You must be signed in to change notification settings - Fork 9
/
ApAddressInfo.go
73 lines (68 loc) · 2.08 KB
/
ApAddressInfo.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
package newretail
import (
"sync"
)
// ApAddressInfo 结构体
type ApAddressInfo struct {
// ap mac
Mac string `json:"mac,omitempty" xml:"mac,omitempty"`
// ap的名称
ApName string `json:"ap_name,omitempty" xml:"ap_name,omitempty"`
// ap所在组名
ApGroup string `json:"ap_group,omitempty" xml:"ap_group,omitempty"`
// 国家
ApNationName string `json:"ap_nation_name,omitempty" xml:"ap_nation_name,omitempty"`
// 省份
ApProvinceName string `json:"ap_province_name,omitempty" xml:"ap_province_name,omitempty"`
// 城市
ApCityName string `json:"ap_city_name,omitempty" xml:"ap_city_name,omitempty"`
// 区域
ApAreaName string `json:"ap_area_name,omitempty" xml:"ap_area_name,omitempty"`
// 园区/门店
ApCampusName string `json:"ap_campus_name,omitempty" xml:"ap_campus_name,omitempty"`
// 楼栋
ApBuildingName string `json:"ap_building_name,omitempty" xml:"ap_building_name,omitempty"`
// 楼层
ApFloor string `json:"ap_floor,omitempty" xml:"ap_floor,omitempty"`
// 空间单元名称
ApUnitName string `json:"ap_unit_name,omitempty" xml:"ap_unit_name,omitempty"`
// 方位
Direction string `json:"direction,omitempty" xml:"direction,omitempty"`
// 经度
Lng string `json:"lng,omitempty" xml:"lng,omitempty"`
// 纬度
Lat string `json:"lat,omitempty" xml:"lat,omitempty"`
// 语言
Language string `json:"language,omitempty" xml:"language,omitempty"`
// 空间单元id
ApUnitId int64 `json:"ap_unit_id,omitempty" xml:"ap_unit_id,omitempty"`
}
var poolApAddressInfo = sync.Pool{
New: func() any {
return new(ApAddressInfo)
},
}
// GetApAddressInfo() 从对象池中获取ApAddressInfo
func GetApAddressInfo() *ApAddressInfo {
return poolApAddressInfo.Get().(*ApAddressInfo)
}
// ReleaseApAddressInfo 释放ApAddressInfo
func ReleaseApAddressInfo(v *ApAddressInfo) {
v.Mac = ""
v.ApName = ""
v.ApGroup = ""
v.ApNationName = ""
v.ApProvinceName = ""
v.ApCityName = ""
v.ApAreaName = ""
v.ApCampusName = ""
v.ApBuildingName = ""
v.ApFloor = ""
v.ApUnitName = ""
v.Direction = ""
v.Lng = ""
v.Lat = ""
v.Language = ""
v.ApUnitId = 0
poolApAddressInfo.Put(v)
}