|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 用户邮箱设置 模块
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class UserEmailController : ApiController
|
|
|
|
|
{
|
|
|
|
|
private readonly IUserEmailService _invokeService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 构造函数
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
|
public UserEmailController(IUserEmailService invokeService)
|
|
|
|
|
{
|
|
|
|
|
_invokeService = invokeService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("GetUserEmailList")]
|
|
|
|
|
public DataResult<List<CodeUserEmailRes>> GetUserEmailList([FromBody] PageRequest request)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.GetListByPage(request);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 编辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("EditUserEmail")]
|
|
|
|
|
public DataResult EditUserEmail([FromBody] CodeUserEmailReq req)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.EditUserEmail(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">Id</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetUserEmailInfo")]
|
|
|
|
|
public DataResult<CodeUserEmailRes> GetUserEmailInfo([FromQuery] string id)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.GetUserEmailInfo(id);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req">req</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("BatchDelUserEmail")]
|
|
|
|
|
public DataResult BatchDelUserEmail([FromBody] IdModel req)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.BatchDelUserEmail(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取用户邮箱配置
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetUserEmailSetInfo")]
|
|
|
|
|
public async Task<DataResult<CodeUserEmailRes>> GetUserEmailSetInfo()
|
|
|
|
|
{
|
|
|
|
|
var res = await _invokeService.GetUserEmailSetInfo();
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
}
|