Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing Details

Test_IRC_Net8
hang 2025-12-18 16:57:58 +08:00
commit 77b9b14cb6
1 changed files with 7 additions and 6 deletions

View File

@ -4,13 +4,14 @@
// 生成时间 2025-10-28 06:22:42Z // 生成时间 2025-10-28 06:22:42Z
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 // 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//-------------------------------------------------------------------- //--------------------------------------------------------------------
using DocumentFormat.OpenXml.Wordprocessing;
using IdentityModel.Client;
using IRaCIS.Core.Application.Helper; using IRaCIS.Core.Application.Helper;
using IRaCIS.Core.Application.Interfaces; using IRaCIS.Core.Application.Interfaces;
using IRaCIS.Core.Application.ViewModel; using IRaCIS.Core.Application.ViewModel;
using IRaCIS.Core.Domain.Models; using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Infra.EFCore;
using IRaCIS.Core.Infrastructure.Extention; using IRaCIS.Core.Infrastructure.Extention;
using IdentityModel.Client;
using MailKit; using MailKit;
using MailKit.Net.Imap; using MailKit.Net.Imap;
using MailKit.Search; using MailKit.Search;
@ -19,11 +20,11 @@ using MassTransit;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using MimeKit; using MimeKit;
using Panda.DynamicWebApi.Attributes;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Mail; using System.Net.Mail;
using System.Threading.Tasks; using System.Threading.Tasks;
using Panda.DynamicWebApi.Attributes;
namespace IRaCIS.Core.Application.Service; namespace IRaCIS.Core.Application.Service;
/// <summary> /// <summary>
@ -55,14 +56,14 @@ public class EmailLogService(IRepository<EmailLog> _emailLogRepository,
[HttpPost] [HttpPost]
public async Task<PageOutput<EmailLogView>> GetEmailLogList(EmailLogQuery inDto) public async Task<PageOutput<EmailLogView>> 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 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.EmailStartDate.HasValue, x => x.EmailDate >= inDto.EmailStartDate.Value)
.WhereIf(inDto.EmailEndDate.HasValue, x => x.EmailDate <= inDto.EmailEndDate.Value) .WhereIf(inDto.EmailEndDate.HasValue, x => x.EmailDate <= inDto.EmailEndDate.Value)
.WhereIf(inDto.EmailStateEnum.HasValue, x => x.EmailStateEnum == inDto.EmailStateEnum.Value) .WhereIf(inDto.EmailStateEnum.HasValue, x => x.EmailStateEnum == inDto.EmailStateEnum.Value)