明树Git Lab

Commit ee313794 authored by zfp1's avatar zfp1

2

parent 661b70b1
......@@ -13,12 +13,12 @@ async function list(req, res, next) {
// search.deviceNumber = {$regex: req.body.deviceNumber}
// }
if(req.body.startTime) {
search.time = search.time || {};
search.time.$gte = new Date(req.body.startTime);
search.createdAt = search.time || {};
search.createdAt.$gte = new Date(req.body.startTime);
}
if(req.body.endTime) {
search.time = search.time || {};
search.time.$lte =new Date(req.body.endTime)
search.createdAt = search.time || {};
search.createdAt.$lte =new Date(req.body.endTime)
}
if(_.isArray(req.body.time) && req.body.time.length == 2) {
search.createdAt = {
......
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