Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
46867e51
Commit
46867e51
authored
Jul 14, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
983e6b68
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
backend/controller/user_manager.py
backend/controller/user_manager.py
+4
-2
backend/view/user.py
backend/view/user.py
+2
-2
No files found.
backend/controller/user_manager.py
View file @
46867e51
...
@@ -120,8 +120,8 @@ class UserManager(object):
...
@@ -120,8 +120,8 @@ class UserManager(object):
查询多用户
查询多用户
'''
'''
# 当参数为空时,直接返回错误
# 当参数为空时,直接返回错误
if
not
data
or
len
(
data
)
<=
0
:
#
if not data or len(data) <= 0:
return
False
,
0
,
"parameters can not be null."
#
return False, 0, "parameters can not be null."
temp
=
copy
.
deepcopy
(
data
)
temp
=
copy
.
deepcopy
(
data
)
if
'pagenum'
in
temp
:
if
'pagenum'
in
temp
:
...
@@ -141,6 +141,8 @@ class UserManager(object):
...
@@ -141,6 +141,8 @@ class UserManager(object):
temp
.
append
(
t
)
temp
.
append
(
t
)
return
temp
,
len
(
temp
),
"get select {}."
.
format
(
"success"
if
temp
else
"no data"
)
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
))
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
()
count
=
User
.
select
()
.
where
(
**
temp
)
.
count
()
...
...
backend/view/user.py
View file @
46867e51
...
@@ -72,7 +72,7 @@ def get():
...
@@ -72,7 +72,7 @@ def get():
@
user_api
.
route
(
'/list'
,
methods
=
[
'POST'
])
@
user_api
.
route
(
'/list'
,
methods
=
[
'POST'
])
@
validate_schema
(
QuerySchema
)
@
validate_schema
(
QuerySchema
)
@
Auth
.
auth_required
#
@Auth.auth_required
def
getList
():
def
getList
():
'''
'''
查询用户列表
查询用户列表
...
@@ -90,7 +90,7 @@ def getList():
...
@@ -90,7 +90,7 @@ def getList():
@
user_api
.
route
(
'/update/<uuid:id>'
,
methods
=
[
'POST'
])
@
user_api
.
route
(
'/update/<uuid:id>'
,
methods
=
[
'POST'
])
@
validate_schema
(
UpdateSchema
)
@
validate_schema
(
UpdateSchema
)
@
Auth
.
auth_required
#
@Auth.auth_required
def
update
(
id
):
def
update
(
id
):
'''
'''
更新用户
更新用户
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment