fix some error

This commit is contained in:
pengtao 2019-07-15 17:03:30 +08:00
parent e151833f40
commit b51976defc

View File

@ -97,16 +97,18 @@ class DispatchHandler(tornado.web.RequestHandler):
def _selfGetAdList(self):
input = json.loads(self.get_query_argument('body'))
gameid = input['gameid']
localid = input['localid']
key = f"{gameid}::{localid}"
locationid = input['locationid']
key = f"{gameid}::{locationid}"
ids = my_redis.smembers(key)
info = []
pdb.set_trace()
try:
for id in ids:
keys=f"{id}::info"
temp = my_redis.hgetall(f"{id}::info")
info.append(temp)
result={'code':200,"message":{"totoal":len(info),"result":json.dumps(info)}}
result = {'errcode': 0, "errmsg": '', "message": {"totoal": len(info), "result": json.dumps(info)}}
except Exception as e:
result = {'errcode': 1, "errmsg": e}
finally:
self.write(result)