修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fbdac497fa
commit
0151305ca3
|
|
@ -14,6 +14,17 @@ namespace IRaCIS.Core.Application.ViewModel;
|
||||||
public class GetReSendEmailInDto : PageInput
|
public class GetReSendEmailInDto : PageInput
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime? EmailStartDate { get; set; }
|
||||||
|
|
||||||
|
public DateTime? EmailEndDate { get; set; }
|
||||||
|
|
||||||
|
public EmailState? EmailStateEnum { get; set; }
|
||||||
|
|
||||||
|
public string ToRecipientName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string CcRecipientName { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
public class EmailLogView : EmailLogAddOrEdit
|
public class EmailLogView : EmailLogAddOrEdit
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,11 @@ public class EmailLogService(IRepository<EmailLog> _emailLogRepository,
|
||||||
var emailLogQueryable = _emailLogRepository
|
var emailLogQueryable = _emailLogRepository
|
||||||
|
|
||||||
.Where(x => reSendMessagelist.Contains(x.MessageId))
|
.Where(x => reSendMessagelist.Contains(x.MessageId))
|
||||||
|
.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)
|
||||||
|
.WhereIf(inDto.CcRecipientName.IsNotNullOrEmpty(), x => x.EmailRecipientLogList.Any(x => x.RecipientTypeEnum == RecipientType.Cc && x.RecipientName.Contains(inDto.CcRecipientName)))
|
||||||
|
.WhereIf(inDto.ToRecipientName.IsNotNullOrEmpty(), x => x.EmailRecipientLogList.Any(x => x.RecipientTypeEnum == RecipientType.To && x.RecipientName.Contains(inDto.ToRecipientName)))
|
||||||
.ProjectTo<EmailLogView>(_mapper.ConfigurationProvider);
|
.ProjectTo<EmailLogView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(EmailLogView.EmailDate) + " desc" };
|
var defalutSortArray = new string[] { nameof(EmailLogView.EmailDate) + " desc" };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue