Commit 77387afb authored by 陈家荣's avatar 陈家荣

update 话题、照片墙的评论数即子话题数量或者晒照数量 只过滤删除

parent 93bbbde3
......@@ -336,14 +336,13 @@ exports.getThreadById = function(tid, callback) {
conditions = {
pid: tid,
type: 2,
status:1
status:{$ne: 3}
};
}else if(doc.type == 3){
conditions = {
pid: tid,
type: 3,
status:1,
images: {$exists: true, $not: {$size: 0}}
status:{$ne: 3}
};
}else{
cb(null, null);
......@@ -368,28 +367,6 @@ exports.getThreadById = function(tid, callback) {
}
});
},
// function(cb) {
//获取照片墙最新文章列表
// if (doc.type !== 3) {
// cb(null, null);
// return;
// }
// var conditions = {
// pid: tid,
// type: 3,
// status:1,
// images: {$exists: true, $not: {$size: 0}}
// };
// getAllThreadByFidHelp(conditions, 1, 10, '-created', function(err, threads) {
// if (err) {
// console.error(err);
// cb(err, null);
// } else {
// cb(null, threads);
// }
// });
// },
function(cb) {
// 获取照片墙最热文章列表
if (doc.type !== 3) {
......@@ -452,27 +429,6 @@ exports.getThreadById = function(tid, callback) {
});
}
});
// ForumThread.aggregate({
// $match: {
// pid: mongoose.Types.ObjectId(tid)
// }
// }, {
// $group: {
// _id: {
// from: '$from'
// },
// count: {
// $sum: 1
// }
// }
// }, function(err, data) {
// if (err) {
// cb(err, null);
// } else {
// cb(null, data.length);
// }
// });
}
], function(err, results) {
if (err) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment