Commit e14ee388 authored by strong's avatar strong

Merge commit '89aa79ec' into SANDBOX

parents da8fec2b 89aa79ec
...@@ -338,15 +338,9 @@ router.post('/info/report/:id', function(req, res, next) { ...@@ -338,15 +338,9 @@ router.post('/info/report/:id', function(req, res, next) {
}, },
info: info_id info: info_id
}; };
var group = { ForumThread.count(match,function(err,count){
_id: { cont(err,{date: d,count: count|| 0});
_id: '$_id' });
},
count: {
$sum: 1
}
};
mapReduce(ForumThread, match, group, d, cont);
}); });
}); });
...@@ -448,17 +442,12 @@ router.get('/info/report/exportXlsReport/:id', function(req, res, next) { ...@@ -448,17 +442,12 @@ router.get('/info/report/exportXlsReport/:id', function(req, res, next) {
created: { created: {
$gte: new Date(d + ' 00:00:00'), $gte: new Date(d + ' 00:00:00'),
$lte: new Date(d + ' 23:59:59') $lte: new Date(d + ' 23:59:59')
}
};
var group = {
_id: {
_id: '$_id'
}, },
count: { info: info_id
$sum: 1
}
}; };
mapReduce(ForumThread, match, group, d, cont); ForumThread.count(match,function(err,count){
cont(err,{date: d,count: count|| 0});
});
}); });
}); });
...@@ -523,9 +512,6 @@ router.get('/info/report/exportXlsReport/:id', function(req, res, next) { ...@@ -523,9 +512,6 @@ router.get('/info/report/exportXlsReport/:id', function(req, res, next) {
}); });
} }
}); });
} else { } else {
res.json({ res.json({
result: false, result: false,
......
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