|
@@ -169,11 +169,12 @@ class IntelligentDockingService extends CrudService {
|
|
|
|
|
|
const total = await this.model.countDocuments(query);
|
|
|
const result = await this.model.aggregate([
|
|
|
- { $match: query },
|
|
|
+ // { $match: query },
|
|
|
{ $project:
|
|
|
{
|
|
|
ensure_id: 1,
|
|
|
person: 1,
|
|
|
+ phone: 1,
|
|
|
money: 1,
|
|
|
claims_min_term: 1,
|
|
|
claims_max_term: 1,
|
|
@@ -264,8 +265,18 @@ class IntelligentDockingService extends CrudService {
|
|
|
finance_claims: '$finance_claims',
|
|
|
dictionary: '$dictionary',
|
|
|
follow: '$follow',
|
|
|
+ uuid: { $toObjectId: '$follow.uuid' },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { $lookup:
|
|
|
+ {
|
|
|
+ from: 'other_user',
|
|
|
+ localField: 'uuid',
|
|
|
+ foreignField: '_id',
|
|
|
+ as: 'otherUser',
|
|
|
},
|
|
|
},
|
|
|
+ { $unwind: { path: '$otherUser', preserveNullAndEmptyArrays: true } },
|
|
|
{ $skip: (skip - 1) * limit },
|
|
|
{ $limit: limit },
|
|
|
{ $sort: { time: -1 } },
|