Commit 51aa12a5 authored by 黄广星's avatar 黄广星

1111

parent 717640fb
......@@ -94,7 +94,7 @@ router.get('/notice/newestMsg', function(req, res, next) {
pageSize=req.query.pageSize,
plate=req.query.plate;
var _condition = {status:1,type:2,ent_code:req.session.openUser.ent_code},_sort = {top:-1,createtime:-1};
var _condition = {status:1,type:2,ent_code:req.session.user.ent_code},_sort = {top:-1,createtime:-1};
if(plate){
_condition.$or=[{plate:plate},{plate:null}];
}else{
......@@ -125,7 +125,7 @@ router.get('/notice/newestAct', function(req, res, next) {
var curdate = new Date(),
_condition = {status:1,finished:0,type:1,
,ent_code:req.session.openUser.ent_code,
ent_code:req.session.user.ent_code,
startdate:{$lte:curdate},
indate:{$gte:curdate},
},_sort = {top:-1,startdate:-1};
......@@ -134,6 +134,7 @@ router.get('/notice/newestAct', function(req, res, next) {
}else{
_condition.plate=null;
}
console.log(_condition);
queryList(_condition,_sort,pageNo,pageSize,function(err,result){
if(err){
return res.json(err);
......@@ -156,7 +157,7 @@ router.get('/notice/oldAct', function(req, res, next) {
pageSize=req.query.pageSize,
plate=req.query.plate,
curdate = new Date(),
_condition = {status:1,type:1,ent_code:req.session.openUser.ent_code,$or:[{indate:{$lt:curdate}},{finished:1}]},
_condition = {status:1,type:1,ent_code:req.session.user.ent_code,$or:[{indate:{$lt:curdate}},{finished:1}]},
_sort = {top:-1,indate:-1};
if(plate){
_condition.$or=[{plate:plate},{plate:null}];
......
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