diff --git a/ad_interface_tornado.py b/ad_interface_tornado.py index 2814bb5..99dd235 100644 --- a/ad_interface_tornado.py +++ b/ad_interface_tornado.py @@ -151,15 +151,17 @@ class DispatchHandler(tornado.web.RequestHandler): try: input = json.loads(self.get_query_argument('body')) gameid = input['gameid'] - locationid = input['locationid'] + channelid=input['channelid'] + area=input.get('locationid',0) + locationid = input.get('locationid',0) except Exception as e: result = {'errcode': 2, "errmsg": f"get args failed,{str(e)}"} log.error(result) self.write_error(2) return False - if gameid and locationid: - key = f"ad::{gameid}::{locationid}" - + if gameid and channelid and locationid: + key = f"ad::{gameid}::{channelid}::*::{locationid}" + pdb.set_trace() ids = my_redis.smembers(key) info = [] if not ids: