|
@@ -17,11 +17,11 @@ class Person_roomService extends CrudService {
|
|
|
const condition = { ...info }; // last_time: { $exists: true },
|
|
|
if (p_id) {
|
|
|
condition.$or = [{ p1_id: p_id }, { p2_id: p_id }];
|
|
|
- delete condition.p_id;
|
|
|
}
|
|
|
console.log(condition);
|
|
|
const data = await this.model.find(condition).skip(parseInt(skip)).limit(parseInt(limit));
|
|
|
const total = await this.model.count(condition);
|
|
|
+ console.log(total);
|
|
|
return { data, total };
|
|
|
}
|
|
|
async create(payload) {
|