Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
saturn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
alpha
saturn
Commits
478d9c81
Commit
478d9c81
authored
Mar 15, 2019
by
王浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add user api batch update user level fans
parent
95cbdda7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
urls.py
api/urls.py
+1
-0
user.py
api/views/user.py
+22
-0
No files found.
api/urls.py
View file @
478d9c81
...
...
@@ -21,4 +21,5 @@ urlpatterns = [
url
(
r'^v1/validate_3party_or_account$'
,
user
.
Validate3PartyOrAccount
.
as_view
(),
name
=
'validate_3party_or_account'
),
url
(
r'^v1/validate_3party_account$'
,
user
.
Validate3PartyAccount
.
as_view
(),
name
=
'validate_3party_account$'
),
url
(
r'^v1/user/batch_create_shadow_user$'
,
user
.
BatchCreateShadowUser
.
as_view
(),
name
=
'batch_create_shadow_user$'
),
url
(
r'^v1/user/batch_update_user_level_fans$'
,
user
.
BatchUpdateUserLevelFansNum
.
as_view
(),
name
=
'batch_update_user_level_fans$'
),
]
api/views/user.py
View file @
478d9c81
...
...
@@ -113,3 +113,25 @@ class Validate3PartyOrAccount(BaseView):
return
self
.
ok
(
data
=
{
"users"
:
data
,
})
class
BatchUpdateUserLevelFansNum
(
BaseView
):
"""批量更新用户星级 粉丝数"""
def
post
(
self
,
request
):
try
:
user_infos
=
json
.
loads
(
request
.
POST
.
get
(
"user_infos"
,
"[]"
))
except
:
update_data
=
[]
if
not
update_data
:
return
self
.
error
(
self
.
get_ErrorInfo
(
CODES
.
PARAMS_INCOMPLETE
))
err
,
ret
=
self
.
call_rpc
(
"venus/community/user/batch_update_user_leven_fans"
,
user_infos
=
user_infos
)
if
err
:
return
self
.
error
(
err
)
return
self
.
ok
()
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