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
1059b991
Commit
1059b991
authored
6 years ago
by
王浩
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'haow/dev' into 'test'
batch create topic tag is_own See merge request
!26
parents
d168e2bc
804e6d3d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
urls.py
api/urls.py
+1
-0
tag.py
api/views/tag.py
+0
-1
topic.py
api/views/topic.py
+1
-1
user.py
api/views/user.py
+18
-0
No files found.
api/urls.py
View file @
1059b991
...
...
@@ -20,4 +20,5 @@ urlpatterns = [
url
(
r'^v1/user/shadow/list$'
,
user
.
ShadowUserList
.
as_view
(),
name
=
'create_tag_for_batch'
),
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$'
),
]
This diff is collapsed.
Click to expand it.
api/views/tag.py
View file @
1059b991
...
...
@@ -22,7 +22,6 @@ class CreateTagForBatch(BaseView):
tags
.
append
(
tag
)
else
:
tags
=
tag_list
error
,
data
=
self
.
call_rpc
(
'venus/community/tag/batch_create_not_classify'
,
data
=
tags
)
if
error
:
...
...
This diff is collapsed.
Click to expand it.
api/views/topic.py
View file @
1059b991
...
...
@@ -83,7 +83,7 @@ class CreateTopicForBatch(BaseView):
# 先创建标签
_tag_error
,
_tag_data
=
self
.
call_rpc
(
"venus/community/tag/batch_create_tag_by_name"
,
tag_names
=
tags
tag_names
=
tags
,
is_own
=
1
)
if
_tag_error
:
return
self
.
error
(
_tag_error
)
...
...
This diff is collapsed.
Click to expand it.
api/views/user.py
View file @
1059b991
...
...
@@ -64,6 +64,24 @@ class Validate3PartyAccount(BaseView):
return
self
.
ok
(
data
=
data
)
class
BatchCreateShadowUser
(
BaseView
):
"""
批量创建马甲用户
"""
def
post
(
self
,
request
):
request_data
=
json
.
loads
(
request
.
POST
.
get
(
'ins_data'
,
'[]'
))
print
(
request_data
)
err
,
_data
=
self
.
call_rpc
(
"venus/community/user/batch_create_shadow_user"
,
data
=
request_data
)
if
err
:
return
self
.
error
(
err
)
return
self
.
ok
(
data
=
_data
)
class
Validate3PartyOrAccount
(
BaseView
):
"""判断用户是否在三方账号或者alpha账号体系中。"""
...
...
This diff is collapsed.
Click to expand it.
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