Commit a4aa22c8 authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

Haow/dev

See merge request !314
parents 64453113 26f071ba
...@@ -86,7 +86,7 @@ class ReplyManageListView(APIView): ...@@ -86,7 +86,7 @@ class ReplyManageListView(APIView):
def get(self, request): def get(self, request):
page = int(request.GET.get('page', 1)) page = int(request.GET.get('page', 1))
limit = int(request.GET.get('limit', 10)) limit = int(request.GET.get('limit', 10))
id_ = request.GET.get('id', None) topic_id = request.GET.get('topic_id', None)
content = request.GET.get('content', None) content = request.GET.get('content', None)
topic_content = request.GET.get('topic_content', None) topic_content = request.GET.get('topic_content', None)
user_name = request.GET.get('user_name', None) user_name = request.GET.get('user_name', None)
...@@ -102,7 +102,7 @@ class ReplyManageListView(APIView): ...@@ -102,7 +102,7 @@ class ReplyManageListView(APIView):
other_filters = {} other_filters = {}
if topic_content: if topic_content:
other_filters['topic_content'] = topic_content other_filters['topic_content'] = topic_content.strip()
if reply_user_type: if reply_user_type:
reply_user_type = int(reply_user_type) reply_user_type = int(reply_user_type)
if reply_user_type in [USER_EXTRA_TYPE.REAL, USER_EXTRA_TYPE.SHADOW, USER_EXTRA_TYPE.KOL]: if reply_user_type in [USER_EXTRA_TYPE.REAL, USER_EXTRA_TYPE.SHADOW, USER_EXTRA_TYPE.KOL]:
...@@ -117,10 +117,10 @@ class ReplyManageListView(APIView): ...@@ -117,10 +117,10 @@ class ReplyManageListView(APIView):
if user_name: if user_name:
other_filters['user_name'] = user_name other_filters['user_name'] = user_name
filters = {} filters = {}
if id_: if topic_id:
filters['id'] = int(id_) filters['topic_id'] = int(topic_id)
if content: if content:
filters['content__contains'] = content filters['content__contains'] = content.strip()
if belong_type: if belong_type:
if belong_type in REPLY_BELONG_TYPE: if belong_type in REPLY_BELONG_TYPE:
filters['belong_type'] = belong_type filters['belong_type'] = belong_type
......
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