修改邮件解析服务,新增批量重新解析方法

optimize
jianghaiqing 11 months ago
parent 56d5f7dc22
commit 1d9f15c8ee

@ -147,5 +147,10 @@ namespace Myshipping.Application
/// 处理明细
/// </summary>
public List<EmaiReceiveRecordDetailDto> detailList { get; set; }
/// <summary>
/// 附件列表
/// </summary>
public List<string> AttachmentList { get; set; }
}
}

@ -66,6 +66,11 @@ namespace Myshipping.Application
var showModel = model.Adapt<EmaiReceiveRecordDto>();
if(!string.IsNullOrWhiteSpace(model.MAIL_ATTACHMENTS))
{
showModel.AttachmentList = model.MAIL_ATTACHMENTS.Split(new char[] { ';'}).Where(t=>!string.IsNullOrWhiteSpace(t)).Select(t=>t.Trim()).ToList();
}
result.succ = true;
result.ext = showModel;
}
@ -369,5 +374,30 @@ namespace Myshipping.Application
return result;
}
/// <summary>
/// 重新解析邮件(批量)
/// </summary>
/// <param name="gIds">邮件接收记录主键数组</param>
/// <returns>返回回执</returns>
[HttpPost("/EmaiReceiveRecord/ReParseEmailBatch")]
public async Task<TaskManageOrderResultDto> ReParseEmailBatch([FromBody] string[] gIds)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
result.succ = true;
result.msg = "成功";
}
catch (Exception ex)
{
result.succ = false;
result.msg = $"获取重新解析邮件详情异常,原因:{ex.Message}";
}
return result;
}
}
}

@ -53,5 +53,13 @@ namespace Myshipping.Application
/// <param name="model">邮件接收记录详情</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> ReParseEmail(EmaiReceiveRecordDto model);
/// <summary>
/// 重新解析邮件(批量)
/// </summary>
/// <param name="gIds">邮件接收记录主键数组</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> ReParseEmailBatch(string[] gIds);
}
}

Loading…
Cancel
Save