|
@@ -80,23 +80,14 @@ export class ApplicationService extends BaseService<modelType> {
|
|
|
if (user.type === '0') {
|
|
|
// 如何是比赛人员 查询成员中是否包含该用户
|
|
|
info.user_id = { $elemMatch: { _id: info.user } };
|
|
|
- delete info.user;
|
|
|
- const list: any = await this.model.find(info).skip(skip).limit(limit);
|
|
|
- const total = await this.model.count(info);
|
|
|
- return { list, total };
|
|
|
} else if (user.type === '1') {
|
|
|
// 如何团队管理人员 查询所属管理人员
|
|
|
info.administrator = info.user;
|
|
|
- delete info.user;
|
|
|
- const list: any = await this.model.find(info).skip(skip).limit(limit);
|
|
|
- const total = await this.model.count(info);
|
|
|
- return { list, total };
|
|
|
}
|
|
|
- } else {
|
|
|
- // 没有用户信息正常查询
|
|
|
- const list: any = await this.model.find(info).skip(skip).limit(limit);
|
|
|
- const total = await this.model.count(info);
|
|
|
- return { list, total };
|
|
|
+ delete info.user;
|
|
|
}
|
|
|
+ const list: any = await this.model.find(info).skip(skip).limit(limit);
|
|
|
+ const total = await this.model.count(info);
|
|
|
+ return { list, total };
|
|
|
}
|
|
|
}
|