Commit 717640fb authored by 黄广星's avatar 黄广星

移动端 公告接口加入 entcode

parent d0dba767
......@@ -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},_sort = {top:-1,createtime:-1};
var _condition = {status:1,type:2,ent_code:req.session.openUser.ent_code},_sort = {top:-1,createtime:-1};
if(plate){
_condition.$or=[{plate:plate},{plate:null}];
}else{
......@@ -125,6 +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,
startdate:{$lte:curdate},
indate:{$gte:curdate},
},_sort = {top:-1,startdate:-1};
......@@ -155,7 +156,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,$or:[{indate:{$lt:curdate}},{finished:1}]},
_condition = {status:1,type:1,ent_code:req.session.openUser.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