Commit c92473ce authored by yangchenglin's avatar yangchenglin

fix

parent 4b0f5061
......@@ -99,44 +99,29 @@ class ReplyManageListView(APIView):
to_create_time = request.GET.get('to_create_time', None)
from_topic_create_time = request.GET.get('from_topic_create_time', None)
to_topic_create_time = request.GET.get('to_topic_create_time', None)
user_kol = request.GET.get('user_kol', None)
user_shadow = request.GET.get('user_shadow', None)
user_edit = request.GET.get('user_edit', None)
replied_user_kol = request.GET.get('replied_user_kol', None)
replied_user_shadow = request.GET.get('replied_user_shadow', None)
replied_user_edit = request.GET.get('replied_user_edit', None)
other_filters = {}
filters = {}
if topic_content:
other_filters['topic_content'] = topic_content.strip()
filters['topic_content'] = topic_content.strip()
if reply_user_type:
reply_user_type = int(reply_user_type)
if reply_user_type is not None:
other_filters['reply_user_type'] = reply_user_type
filters['reply_user_type'] = reply_user_type
if replied_user_type:
replied_user_type = int(replied_user_type)
if replied_user_type is not None:
other_filters['replied_user_type'] = replied_user_type
filters['replied_user_type'] = replied_user_type
if from_topic_create_time and to_topic_create_time:
other_filters['topic_create_time__gte'] = from_topic_create_time
other_filters['topic_create_time__lte'] = to_topic_create_time
filters['topic_create_time__gte'] = from_topic_create_time
filters['topic_create_time__lte'] = to_topic_create_time
if user_name:
other_filters['user_name'] = user_name
filters = {}
filters['user_name'] = user_name
if topic_id:
filters['topic_id'] = int(topic_id)
if content:
filters['content__contains'] = content.strip()
if belong_type:
if belong_type in REPLY_BELONG_TYPE:
filters['belong_type'] = belong_type
if reply_level:
reply_level = int(reply_level)
if reply_level == 1:
filters['top_id__lte'] = 0
if reply_level == 2:
filters['top_id__gt'] = 0
if is_online:
is_online = int(is_online)
filters['is_online'] = is_online
......@@ -144,23 +129,11 @@ class ReplyManageListView(APIView):
filters['create_time__gte'] = from_create_time
filters['create_time__lte'] = to_create_time
if user_kol is not None:
filters['user_kol'] = int(user_kol)
if user_shadow is not None:
filters['user_shadow'] = int(user_shadow)
if user_edit is not None:
filters['user_edit'] = int(user_edit)
if replied_user_edit is not None:
filters['replied_user_edit'] = int(replied_user_edit)
if replied_user_kol is not None:
filters['replied_user_kol'] = int(replied_user_kol)
if replied_user_shadow is not None:
filters['replied_user_shadow'] = int(replied_user_shadow)
other_filters = {}
if content:
other_filters['content__contains'] = content.strip()
if reply_level:
other_filters['reply_level'] = reply_level
try:
data = self.rpc['venus/sun/reply/manage/list'](offset=(page-1) * limit, limit=limit, filters=filters, other_filters=other_filters).unwrap()
......
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