邮件:删除邮件bug
This commit is contained in:
@@ -56,7 +56,7 @@ export default class GroupMail extends MailTemp {
|
||||
$or: [{
|
||||
roleStatus: {$elemMatch: {roleId, status: MAIL_STATUS.READ}}, hasGoods:false
|
||||
}, {
|
||||
roleStatus: {$elemMatch: {roleId, status: MAIL_STATUS.RECEIVED}}, hasGoods: true
|
||||
roleStatus: {$elemMatch: {roleId, status: MAIL_STATUS.RECEIVED}}
|
||||
}]
|
||||
},
|
||||
{ $set:{ 'roleStatus.$.status': MAIL_STATUS.DELETE } },
|
||||
@@ -76,7 +76,7 @@ export default class GroupMail extends MailTemp {
|
||||
$or: [{
|
||||
roleStatus: {$elemMatch: {roleId, status: MAIL_STATUS.READ}}, hasGoods:false
|
||||
}, {
|
||||
roleStatus: {$elemMatch: {roleId, status: MAIL_STATUS.RECEIVED}}, hasGoods: true
|
||||
roleStatus: {$elemMatch: {roleId, status: MAIL_STATUS.RECEIVED}}
|
||||
}]
|
||||
},).select('_id').lean();
|
||||
const result: GroupMailType[] = [];
|
||||
@@ -118,7 +118,7 @@ export default class GroupMail extends MailTemp {
|
||||
}
|
||||
|
||||
public static async findReadAndRewardsMails(roleId: string, lean = true) {
|
||||
const ids: GroupMailType[] = await GroupMailModel.find({ sendTime:{$lte: nowSeconds()}, roleStatus: { $elemMatch: { roleId, $or:[ {$and: [{status: MAIL_STATUS.READ}, { hasGoods: true }]},{status: MAIL_STATUS.RECEIVED} ] } } }).select('_id').lean(lean);
|
||||
const ids: GroupMailType[] = await GroupMailModel.find({ sendTime:{$lte: nowSeconds()}, roleStatus: { $elemMatch: { roleId, $or:[ {$and: [{status: MAIL_STATUS.READ}, { hasGoods: false }]},{status: MAIL_STATUS.RECEIVED} ] } } }).select('_id').lean(lean);
|
||||
return ids;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user