Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
7f823748
Commit
7f823748
authored
Jun 20, 2016
by
刘文胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
帖子评论接口 过滤掉status=2的数据 并且可以指定降序还是升序
parent
572274a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
9 deletions
+25
-9
forumThreadManagement.js
app/controllers/admin/forumThreadManagement.js
+21
-8
forumThreadManagementAsynBatch.js
app/controllers/admin/forumThreadManagementAsynBatch.js
+4
-1
No files found.
app/controllers/admin/forumThreadManagement.js
View file @
7f823748
...
@@ -898,16 +898,23 @@ router.get('/threadManagement/threads/:tid/comment/search', function(req, res, n
...
@@ -898,16 +898,23 @@ router.get('/threadManagement/threads/:tid/comment/search', function(req, res, n
mid
=
req
.
query
.
mid
,
mid
=
req
.
query
.
mid
,
floor_start
=
req
.
query
.
floor_start
,
floor_start
=
req
.
query
.
floor_start
,
floor_end
=
req
.
query
.
floor_end
,
floor_end
=
req
.
query
.
floor_end
,
content
=
req
.
query
.
content
||
''
,
content
=
req
.
query
.
content
||
''
;
sortBy
=
req
.
query
.
sort
;
var
asc
=
req
.
query
.
asc
===
'true'
?
1
:
-
1
;
var
sort
=
{};
var
sort
=
{
//默认排序
if
(
sortBy
){
floor
:
asc
sort
[
sortBy
]
=
-
1
;
};
if
(
req
.
query
.
sort
){
//指定排序字段
sort
=
{};
sort
[
req
.
query
.
sort
]
=
asc
;
}
}
var
conditions
=
{
var
conditions
=
{
ent_code
:
req
.
session
.
user
.
ent_code
,
ent_code
:
req
.
session
.
user
.
ent_code
,
thread
:
tid
,
thread
:
tid
,
level
:
1
level
:
1
,
status
:{
$ne
:
2
}
};
};
if
(
content
)
{
if
(
content
)
{
conditions
.
content
=
{
conditions
.
content
=
{
...
@@ -960,7 +967,10 @@ router.post('/threadManagement/threads/:tid/comment/search/deleteAll', function(
...
@@ -960,7 +967,10 @@ router.post('/threadManagement/threads/:tid/comment/search/deleteAll', function(
var
conditions
=
{
var
conditions
=
{
ent_code
:
ent_code
,
ent_code
:
ent_code
,
thread
:
tid
,
thread
:
tid
,
level
:
1
level
:
1
,
status
:{
$ne
:
2
}
};
};
if
(
content
)
{
if
(
content
)
{
conditions
.
content
=
{
conditions
.
content
=
{
...
@@ -1050,7 +1060,10 @@ router.post('/threadManagement/threads/:tid/comment/search/closeAll', function(r
...
@@ -1050,7 +1060,10 @@ router.post('/threadManagement/threads/:tid/comment/search/closeAll', function(r
var
conditions
=
{
var
conditions
=
{
ent_code
:
ent_code
,
ent_code
:
ent_code
,
thread
:
tid
,
thread
:
tid
,
level
:
1
level
:
1
,
status
:{
$ne
:
2
}
};
};
if
(
content
)
{
if
(
content
)
{
conditions
.
content
=
{
conditions
.
content
=
{
...
...
app/controllers/admin/forumThreadManagementAsynBatch.js
View file @
7f823748
...
@@ -440,7 +440,10 @@ function getCommentBatchOperateConditions(req){
...
@@ -440,7 +440,10 @@ function getCommentBatchOperateConditions(req){
var
conditions
=
{
var
conditions
=
{
ent_code
:
ent_code
,
ent_code
:
ent_code
,
thread
:
tid
,
thread
:
tid
,
level
:
1
level
:
1
,
status
:{
$ne
:
2
}
};
};
if
(
content
)
{
if
(
content
)
{
conditions
.
content
=
{
conditions
.
content
=
{
...
...
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