|
@@ -11,7 +11,6 @@ class LookuserService extends CrudService {
|
|
|
constructor(ctx) {
|
|
|
super(ctx, 'lookuser');
|
|
|
this.model = this.ctx.model.Lookuser;
|
|
|
- this.rmodel = this.ctx.model.Roomuser;
|
|
|
}
|
|
|
|
|
|
async create(data) {
|
|
@@ -22,23 +21,6 @@ class LookuserService extends CrudService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- async query({ skip, limit, ...info }) {
|
|
|
- const total = await this.model.count(info);
|
|
|
- const lookuser = await this.model
|
|
|
- .find(info)
|
|
|
- .skip(Number(skip))
|
|
|
- .limit(Number(limit));
|
|
|
- const data = [];
|
|
|
- for (const _lookuser of lookuser) {
|
|
|
- const lu = JSON.parse(JSON.stringify(_lookuser));
|
|
|
- const ruser = await this.rmodel.findById(_lookuser.userid);
|
|
|
- const _ruser = JSON.parse(JSON.stringify(ruser));
|
|
|
- const newdata = { ...lu, ..._ruser };
|
|
|
- data.push(newdata);
|
|
|
- }
|
|
|
- return { data, total };
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
}
|
|
|
|