Commit 1059b991 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

batch create topic tag is_own

See merge request alpha/saturn!26
parents d168e2bc 804e6d3d
......@@ -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$'),
]
......@@ -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:
......
......@@ -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)
......
......@@ -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账号体系中。"""
......
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