diff --git a/shared/db/GroupMail.ts b/shared/db/GroupMail.ts index dde19cff9..c77d93e9a 100644 --- a/shared/db/GroupMail.ts +++ b/shared/db/GroupMail.ts @@ -28,7 +28,7 @@ export default class GroupMail extends MailTemp { const result: GroupMailType[] = await GroupMailModel.find({ 'roleStatus.roleId': roleId, 'roleStatus.status': { $in: [ MAIL_STATUS.CREATE, MAIL_STATUS.READ, MAIL_STATUS.RECEIVED ] }, - sendTime:{ $lte: nowSeconds() }, endTime: { $gte: nowSeconds() } + endTime: { $gte: nowSeconds() } }).populate('mail').lean(); return result; } diff --git a/shared/db/Mail.ts b/shared/db/Mail.ts index ac14ad6b5..cbeb202d5 100644 --- a/shared/db/Mail.ts +++ b/shared/db/Mail.ts @@ -21,7 +21,7 @@ export default class Mail extends MailTemp { const result: MailType[] = await MailModel.find({ roleId, status: { $in: [ MAIL_STATUS.CREATE, MAIL_STATUS.READ, MAIL_STATUS.RECEIVED ] }, - sendTime:{ $lte: nowSeconds() }, endTime: { $gte: nowSeconds() } + endTime: { $gte: nowSeconds() } }).populate('mail').lean(); return result; } diff --git a/shared/db/ServerMail.ts b/shared/db/ServerMail.ts index 10123cc22..f31f7ab3c 100644 --- a/shared/db/ServerMail.ts +++ b/shared/db/ServerMail.ts @@ -33,7 +33,7 @@ export default class ServerMail extends MailTemp { const result: ServerMailType[] = await ServerMailModel.find({ serverId, delRoles: { $ne: roleId }, - sendTime:{ $lte: nowSeconds() }, endTime: { $gte: nowSeconds() } + endTime: { $gte: nowSeconds() } }).populate('mail').lean(); return result; }