This commit is contained in:
aozhiwei 2020-11-12 19:09:00 +08:00
parent b9b0a4a199
commit 8804f1680e
2 changed files with 22 additions and 2 deletions

View File

@ -67,6 +67,9 @@ func (this* RiskMgr) OutputLog() {
f5.SysLog().Info("blockobj %s", this.GetBlockObj().ToJsonStr())
atomic.StoreInt64(&this.passTimes, 0)
atomic.StoreInt64(&this.blockTimes, 0)
atomic.StoreInt64(&this.passTimes, 0)
atomic.StoreInt64(&this.httpMethodBlockTimes, 0)
atomic.StoreInt64(&this.sessionErrBlockTimes, 0)
}
func (this* RiskMgr) GetSdkInfo(accessKeyId* string, accessSecret* string) {
@ -192,10 +195,17 @@ func (this *RiskMgr) __opsSyncConf(w* http.ResponseWriter, r *http.Request) {
}
func (this *RiskMgr) __opsInfo(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
}
respObj := q5.NewMxoObject()
respObj.SetXValue("errcode", q5.NewXInt32(0))
respObj.SetXValue("errmsg", q5.NewXString(""))
respObj.SetXObject("pass", this.GetPassObj())
respObj.SetXObject("block", this.GetBlockObj())
respObj.SetXObject("pass", gameConf.GetPassObj())
respObj.SetXObject("block", gameConf.GetBlockObj())
q5.Response(w, respObj.ToJsonStr())
}

View File

@ -228,3 +228,13 @@ func (this* GameConf) Dump() *q5.MutableXObject {
//fillRespObj(respObj, "fixed_block_province_city_list", &this.fixedBlockProvinceCityHash)
return respObj
}
func (this* GameConf) GetPassObj() *q5.XObject {
passObj := q5.NewMxoObject()
return passObj.AsXObject()
}
func (this* GameConf) GetBlockObj() *q5.XObject {
blockObj := q5.NewMxoObject()
return blockObj.AsXObject()
}