using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Sys.Dtos;
using DS.WMS.Core.Sys.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
///
/// 用户邮箱设置 模块
///
public class UserEmailController : ApiController
{
private readonly IUserEmailService _invokeService;
///
/// 构造函数
///
///
public UserEmailController(IUserEmailService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetUserEmailList")]
public DataResult> GetUserEmailList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditUserEmail")]
public DataResult EditUserEmail([FromBody] CodeUserEmailReq req)
{
var res = _invokeService.EditUserEmail(req);
return res;
}
///
/// 详情
///
/// Id
///
[HttpGet]
[Route("GetUserEmailInfo")]
public DataResult GetUserEmailInfo([FromQuery] string id)
{
var res = _invokeService.GetUserEmailInfo(id);
return res;
}
///
/// 批量删除
///
/// req
///
[HttpPost]
[Route("BatchDelUserEmail")]
public DataResult BatchDelUserEmail([FromBody] IdModel req)
{
var res = _invokeService.BatchDelUserEmail(req);
return res;
}
///
/// 获取用户邮箱配置
///
///
[HttpGet]
[Route("GetUserEmailSetInfo")]
public async Task> GetUserEmailSetInfo()
{
var res = await _invokeService.GetUserEmailSetInfo();
return res;
}
}