Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
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
0
Merge Requests
0
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
谢林臻
sun
Commits
70bb8755
Commit
70bb8755
authored
Sep 29, 2019
by
杨成林
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ycl/fix_master' into 'test'
Ycl/fix master See merge request
alpha/sun!369
parents
02c0a9c4
3fcc757b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
41 deletions
+12
-41
reply.py
api/reply.py
+12
-41
No files found.
api/reply.py
View file @
70bb8755
...
...
@@ -91,7 +91,7 @@ class ReplyManageListView(APIView):
topic_content
=
request
.
GET
.
get
(
'topic_content'
,
None
)
user_name
=
request
.
GET
.
get
(
'user_name'
,
None
)
belong_type
=
request
.
GET
.
get
(
'belong_type'
,
None
)
reply_level
=
request
.
GET
.
get
(
'reply_level'
,
None
)
reply_level
=
request
.
GET
.
get
(
'reply_level'
,
None
)
#历史问题 后期优化
reply_user_type
=
request
.
GET
.
get
(
'reply_user_type'
,
None
)
replied_user_type
=
request
.
GET
.
get
(
'replied_user_type'
,
None
)
is_online
=
request
.
GET
.
get
(
'is_online'
,
None
)
...
...
@@ -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,9 @@ 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
()
\
try
:
data
=
self
.
rpc
[
'venus/sun/reply/manage/list'
](
offset
=
(
page
-
1
)
*
limit
,
limit
=
limit
,
filters
=
filters
,
other_filters
=
other_filters
)
.
unwrap
()
...
...
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