Commit 941423a0 authored by strong's avatar strong

Merge commit '07b5828e'

parents 14e9e276 07b5828e
This diff is collapsed.
...@@ -112,4 +112,16 @@ exports.getForumModeratorApplys = function(conditions, pageNo, pageSize, sort, c ...@@ -112,4 +112,16 @@ exports.getForumModeratorApplys = function(conditions, pageNo, pageSize, sort, c
}); });
}; };
//获取条件获取
exports.getForumModeratorApplyByConditions = function(conditions, callback) {
forumModeratorApply.findOne(conditions, function(err, doc) {
if (err) {
console.error(err);
callback(err, null);
} else {
callback(null, doc);
}
});
};
...@@ -248,8 +248,8 @@ exports.createThread = function(entity, callback) { ...@@ -248,8 +248,8 @@ exports.createThread = function(entity, callback) {
}; };
//根据ID获取文章,选择字段 //根据ID获取文章,选择字段
exports.getByIdSelectyField = function(id, fields, callback) { exports.getByConditionsSelectyField = function(conditions, fields, callback) {
ForumThread.findOne({_id: id}).select(fields).exec(function(err,result){ ForumThread.findOne(conditions).select(fields).exec(function(err,result){
if (err) { if (err) {
console.error(err); console.error(err);
callback(err, null); callback(err, null);
...@@ -766,7 +766,8 @@ exports.getAllCountByFid = function(conditions, callback) { ...@@ -766,7 +766,8 @@ exports.getAllCountByFid = function(conditions, callback) {
//获取话题、照片墙子文章数据 //获取话题、照片墙子文章数据
function getSubThreads(doc, sort, callback) { function getSubThreads(doc, sort, callback) {
var conditions = { var conditions = {
pid: doc._id pid: doc._id,
status: 1
}; };
countAllByFid(conditions, function(err, count) { countAllByFid(conditions, function(err, count) {
if (err) { 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