Commit 1652cbcb authored by 陈志良's avatar 陈志良

pi+ - 首页 - 社区情况

parent 16beef1e
......@@ -58,15 +58,15 @@ router.get('/statistic',function(req, res, next) {
function(cont){
//昨天发帖数
var match = {ent_code:ent_code,created:{$gte:y_begin,$lte:y_end}};
aggregate(ForumThread,match,{mid:'$mid'},{'count':-1},function(err,docs){
cont(err,docs.length);
ForumThread.count(match,function(err,count){
cont(err,count);
});
},
function(cont){
//前天发帖数
var match = {ent_code:ent_code,created:{$gte:by_begin,$lte:by_end}};
aggregate(ForumThread,match,{mid:'$mid'},{'count':-1},function(err,docs){
cont(err,docs.length);
ForumThread.count(match,function(err,count){
cont(err,count);
});
}
]).then(function(cont,datas){
......
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