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