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
c92473ce
Commit
c92473ce
authored
Sep 29, 2019
by
yangchenglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
4b0f5061
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
40 deletions
+13
-40
reply.py
api/reply.py
+13
-40
No files found.
api/reply.py
View file @
c92473ce
...
...
@@ -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
()
...
...
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