-
Notifications
You must be signed in to change notification settings - Fork 9
/
DailyPriceTo.go
67 lines (62 loc) · 2.08 KB
/
DailyPriceTo.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
package xhotelonlineorder
import (
"sync"
)
// DailyPriceTo 结构体
type DailyPriceTo struct {
// 币种名称
CurrencyCodeName string `json:"currency_code_name,omitempty" xml:"currency_code_name,omitempty"`
// 日期
Day string `json:"day,omitempty" xml:"day,omitempty"`
// 外币价格
ForeignCurrencyPrice int64 `json:"foreign_currency_price,omitempty" xml:"foreign_currency_price,omitempty"`
// 积分数
Point int64 `json:"point,omitempty" xml:"point,omitempty"`
// 淘里程数
Mileage int64 `json:"mileage,omitempty" xml:"mileage,omitempty"`
// 价格
Price int64 `json:"price,omitempty" xml:"price,omitempty"`
// 税费
TaxPrice int64 `json:"tax_price,omitempty" xml:"tax_price,omitempty"`
// 早餐数
BreakFastCount int64 `json:"break_fast_count,omitempty" xml:"break_fast_count,omitempty"`
// 优惠后金额
AfterPromotionPrice int64 `json:"after_promotion_price,omitempty" xml:"after_promotion_price,omitempty"`
// 基础金额
BasePrice int64 `json:"base_price,omitempty" xml:"base_price,omitempty"`
// 税费外币金额
TaxForeignPrice int64 `json:"tax_foreign_price,omitempty" xml:"tax_foreign_price,omitempty"`
// servicePrice
ServicePrice int64 `json:"service_price,omitempty" xml:"service_price,omitempty"`
// serviceForeignPrice
ServiceForeignPrice int64 `json:"service_foreign_price,omitempty" xml:"service_foreign_price,omitempty"`
// 外币底价
BaseForeignPrice int64 `json:"base_foreign_price,omitempty" xml:"base_foreign_price,omitempty"`
}
var poolDailyPriceTo = sync.Pool{
New: func() any {
return new(DailyPriceTo)
},
}
// GetDailyPriceTo() 从对象池中获取DailyPriceTo
func GetDailyPriceTo() *DailyPriceTo {
return poolDailyPriceTo.Get().(*DailyPriceTo)
}
// ReleaseDailyPriceTo 释放DailyPriceTo
func ReleaseDailyPriceTo(v *DailyPriceTo) {
v.CurrencyCodeName = ""
v.Day = ""
v.ForeignCurrencyPrice = 0
v.Point = 0
v.Mileage = 0
v.Price = 0
v.TaxPrice = 0
v.BreakFastCount = 0
v.AfterPromotionPrice = 0
v.BasePrice = 0
v.TaxForeignPrice = 0
v.ServicePrice = 0
v.ServiceForeignPrice = 0
v.BaseForeignPrice = 0
poolDailyPriceTo.Put(v)
}