新增邮件显示已读未读功能

This commit is contained in:
eoao
2025-11-18 22:08:00 +08:00
parent 0395992b5b
commit 9a089da3b7
12 changed files with 102 additions and 16 deletions

View File

@@ -671,6 +671,11 @@ const emailService = {
async physicsDeleteByAccountId(c, accountId) {
await attService.removeByAccountId(c, accountId);
await orm(c).delete(email).where(eq(email.accountId, accountId)).run();
},
async read(c, params, userId) {
const { emailIds } = params;
await orm(c).update(email).set({ unread: emailConst.unread.READ }).where(and(eq(email.userId, userId), inArray(email.emailId, emailIds)));
}
};