Commit 8788428c authored by 陈家荣's avatar 陈家荣

修改查询圈子信息获取帖子数的查询条件

parent c651b512
...@@ -64,6 +64,8 @@ router.post('/info/create', function(req, res, next) { ...@@ -64,6 +64,8 @@ router.post('/info/create', function(req, res, next) {
router.get('/info/:fid/get', function(req, res, next) { router.get('/info/:fid/get', function(req, res, next) {
var fid = req.params.fid || null; var fid = req.params.fid || null;
if (fid) { if (fid) {
var ent_code = req.session.user.ent_code;
var today = new Date();
var source = req.session.mobileForumUser.source; var source = req.session.mobileForumUser.source;
httpService.createLog(req, source, fid, 2); httpService.createLog(req, source, fid, 2);
forumInfoService.updateInfoPvCount(fid, function(err, result) { forumInfoService.updateInfoPvCount(fid, function(err, result) {
...@@ -82,9 +84,22 @@ router.get('/info/:fid/get', function(req, res, next) { ...@@ -82,9 +84,22 @@ router.get('/info/:fid/get', function(req, res, next) {
}); });
}, },
function(callback) { function(callback) {
forumThreadService.getAllCountByFid({ var conditions = {
info: fid ent_code: ent_code,
}, function(err, threadCount) { info: fid,
level: 1,
status: 1,
$or: [{
isEvent: 0
}, {
isEvent: null
}, {
isEvent: 1,
'event.eventStartTime' : {$lte : today}
}]
};
forumThreadService.getAllCountByFid(conditions, function(err, threadCount) {
if (err) { if (err) {
callback(err, null); callback(err, null);
} else { } else {
......
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