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

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

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