You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
3.3 KiB
C#
99 lines
3.3 KiB
C#
5 months ago
|
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;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 邮件解析配置
|
||
|
/// </summary>
|
||
|
public class EmailParserConfigController : ApiController
|
||
|
{
|
||
|
private readonly IEmailParserConfigService _emailParserService;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
/// <param name="invokeService"></param>
|
||
|
public EmailParserConfigController(IEmailParserConfigService invokeService)
|
||
|
{
|
||
|
_emailParserService = invokeService;
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 保存邮件解析配置
|
||
|
/// </summary>
|
||
|
/// <param name="info">邮件解析配置信息</param>
|
||
|
/// <returns>返回回执</returns>
|
||
|
[HttpPost("Save")]
|
||
|
public async Task<DataResult<EmailParserConfigDto>> Save(EmailParserConfigDto info)
|
||
|
{
|
||
|
return await _emailParserService.Save(info);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 获取邮件解析配置详情
|
||
|
/// </summary>
|
||
|
/// <param name="gid">邮件解析配置主键</param>
|
||
|
/// <returns>返回回执</returns>
|
||
|
[HttpGet("GetInfo")]
|
||
|
public async Task<DataResult<EmailParserConfigDto>> GetInfo(string gid)
|
||
|
{
|
||
|
return await _emailParserService.GetInfo(gid);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 删除
|
||
|
/// </summary>
|
||
|
/// <param name="gIds">邮件解析配置主键数组</param>
|
||
|
/// <returns>返回回执</returns>
|
||
|
[HttpPost("Delete")]
|
||
|
public async Task<DataResult> Delete([FromBody] string[] gIds)
|
||
|
{
|
||
|
return await _emailParserService.Delete(gIds);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 邮件解析配置台账查询
|
||
|
/// </summary>
|
||
|
/// <param name="cond">邮件解析配置台账查询请求</param>
|
||
|
/// <returns>返回结果</returns>
|
||
|
[HttpPost("/EmailParserConfig/GetPage")]
|
||
|
public async Task<DataResult<List<EmailParserConfigPageDto>>> GetPageAsync(PageRequest<QueryEmailParserConfigDto> cond)
|
||
|
{
|
||
|
return await _emailParserService.GetPageAsync(cond);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 检索邮件执行代码注入配置
|
||
|
/// </summary>
|
||
|
/// <param name="queryItem">检索条件</param>
|
||
|
/// <param name="topNum">返回记录最大条数(可以根据需要自助设定)</param>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet("/EmailParserConfig/QueryExcuteCodeInjectConfigList")]
|
||
|
public async Task<DataResult<EmailExcuteCodeInjectConfigDto>> QueryExcuteCodeInjectConfigList([FromQuery] string queryItem, [FromQuery] int topNum = 10)
|
||
|
{
|
||
|
return await _emailParserService.QueryExcuteCodeInjectConfigList(queryItem, topNum);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 检索所有使用此邮件解析配置邮箱列表
|
||
|
/// </summary>
|
||
|
/// <param name="gid">邮件解析配置主键</param>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet("/EmailParserConfig/QueryUseParserConfigEmailList")]
|
||
|
public async Task<DataResult<List<EmailUserAccountDto>>> QueryUseParserConfigEmailList([FromQuery] string gid)
|
||
|
{
|
||
|
return await _emailParserService.QueryUseParserConfigEmailList(gid);
|
||
|
}
|
||
|
}
|