|
|
|
@ -23,14 +23,17 @@ namespace Myshipping.Application.Service.EmailParserServerManage
|
|
|
|
|
public class EmailExcuteCodeInjectConfigService : IEmailExcuteCodeInjectConfigService, IDynamicApiController, ITransient
|
|
|
|
|
{
|
|
|
|
|
private readonly SqlSugarRepository<EmailExcuteCodeInjectConfigInfo> _emailExcuteCodeInjectConfigInfoRepository;
|
|
|
|
|
private readonly SqlSugarRepository<EmailParserConfigInfo> _emailParserConfigInfoRepository;
|
|
|
|
|
|
|
|
|
|
private readonly ILogger<EmailExcuteCodeInjectConfigService> _logger;
|
|
|
|
|
|
|
|
|
|
public EmailExcuteCodeInjectConfigService(SqlSugarRepository<EmailExcuteCodeInjectConfigInfo> emailExcuteCodeInjectConfigInfoRepository,
|
|
|
|
|
ILogger<EmailExcuteCodeInjectConfigService> logger)
|
|
|
|
|
ILogger<EmailExcuteCodeInjectConfigService> logger,
|
|
|
|
|
SqlSugarRepository<EmailParserConfigInfo> emailParserConfigInfoRepository)
|
|
|
|
|
{
|
|
|
|
|
_emailExcuteCodeInjectConfigInfoRepository = emailExcuteCodeInjectConfigInfoRepository;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
_emailParserConfigInfoRepository = emailParserConfigInfoRepository;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 保存邮件执行代码注入配置
|
|
|
|
@ -318,5 +321,36 @@ namespace Myshipping.Application.Service.EmailParserServerManage
|
|
|
|
|
return entities.Adapt<SqlSugarPagedList<EmailExcuteCodeInjectConfigPageDto>>();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 检索所有使用此执行代码注入的解析配置列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="gid">邮件执行代码注入配置主键</param>
|
|
|
|
|
/// <returns>返回结果</returns>
|
|
|
|
|
[HttpGet("/EmailExcuteCodeInjectConfig/QueryUseParserConfigEmailList")]
|
|
|
|
|
public async Task<TaskManageOrderResultDto> QueryUseParserConfigEmailList(string gid)
|
|
|
|
|
{
|
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var accountList = _emailParserConfigInfoRepository.AsQueryable()
|
|
|
|
|
.Where(par => par.INJECT_ID == gid)
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
var list = accountList.Select(t =>
|
|
|
|
|
t.Adapt<EmailParserConfigDto>()).OrderBy(t => t.ParserName).ToList();
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
result.ext = list;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
result.succ = false;
|
|
|
|
|
result.msg = $"检索所有使用此执行代码注入的解析配置列表异常,原因:{ex.Message}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|