实现带宽计费套餐

This commit is contained in:
GoEdgeLab
2022-01-23 19:16:52 +08:00
parent 6054e65c88
commit 9f129a2795
26 changed files with 752 additions and 143 deletions

View File

@@ -1 +1,18 @@
package models
import "encoding/json"
func (this *NodeRegion) DecodePriceMap() map[int64]float64 {
var m = map[int64]float64{}
if len(this.Prices) == 0 {
return m
}
err := json.Unmarshal([]byte(this.Prices), &m)
if err != nil {
// 忽略错误
return m
}
return m
}