Commit 46867e51 authored by wanli's avatar wanli

update

parent 983e6b68
......@@ -120,8 +120,8 @@ class UserManager(object):
查询多用户
'''
# 当参数为空时,直接返回错误
if not data or len(data) <= 0:
return False, 0, "parameters can not be null."
# if not data or len(data) <= 0:
# return False, 0, "parameters can not be null."
temp = copy.deepcopy(data)
if 'pagenum' in temp:
......@@ -141,6 +141,8 @@ class UserManager(object):
temp.append(t)
return temp, len(temp), "get select {}.".format("success" if temp else "no data")
logger.info(temp)
result = User.select().where(**temp).order_by(desc(User.create_at)).page(data.get("pagenum", 1), data.get("pagesize", 10))
count = User.select().where(**temp).count()
......
......@@ -72,7 +72,7 @@ def get():
@user_api.route('/list', methods=['POST'])
@validate_schema(QuerySchema)
@Auth.auth_required
# @Auth.auth_required
def getList():
'''
查询用户列表
......@@ -90,7 +90,7 @@ def getList():
@user_api.route('/update/<uuid:id>', methods=['POST'])
@validate_schema(UpdateSchema)
@Auth.auth_required
# @Auth.auth_required
def update(id):
'''
更新用户
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment