Ver código fonte

对接关注

chen 4 anos atrás
pai
commit
8cb6d7ed94
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      app/service/intelligentDocking.js

+ 3 - 2
app/service/intelligentDocking.js

@@ -167,7 +167,7 @@ class IntelligentDockingService extends CrudService {
     const skip = Number.parseInt(data.skip) || 1;
     const limit = Number.parseInt(data.limit) || 10;
 
-    const total = await this.model.countDocuments(query);
+    // const total = await this.model.countDocuments(query);
     const result = await this.model.aggregate([
       { $match: query },
       { $project:
@@ -274,7 +274,8 @@ class IntelligentDockingService extends CrudService {
       { $limit: limit },
       { $sort: { time: -1 } },
     ]);
-    return { result, total };
+    // return { result, total };
+    return { result, total: result.length };
   }
 
   // 拒绝接口