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
db396e88
Commit
db396e88
authored
5 years ago
by
haowang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix code
parent
11b6267d
master
dev
like-pre/r01
quick-reply
refactor
test
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
reply.py
api/reply.py
+10
-6
No files found.
api/reply.py
View file @
db396e88
...
...
@@ -8,14 +8,14 @@ class ReplyListView(APIView):
def
get
(
self
,
request
):
page
=
int
(
request
.
GET
.
get
(
'page'
,
1
))
limit
=
int
(
request
.
GET
.
get
(
'limit'
,
10
))
id_
=
int
(
request
.
GET
.
get
(
'id'
,
0
)
)
id_
=
request
.
GET
.
get
(
'id'
,
None
)
content
=
request
.
GET
.
get
(
'content'
,
None
)
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_user_type
=
int
(
request
.
GET
.
get
(
'reply_user_type'
,
0
)
)
replied_user_type
=
int
(
request
.
GET
.
get
(
'replied_user_type'
,
0
)
)
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
)
from_create_time
=
request
.
GET
.
get
(
'from_create_time'
,
None
)
to_create_time
=
request
.
GET
.
get
(
'to_create_time'
,
None
)
...
...
@@ -25,9 +25,13 @@ class ReplyListView(APIView):
other_filters
=
{}
if
topic_content
:
other_filters
[
'topic_content'
]
=
topic_content
if
reply_user_type
and
reply_user_type
in
[
USER_EXTRA_TYPE
.
REAL
,
USER_EXTRA_TYPE
.
SHADOW
,
USER_EXTRA_TYPE
.
KOL
]:
if
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
]:
other_filters
[
'reply_user_type'
]
=
reply_user_type
if
replied_user_type
and
replied_user_type
in
[
USER_EXTRA_TYPE
.
REAL
,
USER_EXTRA_TYPE
.
SHADOW
,
USER_EXTRA_TYPE
.
KOL
]:
if
replied_user_type
:
replied_user_type
=
int
(
replied_user_type
)
if
replied_user_type
in
[
USER_EXTRA_TYPE
.
REAL
,
USER_EXTRA_TYPE
.
SHADOW
,
USER_EXTRA_TYPE
.
KOL
]:
other_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
...
...
@@ -36,7 +40,7 @@ class ReplyListView(APIView):
other_filters
[
'user_name'
]
=
user_name
filters
=
{}
if
id_
:
filters
[
'id'
]
=
i
d_
filters
[
'id'
]
=
i
nt
(
id_
)
if
content
:
filters
[
'content__contains'
]
=
content
if
belong_type
:
...
...
This diff is collapsed.
Click to expand it.
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