Commit d0dba767 authored by 刘文胜's avatar 刘文胜

1

parent e1146fac
...@@ -96,7 +96,9 @@ router.get('/notice/newestMsg', function(req, res, next) { ...@@ -96,7 +96,9 @@ router.get('/notice/newestMsg', function(req, res, next) {
var _condition = {status:1,type:2},_sort = {top:-1,createtime:-1}; var _condition = {status:1,type:2},_sort = {top:-1,createtime:-1};
if(plate){ if(plate){
_condition.plate=plate; _condition.$or=[{plate:plate},{plate:null}];
}else{
_condition.plate=null;
} }
queryList(_condition,_sort,pageNo,pageSize,function(err,result){ queryList(_condition,_sort,pageNo,pageSize,function(err,result){
if(err){ if(err){
...@@ -127,7 +129,9 @@ router.get('/notice/newestAct', function(req, res, next) { ...@@ -127,7 +129,9 @@ router.get('/notice/newestAct', function(req, res, next) {
indate:{$gte:curdate}, indate:{$gte:curdate},
},_sort = {top:-1,startdate:-1}; },_sort = {top:-1,startdate:-1};
if(plate){ if(plate){
_condition.plate=plate; _condition.$or=[{plate:plate},{plate:null}];
}else{
_condition.plate=null;
} }
queryList(_condition,_sort,pageNo,pageSize,function(err,result){ queryList(_condition,_sort,pageNo,pageSize,function(err,result){
if(err){ if(err){
...@@ -154,7 +158,9 @@ router.get('/notice/oldAct', function(req, res, next) { ...@@ -154,7 +158,9 @@ router.get('/notice/oldAct', function(req, res, next) {
_condition = {status:1,type:1,$or:[{indate:{$lt:curdate}},{finished:1}]}, _condition = {status:1,type:1,$or:[{indate:{$lt:curdate}},{finished:1}]},
_sort = {top:-1,indate:-1}; _sort = {top:-1,indate:-1};
if(plate){ if(plate){
_condition.plate=plate; _condition.$or=[{plate:plate},{plate:null}];
}else{
_condition.plate=null;
} }
queryList(_condition,_sort,pageNo,pageSize,function(err,result){ queryList(_condition,_sort,pageNo,pageSize,function(err,result){
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