Commit fb16e522 authored by 陈家荣's avatar 陈家荣

2

parent f829bd3b
...@@ -1774,7 +1774,7 @@ router.get('/thread/getThreadWithNotPopulateComment', function(req, res, next) { ...@@ -1774,7 +1774,7 @@ router.get('/thread/getThreadWithNotPopulateComment', function(req, res, next) {
var pageNo = req.query.pageNo || 1; var pageNo = req.query.pageNo || 1;
var pageSize = req.query.pageSize || 10; var pageSize = req.query.pageSize || 10;
var infoId = req.query.infoId || null; var infoId = req.query.infoId || null;
var tagid = req.query.tagid || null; var tagId = req.query.tagId || null;
var sort = '-_id'; var sort = '-_id';
var ent_code = req.session.user.ent_code; var ent_code = req.session.user.ent_code;
var today = new Date(); var today = new Date();
...@@ -1794,8 +1794,8 @@ router.get('/thread/getThreadWithNotPopulateComment', function(req, res, next) { ...@@ -1794,8 +1794,8 @@ router.get('/thread/getThreadWithNotPopulateComment', function(req, res, next) {
if(infoId){ if(infoId){
conditions.info = infoId; conditions.info = infoId;
} }
if(tagid){ if(tagId){
conditions.tag={$in:[tagid]}; conditions.tag={$in:[tagId]};
} }
queryThread(conditions, pageNo, pageSize, sort, function(err, results){ queryThread(conditions, pageNo, pageSize, sort, function(err, results){
if(err){ if(err){
...@@ -1948,7 +1948,7 @@ router.get('/thread/getThreadWithNotPopulateComment/hot', function(req, res, nex ...@@ -1948,7 +1948,7 @@ router.get('/thread/getThreadWithNotPopulateComment/hot', function(req, res, nex
var pageNo = req.query.pageNo || 1; var pageNo = req.query.pageNo || 1;
var pageSize = req.query.pageSize || 10; var pageSize = req.query.pageSize || 10;
var infoId = req.query.infoId || null; var infoId = req.query.infoId || null;
var tagid = req.query.tagid || null; var tagId = req.query.tagId || null;
var sort = '-top -topTime -_id'; var sort = '-top -topTime -_id';
var ent_code = req.session.user.ent_code; var ent_code = req.session.user.ent_code;
var today = new Date(); var today = new Date();
...@@ -1968,9 +1968,9 @@ router.get('/thread/getThreadWithNotPopulateComment/hot', function(req, res, nex ...@@ -1968,9 +1968,9 @@ router.get('/thread/getThreadWithNotPopulateComment/hot', function(req, res, nex
if(infoId){ if(infoId){
conditions.info = infoId; conditions.info = infoId;
} }
if(tagid){ if(tagId){
sort = "-tag_top -tag_topTime -_id"; sort = "-tag_top -tag_topTime -_id";
conditions.tag={$in:[tagid]}; conditions.tag={$in:[tagId]};
} }
queryThread(conditions, pageNo, pageSize, sort, function(err, results){ queryThread(conditions, pageNo, pageSize, sort, function(err, results){
if(err){ if(err){
......
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