fix: add role limit

This commit is contained in:
fallen-angle
2022-04-27 22:08:02 +08:00
parent fc347a4140
commit 22cb5ec61f
19 changed files with 274 additions and 77 deletions

View File

@@ -36,6 +36,7 @@ func GetAllCityData(sort string) []interface{} {
}
func GetCountryData(child bool) []interface{} {
checkCache()
if child {
return getEntireRedisList(rds_COUNTRY_LEVEL_CHILD_KEY)
}
@@ -43,6 +44,7 @@ func GetCountryData(child bool) []interface{} {
}
func GetChinaNCovStatistic() models.ChinaData {
checkCache()
data := models.ChinaData{}
json.Unmarshal([]byte(global.Redis.Get(rds_CHINA_ADD_KEY).Val()), &data.ChinaAdd)
json.Unmarshal([]byte(global.Redis.Get(rds_CHINA_TOTAL_KEY).Val()), &data.ChinaTotal)