|
@@ -89,7 +89,7 @@ class FubabceClaimsService extends CrudService {
|
|
total= totalres[0].total;
|
|
total= totalres[0].total;
|
|
}
|
|
}
|
|
const res = await this.model.aggregate([
|
|
const res = await this.model.aggregate([
|
|
- { $project: { uid: {$toObjectId: '$uid'},name:1,mongey_min_rate:1,mongey_max_rate:1,status:1,video:1} },
|
|
|
|
|
|
+ { $project: { uid: {$toObjectId: '$uid'},name:1,mongey_min_rate:1,mongey_max_rate:1,status:1,video:1,metatime:'$meta.updatedAt'} },
|
|
{ $lookup: {
|
|
{ $lookup: {
|
|
from: 'institution',
|
|
from: 'institution',
|
|
localField: 'uid',
|
|
localField: 'uid',
|
|
@@ -97,10 +97,12 @@ class FubabceClaimsService extends CrudService {
|
|
as: 'innew' } },
|
|
as: 'innew' } },
|
|
{ $unwind: '$innew' },
|
|
{ $unwind: '$innew' },
|
|
{ $project: { _id: 1, uid: {$toString: '$uid'}, status: 1, name: 1, publish_time: 1, mongey_min_rate: 1, mongey_max_rate: 1,video:1,
|
|
{ $project: { _id: 1, uid: {$toString: '$uid'}, status: 1, name: 1, publish_time: 1, mongey_min_rate: 1, mongey_max_rate: 1,video:1,
|
|
- innewname: '$innew.name', innewpic: '$innew.logo' } },
|
|
|
|
|
|
+ innewname: '$innew.name', innewpic: '$innew.logo',metatime:1} },
|
|
{ $match: match },
|
|
{ $match: match },
|
|
|
|
+ { $sort : { metatime:-1} },
|
|
{ $skip: (skip - 1) * limit },
|
|
{ $skip: (skip - 1) * limit },
|
|
- { $limit: limit },
|
|
|
|
|
|
+ { $limit: limit }
|
|
|
|
+
|
|
]);
|
|
]);
|
|
const newres = {res,total};
|
|
const newres = {res,total};
|
|
return newres;
|
|
return newres;
|