liuyu пре 4 година
родитељ
комит
770326b8f1
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      app/service/student.js

+ 3 - 2
app/service/student.js

@@ -52,13 +52,14 @@ class StudentService extends CrudService {
   }
   }
 
 
   // 查询
   // 查询
-  async seek({ termid, skip, limit }) {
+  async seek({ termid, type, skip, limit }) {
     const total = await this.model.count({
     const total = await this.model.count({
       termid,
       termid,
+      type,
       $or: [{ classid: null }, { classid: '' }],
       $or: [{ classid: null }, { classid: '' }],
     });
     });
     const data = await this.model
     const data = await this.model
-      .find({ termid, $or: [{ classid: null }, { classid: '' }] })
+      .find({ termid, type, $or: [{ classid: null }, { classid: '' }] })
       .skip(Number(skip))
       .skip(Number(skip))
       .limit(Number(limit));
       .limit(Number(limit));
     const result = { total, data };
     const result = { total, data };