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

pi+ - 首页 - 社区情况

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