From 175c94fbc98cbd1ead44be3b67d41f42b02a35e1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 7 Jan 2021 11:37:43 +0800 Subject: [PATCH] 1 --- server/analyseapi/metamgr.go | 2 +- server/analyseapi/riskmgr.go | 14 +++++++------- server/analyseapi/types.go | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/server/analyseapi/metamgr.go b/server/analyseapi/metamgr.go index a5a42e5..b11579c 100644 --- a/server/analyseapi/metamgr.go +++ b/server/analyseapi/metamgr.go @@ -131,7 +131,7 @@ func (this *MetaMgr) GetLaunchBlackList() *MtwLaunchBlackList { } } -func (this *MetaMgr) GetFixedBlockProvinceCity() *MtwBlockProvinceCity { +func (this *MetaMgr) GetFixedBlockRegion() *MtwBlockProvinceCity { v, ok := this.MetaMgr.GetMetaById(MT_BLOCK_PROVINCE_CITY, 1).(*MtwBlockProvinceCity) if ok { return v diff --git a/server/analyseapi/riskmgr.go b/server/analyseapi/riskmgr.go index 66ae88b..ba0b631 100644 --- a/server/analyseapi/riskmgr.go +++ b/server/analyseapi/riskmgr.go @@ -9,8 +9,8 @@ import ( ) type RiskMgr struct { - fixedBlockProvinceCityHash map[string]int32 - fixedBlockProvinceCityHashMutex sync.RWMutex + fixedBlockRegionHash map[string]int32 + fixedBlockRegionHashMutex sync.RWMutex accessKeyId string accessSecret string @@ -33,15 +33,15 @@ type RiskMgr struct { } func (this* RiskMgr) Init() *RiskMgr { - this.fixedBlockProvinceCityHashMutex.Lock() + this.fixedBlockRegionHashMutex.Lock() this.gameHashMutex.Lock() - defer this.fixedBlockProvinceCityHashMutex.Unlock() + defer this.fixedBlockRegionHashMutex.Unlock() defer this.gameHashMutex.Unlock() - this.fixedBlockProvinceCityHash = make(map[string]int32) + this.fixedBlockRegionHash = make(map[string]int32) this.gameHash = make(map[int64]*GameConf) - for _, val := range G.MetaMgr.GetFixedBlockProvinceCity().GetList() { - this.fixedBlockProvinceCityHash[val] = 1 + for _, val := range G.MetaMgr.GetFixedBlockRegion().GetList() { + this.fixedBlockRegionHash[val] = 1 } this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyid() diff --git a/server/analyseapi/types.go b/server/analyseapi/types.go index 2edf9a8..678b400 100644 --- a/server/analyseapi/types.go +++ b/server/analyseapi/types.go @@ -151,7 +151,7 @@ func (this* GameConf) Init() { for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() { this.launchBlackList[val] = 1 } - for _, val := range G.MetaMgr.GetFixedBlockProvinceCity().GetList() { + for _, val := range G.MetaMgr.GetFixedBlockRegion().GetList() { this.blockProvinceCityHash[val] = 1 } this.lastActiveTime = f5.App.NowUnix()