guhongwei 3 years ago
parent
commit
88dfb2efab
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/service/users/personal.js

+ 2 - 1
app/service/users/personal.js

@@ -20,7 +20,8 @@ class PersonalService extends CrudService {
   }
   async query(condition, { skip = 0, limit = 0 }) {
     const query = await this.dealQueryCondition(_.cloneDeep(condition));
-    const res = await this.model.find(query).skip(parseInt(skip)).limit(parseInt(limit).sort({'meta.createdAt':-1})
+    const res = await this.model.find(query).skip(parseInt(skip)).limit(parseInt(limit))
+      .sort({ 'meta.createdAt': -1 });
     return res;
   }
   async count(condition) {