From 1d9f15c8ee63a7abf0bb698c2facdfba1423be7d Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Thu, 4 Jan 2024 14:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E6=9C=8D=E5=8A=A1=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E9=87=8D=E6=96=B0=E8=A7=A3=E6=9E=90=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dto/EmaiReceiveRecordDto.cs | 5 ++++ .../EmaiReceiveRecordService.cs | 30 +++++++++++++++++++ .../Interface/IEmaiReceiveRecordService.cs | 8 +++++ 3 files changed, 43 insertions(+) diff --git a/Myshipping.Application/Service/EmailParserServerManage/Dto/EmaiReceiveRecordDto.cs b/Myshipping.Application/Service/EmailParserServerManage/Dto/EmaiReceiveRecordDto.cs index 7f165cbc..362d0e2d 100644 --- a/Myshipping.Application/Service/EmailParserServerManage/Dto/EmaiReceiveRecordDto.cs +++ b/Myshipping.Application/Service/EmailParserServerManage/Dto/EmaiReceiveRecordDto.cs @@ -147,5 +147,10 @@ namespace Myshipping.Application /// 处理明细 /// public List detailList { get; set; } + + /// + /// 附件列表 + /// + public List AttachmentList { get; set; } } } diff --git a/Myshipping.Application/Service/EmailParserServerManage/EmaiReceiveRecordService.cs b/Myshipping.Application/Service/EmailParserServerManage/EmaiReceiveRecordService.cs index f98708a9..fde37b1d 100644 --- a/Myshipping.Application/Service/EmailParserServerManage/EmaiReceiveRecordService.cs +++ b/Myshipping.Application/Service/EmailParserServerManage/EmaiReceiveRecordService.cs @@ -66,6 +66,11 @@ namespace Myshipping.Application var showModel = model.Adapt(); + 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; } + + + /// + /// 重新解析邮件(批量) + /// + /// 邮件接收记录主键数组 + /// 返回回执 + [HttpPost("/EmaiReceiveRecord/ReParseEmailBatch")] + public async Task 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; + } } } diff --git a/Myshipping.Application/Service/EmailParserServerManage/Interface/IEmaiReceiveRecordService.cs b/Myshipping.Application/Service/EmailParserServerManage/Interface/IEmaiReceiveRecordService.cs index a794ad2d..251e0011 100644 --- a/Myshipping.Application/Service/EmailParserServerManage/Interface/IEmaiReceiveRecordService.cs +++ b/Myshipping.Application/Service/EmailParserServerManage/Interface/IEmaiReceiveRecordService.cs @@ -53,5 +53,13 @@ namespace Myshipping.Application /// 邮件接收记录详情 /// 返回回执 Task ReParseEmail(EmaiReceiveRecordDto model); + + + /// + /// 重新解析邮件(批量) + /// + /// 邮件接收记录主键数组 + /// 返回回执 + Task ReParseEmailBatch(string[] gIds); } }