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) }