diff --git a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs index 39f53cb54..6af33cf19 100644 --- a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs +++ b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs @@ -4,13 +4,14 @@ // 生成时间 2025-10-28 06:22:42Z // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 //-------------------------------------------------------------------- +using DocumentFormat.OpenXml.Wordprocessing; +using IdentityModel.Client; using IRaCIS.Core.Application.Helper; using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Infrastructure.Extention; -using IdentityModel.Client; using MailKit; using MailKit.Net.Imap; using MailKit.Search; @@ -19,11 +20,11 @@ using MassTransit; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; using MimeKit; +using Panda.DynamicWebApi.Attributes; using System.IO; using System.Linq; using System.Net.Mail; using System.Threading.Tasks; -using Panda.DynamicWebApi.Attributes; namespace IRaCIS.Core.Application.Service; /// @@ -55,14 +56,14 @@ public class EmailLogService(IRepository _emailLogRepository, [HttpPost] public async Task> GetEmailLogList(EmailLogQuery inDto) { - var emailFromEmail = await _trialRepository.Where(x=>x.Id==inDto.TrialId).Select(x=>x.EmailFromEmail).FirstOrDefaultAsync(); + var emailFromName = await _trialRepository.Where(x=>x.Id==inDto.TrialId).Select(x=>x.EmailFromName).FirstOrDefaultAsync(); - if (emailFromEmail.IsNullOrEmpty()) + if (emailFromName.IsNullOrEmpty()) { - emailFromEmail = _systemEmailConfig.FromEmail; + emailFromName = _systemEmailConfig.FromName; } var emailLogQueryable = _emailLogRepository - .Where(x=>x.SenderAddress== emailFromEmail) + .Where(x=>x.SenderName== emailFromName) .WhereIf(inDto.EmailStartDate.HasValue, x => x.EmailDate >= inDto.EmailStartDate.Value) .WhereIf(inDto.EmailEndDate.HasValue, x => x.EmailDate <= inDto.EmailEndDate.Value) .WhereIf(inDto.EmailStateEnum.HasValue, x => x.EmailStateEnum == inDto.EmailStateEnum.Value)