✨ feat(邮件): 添加专属邮件
This commit is contained in:
@@ -98,6 +98,7 @@ export default class ServerMail extends MailTemp {
|
||||
public static async delMailsByRoleId(roleId: string) {
|
||||
const ids: { _id: string }[] = await ServerMailModel.find(
|
||||
{
|
||||
isSp: false,
|
||||
sendTime:{ $lte: nowSeconds() },
|
||||
$or: [{
|
||||
roleStatus: {$elemMatch: {roleId, status: MAIL_STATUS.READ}}, hasGoods:false
|
||||
@@ -133,7 +134,7 @@ export default class ServerMail extends MailTemp {
|
||||
* @param lean
|
||||
*/
|
||||
public static async findRewardsMails(serverId: number, roleId: string, lean = true) {
|
||||
const allMails: ServerMailType[] = await ServerMailModel.find({ serverId, sendTime:{$lte: nowSeconds()} }).lean(lean);
|
||||
const allMails: ServerMailType[] = await ServerMailModel.find({ serverId, sendTime:{$lte: nowSeconds()}, isSp: false }).lean(lean);
|
||||
let result: ServerMailType[] = [];
|
||||
for(let mail of allMails) {
|
||||
let { roleStatus } = mail;
|
||||
|
||||
Reference in New Issue
Block a user