From a6c476da09fbcdc9f6c114144b9c9347d88f386a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 13 Nov 2020 13:35:36 +0800 Subject: [PATCH] 1 --- server/analyseapi/riskmgr.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/analyseapi/riskmgr.go b/server/analyseapi/riskmgr.go index b4cbd59..3e48060 100644 --- a/server/analyseapi/riskmgr.go +++ b/server/analyseapi/riskmgr.go @@ -128,7 +128,11 @@ func (this *RiskMgr) ForceGameConf(gameId int32, channel int32) *GameConf { if val, ok := this.gameHash[q5.MkInt64(gameId, channel)]; ok { return val } else { - return nil + gameConf := new(GameConf) + gameConf.gameId = gameId + gameConf.channel = channel + this.gameHash[q5.MkInt64(gameId, channel)] = gameConf + return gameConf } } @@ -213,6 +217,13 @@ func (this *RiskMgr) __opsDump(w* http.ResponseWriter, r *http.Request) { } func (this *RiskMgr) __opsSyncConf(w* http.ResponseWriter, r *http.Request) { + gameId := q5.Request(r, "gameid").GetInt32() + channel := q5.Request(r, "channel").GetInt32() + gameConf := this.GetGameConf(gameId, channel) + if gameConf == nil { + q5.ResponseErr(w, 1, "数据不存在") + return + } q5.ResponseOk(w) }