-
Notifications
You must be signed in to change notification settings - Fork 9
/
TopStoreVo.go
55 lines (50 loc) · 1.67 KB
/
TopStoreVo.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 tuanhotel
import (
"sync"
)
// TopStoreVo 结构体
type TopStoreVo struct {
// 房型列表
RoomTypes []TopRoomTypeVo `json:"room_types,omitempty" xml:"room_types>top_room_type_vo,omitempty"`
// 联系电话列表
AppointPhones []TopAppointPhoneVo `json:"appoint_phones,omitempty" xml:"appoint_phones>top_appoint_phone_vo,omitempty"`
// 门店分账下的分账信息,数据格式(淘宝账户名称:比例或者金额:分账方式(1-按照比例的方式进行分账,2-按照固定金额的方式进行分账))
BillInfos string `json:"bill_infos,omitempty" xml:"bill_infos,omitempty"`
// 分账描述
BillDescs string `json:"bill_descs,omitempty" xml:"bill_descs,omitempty"`
// 核销账号
WriteOffAccounts string `json:"write_off_accounts,omitempty" xml:"write_off_accounts,omitempty"`
// 酒店名称
Name string `json:"name,omitempty" xml:"name,omitempty"`
// 物理酒店ID
Hid int64 `json:"hid,omitempty" xml:"hid,omitempty"`
// 城市
City int64 `json:"city,omitempty" xml:"city,omitempty"`
// 标准酒店ID
Shid int64 `json:"shid,omitempty" xml:"shid,omitempty"`
// 门店ID
StoreId int64 `json:"store_id,omitempty" xml:"store_id,omitempty"`
}
var poolTopStoreVo = sync.Pool{
New: func() any {
return new(TopStoreVo)
},
}
// GetTopStoreVo() 从对象池中获取TopStoreVo
func GetTopStoreVo() *TopStoreVo {
return poolTopStoreVo.Get().(*TopStoreVo)
}
// ReleaseTopStoreVo 释放TopStoreVo
func ReleaseTopStoreVo(v *TopStoreVo) {
v.RoomTypes = v.RoomTypes[:0]
v.AppointPhones = v.AppointPhones[:0]
v.BillInfos = ""
v.BillDescs = ""
v.WriteOffAccounts = ""
v.Name = ""
v.Hid = 0
v.City = 0
v.Shid = 0
v.StoreId = 0
poolTopStoreVo.Put(v)
}