明树Git Lab

Commit 09970380 authored by zengfanpei's avatar zengfanpei

update

parent 03d8d036
......@@ -42,7 +42,7 @@ async function list (req, res, next) {
search.name = { $regex: req.body.name };
}
const count = await DB.Land.countDocuments(search);
const list = await DB.Land.find(search).populate({path: "zone"}).skip(skip).limit(pageSize).lean().exec();
const list = await DB.Land.find(search).populate({path: "zone"}).skip(skip).limit(pageSize).sort({ createdAt: -1 }).lean().exec();
return res.sendData({ list, count });
} catch (error) {
next(error);
......
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