功能添加
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 20s
Docker Build & Deploy / Deploy to Production (push) Successful in 5s

This commit is contained in:
孙诚
2025-12-26 15:21:31 +08:00
parent 7dfb6a5902
commit cb11d80d1f
26 changed files with 2208 additions and 841 deletions

View File

@@ -2,11 +2,7 @@
public interface IEmailMessageRepository : IBaseRepository<EmailMessage>
{
Task<EmailMessage?> ExistsAsync(
string from,
string subject,
DateTime receivedDate,
string body);
Task<EmailMessage?> ExistsAsync(string md5);
/// <summary>
/// 分页获取邮件列表(游标分页)
@@ -25,14 +21,10 @@ public interface IEmailMessageRepository : IBaseRepository<EmailMessage>
public class EmailMessageRepository(IFreeSql freeSql) : BaseRepository<EmailMessage>(freeSql), IEmailMessageRepository
{
public async Task<EmailMessage?> ExistsAsync(
string from,
string subject,
DateTime receivedDate,
string body)
public async Task<EmailMessage?> ExistsAsync(string md5)
{
return await FreeSql.Select<EmailMessage>()
.Where(m => m.From == from && m.Subject == subject && m.ReceivedDate == receivedDate && m.Body == body)
.Where(e => e.Md5 == md5)
.FirstAsync();
}