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
cb5e4b88
Commit
cb5e4b88
authored
Aug 31, 2015
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Notice' into SANDBOX
parents
d13937bc
ced9f2d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
forumThreadService.js
app/service/forumThreadService.js
+11
-11
No files found.
app/service/forumThreadService.js
View file @
cb5e4b88
...
...
@@ -145,7 +145,7 @@ exports.getThreadById = function(tid, callback) {
level
:
'1'
// status:1
};
//获取最新10条评论
//获取最新10条评论
forumCommentService
.
getAllComment
(
conditions
,
1
,
10
,
function
(
err
,
results
)
{
if
(
err
)
{
console
.
log
(
err
);
...
...
@@ -178,7 +178,7 @@ exports.getThreadById = function(tid, callback) {
pid
:
tid
,
type
:
3
,
status
:
1
,
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
};
getAllThreadByFidHelp
(
conditions
,
1
,
10
,
'-created'
,
function
(
err
,
threads
)
{
if
(
err
)
{
...
...
@@ -195,7 +195,7 @@ exports.getThreadById = function(tid, callback) {
pid
:
tid
,
type
:
3
,
status
:
1
,
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
};
getAllThreadByFidHelp
(
conditions
,
1
,
10
,
'-praise_count'
,
function
(
err
,
threads
)
{
if
(
err
)
{
...
...
@@ -273,7 +273,7 @@ exports.getThreadByIdNoLimit = function(tid, callback) {
level
:
'1'
// status:1
};
//获取最新10条评论
//获取最新10条评论
forumCommentService
.
getAllComment
(
conditions
,
1
,
999
,
function
(
err
,
results
)
{
if
(
err
)
{
console
.
log
(
err
);
...
...
@@ -306,7 +306,7 @@ exports.getThreadByIdNoLimit = function(tid, callback) {
pid
:
tid
,
type
:
3
,
status
:
1
,
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
};
getAllThreadByFidHelp
(
conditions
,
1
,
10
,
'-created'
,
function
(
err
,
threads
)
{
if
(
err
)
{
...
...
@@ -323,7 +323,7 @@ exports.getThreadByIdNoLimit = function(tid, callback) {
pid
:
tid
,
type
:
3
,
status
:
1
,
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
images
:
{
$exists
:
true
,
$not
:
{
$size
:
0
}}
};
getAllThreadByFidHelp
(
conditions
,
1
,
10
,
'-praise_count'
,
function
(
err
,
threads
)
{
if
(
err
)
{
...
...
@@ -632,7 +632,7 @@ function getAllThreadByFidHelp(conditions, pageNo, pageSize, sort, callback) {
path
:
'comments'
,
options
:
{
where
:{
status
:
1
},
limit
:
5
,
limit
:
3
,
sort
:
'-created'
},
select
:
'from to created content level'
...
...
@@ -910,7 +910,7 @@ exports.updateThreadCommentCountInc = function(threadId, callback) {
});
};
//更新文章评论数
//更新文章评论数
exports
.
updateThreadCommentCount
=
function
(
threadId
,
callback
)
{
ForumThread
.
update
({
_id
:
threadId
...
...
@@ -995,7 +995,7 @@ function getAllThreadByFidHelpAndNickName(user_ids, conditions, pageNo, pageSize
path
:
'comments'
,
options
:
{
where
:{
status
:
1
},
limit
:
5
,
limit
:
3
,
sort
:
'-created'
},
select
:
'from to created content'
...
...
@@ -1031,6 +1031,6 @@ exports.getAllThreadByFidAndNickName = function(nickName, conditions, pageNo, pa
}
getAllThreadByFidHelpAndNickName
(
user_ids
,
conditions
,
pageNo
,
pageSize
,
sort
,
callback
);
}
});
}
\ No newline at end of file
}
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