using DS.Module.Core; using DS.Module.DjyServiceStatus; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Code.Interface; using DS.WMS.Core.EmailParse.Dtos; using DS.WMS.Core.EmailParse.Entity; using DS.WMS.Core.EmailParse.Interface; using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Sys.Dtos; using LanguageExt; using Mapster; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using NPOI.SS.Formula.Functions; namespace DS.WMS.AdminApi.Controllers; /// /// 邮件解析配置 /// public class EmailParserConfigController : ApiController { private readonly IEmailParserConfigService _emailParserService; /// /// 构造函数 /// /// public EmailParserConfigController(IEmailParserConfigService invokeService) { _emailParserService = invokeService; } /// /// 保存邮件解析配置 /// /// 邮件解析配置信息 /// 返回回执 [HttpPost("Save")] public async Task> Save(EmailParserConfigDto info) { return await _emailParserService.Save(info); } /// /// 获取邮件解析配置详情 /// /// 邮件解析配置主键 /// 返回回执 [HttpGet("GetInfo")] public async Task> GetInfo(string gid) { return await _emailParserService.GetInfo(gid); } /// /// 删除 /// /// 邮件解析配置主键数组 /// 返回回执 [HttpPost("Delete")] public async Task Delete([FromBody] string[] gIds) { return await _emailParserService.Delete(gIds); } /// /// 邮件解析配置台账查询 /// /// 邮件解析配置台账查询请求 /// 返回结果 [HttpPost("/EmailParserConfig/GetPage")] public async Task>> GetPageAsync(PageRequest cond) { return await _emailParserService.GetPageAsync(cond); } /// /// 检索邮件执行代码注入配置 /// /// 检索条件 /// 返回记录最大条数(可以根据需要自助设定) /// [HttpGet("/EmailParserConfig/QueryExcuteCodeInjectConfigList")] public async Task> QueryExcuteCodeInjectConfigList([FromQuery] string queryItem, [FromQuery] int topNum = 10) { return await _emailParserService.QueryExcuteCodeInjectConfigList(queryItem, topNum); } /// /// 检索所有使用此邮件解析配置邮箱列表 /// /// 邮件解析配置主键 /// [HttpGet("/EmailParserConfig/QueryUseParserConfigEmailList")] public async Task>> QueryUseParserConfigEmailList([FromQuery] string gid) { return await _emailParserService.QueryUseParserConfigEmailList(gid); } }