Commit 478d9c81 authored by 王浩's avatar 王浩

add user api batch update user level fans

parent 95cbdda7
......@@ -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$'),
]
......@@ -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()
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