fix some error
This commit is contained in:
parent
5bb7120829
commit
d6771da497
@ -22,6 +22,8 @@ http://192.168.100.20:8888/company
|
||||
|
||||
##### 请求示范
|
||||
|
||||
http://154.8.214.202:5015/company
|
||||
|
||||
http://192.168.100.20:8888/company?status=0
|
||||
|
||||
##### 请求参数说明
|
||||
|
@ -133,8 +133,12 @@ class DispatchHandler(tornado.web.RequestHandler):
|
||||
|
||||
if gameid and locationid:
|
||||
key = f"{gameid}::{locationid}"
|
||||
|
||||
ids = my_redis.smembers(key)
|
||||
info = []
|
||||
if not ids:
|
||||
result = {'errcode': 0, "errmsg": '', "message": {"totoal": len(info), "result": info}}
|
||||
else:
|
||||
try:
|
||||
for id in ids:
|
||||
temp = my_redis.hgetall(f"{id}::info")
|
||||
@ -142,7 +146,6 @@ class DispatchHandler(tornado.web.RequestHandler):
|
||||
result = {'errcode': 0, "errmsg": '', "message": {"totoal": len(info), "result": info}}
|
||||
except Exception as e:
|
||||
result = {'errcode': 1, "errmsg": e}
|
||||
finally:
|
||||
self.write(result)
|
||||
else:
|
||||
result = {'errcode': 2, "errmsg": f"get args failed!"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user