From 52dd676cf904e03104f4f6f0a5bf93c2d530e129 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 13 Nov 2025 09:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Common/EmailLogService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs index 467243a23..41993244b 100644 --- a/IRaCIS.Core.Application/Service/Common/EmailLogService.cs +++ b/IRaCIS.Core.Application/Service/Common/EmailLogService.cs @@ -51,14 +51,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)