明树Git Lab

Commit cc00ac3b authored by zengfanpei's avatar zengfanpei

update

parent fbd4a2bf
...@@ -11,7 +11,7 @@ async function findUserByMobile(mobile) { ...@@ -11,7 +11,7 @@ async function findUserByMobile(mobile) {
if (!mobile) { if (!mobile) {
return null; return null;
} }
const user = await DB.User.findOne({ mobile }).populate({ path: "roles depart" }).lean(); const user = await DB.User.findOne({ mobile }).populate({ path: "roles depart avatar" }).lean();
return user; return user;
} }
...@@ -20,7 +20,7 @@ async function findList(search, fields, options) { ...@@ -20,7 +20,7 @@ async function findList(search, fields, options) {
return []; return [];
} }
console.log(search) console.log(search)
return DB.User.find(search).skip(options.skip).limit(options.limit).select(fields.join(" ")).populate({ path: "roles depart" }); return DB.User.find(search).skip(options.skip).limit(options.limit).select(fields.join(" ")).populate({ path: "roles depart avatar" });
} }
async function findOne(search, fields) { async function findOne(search, fields) {
......
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