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
ac71f1ef
Commit
ac71f1ef
authored
Jun 20, 2016
by
陈家荣
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix_0620_aboutme_list' into SANDBOX
parents
a289864b
76237d03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
forumAboutMe.js
app/models/forumAboutMe.js
+3
-3
forumAboutMEService.js
app/service/forumAboutMEService.js
+18
-4
No files found.
app/models/forumAboutMe.js
View file @
ac71f1ef
...
...
@@ -32,8 +32,8 @@ var ForumAboutMeSchema = new Schema({
index
:
true
,
ref
:
'ForumThread'
,
require
:
true
},
threadStatus
:{
},
threadStatus
:{
//0屏蔽 1.正常, 2删除
type
:
Number
},
commentLevel1
:{
//一级评论
...
...
@@ -48,7 +48,7 @@ var ForumAboutMeSchema = new Schema({
index
:
true
,
ref
:
'ForumUser'
},
commentLevel1Status
:{
commentLevel1Status
:{
//0屏蔽 1.正常, 2删除
type
:
Number
},
commentLevel2
:{
//二级评论
...
...
app/service/forumAboutMEService.js
View file @
ac71f1ef
...
...
@@ -371,12 +371,20 @@ exports.me2other=function(ent_code,id,pageNo,pageSize,callback){
var
condition
=
{
ent_code
:
ent_code
,
from
:
new
mongoose
.
Types
.
ObjectId
(
id
),
// $or:[{
// type:THREAD_TYPE,threadStatus:1
// },{
// type:COMMENTLEVEL1_TYPE,threadStatus:1,commentLevel1Status:1
// },{
// type:COMMENTLEVEL2_TYPE,threadStatus:1,commentLevel1Status:1,commentLevel2Status:1
// }]
$or
:[{
type
:
THREAD_TYPE
,
threadStatus
:
1
},{
type
:
COMMENTLEVEL1_TYPE
,
threadStatus
:
1
,
commentLevel1Status
:
1
type
:
COMMENTLEVEL1_TYPE
,
threadStatus
:
1
},{
type
:
COMMENTLEVEL2_TYPE
,
threadStatus
:
1
,
commentLevel1Status
:
1
,
commentLevel2Status
:
1
type
:
COMMENTLEVEL2_TYPE
,
threadStatus
:
1
,
commentLevel1Status
:
1
}]
};
...
...
@@ -418,10 +426,16 @@ exports.other2me=function(ent_code,id,pageNo,pageSize,callback){
var
condition
=
{
ent_code
:
ent_code
,
to
:
new
mongoose
.
Types
.
ObjectId
(
id
),
// $or:[{
// type:COMMENTLEVEL1_TYPE,threadStatus:1,commentLevel1Status:1
// },{
// type:COMMENTLEVEL2_TYPE,threadStatus:1,commentLevel1Status:1,commentLevel2Status:1
// }]
$or
:[{
type
:
COMMENTLEVEL1_TYPE
,
threadStatus
:
1
,
commentLevel1Status
:
1
type
:
COMMENTLEVEL1_TYPE
,
threadStatus
:
1
},{
type
:
COMMENTLEVEL2_TYPE
,
threadStatus
:
1
,
commentLevel1Status
:
1
,
commentLevel2Status
:
1
type
:
COMMENTLEVEL2_TYPE
,
threadStatus
:
1
,
commentLevel1Status
:
1
}]
};
ForumAboutMe
.
find
(
condition
).
count
(
function
(
err
,
count
){
...
...
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