1
This commit is contained in:
parent
81890d6374
commit
87e168be9d
@ -13,6 +13,11 @@ type RechargeCurrency struct {
|
||||
currencyDecimal int64
|
||||
}
|
||||
|
||||
type RechargeCurrencyTable struct {
|
||||
f5.CustomMetaTable
|
||||
netIdHash *q5.ConcurrentMap[int64, *RechargeCurrency]
|
||||
}
|
||||
|
||||
func (this *RechargeCurrency) init(currencyName string, exchangeRate int64, currencyDecimal int64) {
|
||||
this.currencyName = currencyName
|
||||
this.exchangeRate = exchangeRate
|
||||
@ -31,11 +36,7 @@ func (this *RechargeCurrency) GetCurrencyDecimal() int64 {
|
||||
return this.currencyDecimal
|
||||
}
|
||||
|
||||
type RechargeCurrencyTable struct {
|
||||
f5.CustomMetaTable
|
||||
}
|
||||
|
||||
func (this *RechargeCurrency) Init1() {
|
||||
func (this *RechargeCurrency) check() {
|
||||
if this.GetExchangeRate() <= 0 {
|
||||
panic("RechargeCurrency exchange_rate <= 0")
|
||||
return
|
||||
@ -59,6 +60,7 @@ func (this *RechargeCurrencyTable) Get(netId int32) *RechargeCurrency {
|
||||
}
|
||||
|
||||
func (this *RechargeCurrencyTable) Load() {
|
||||
this.netIdHash = new(q5.ConcurrentMap[int64, *RechargeCurrency])
|
||||
nets := []int64{}
|
||||
{
|
||||
if jsonStr, err := f5.ReadJsonFile("../config/nets.json"); err == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user