|
@@ -20,8 +20,11 @@ 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) {
|
|
@@ -43,7 +46,6 @@ class PersonalService extends CrudService {
|
|
|
// code直接查询用户返回即可
|
|
|
condition.code = code;
|
|
|
}
|
|
|
- condition.sort = '-1';
|
|
|
return condition;
|
|
|
}
|
|
|
/**
|