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.

82 lines
1.9 KiB
C#

2 years ago
using DS.Module.Core;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
using DS.WMS.Core.System.Interface;
using FluentValidation.AspNetCore;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.WebApi.Controllers;
/// <summary>
/// 用户模块
/// </summary>
public class UserController : ApiController
{
private readonly IUserService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public UserController(IUserService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 用户列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetUserList")]
public DataResult<List<SysUser>> GetUserList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 获取用户信息
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
2 years ago
[Route("GetUserInfo")]
public DataResult<UserViewModel> GetUserInfo([FromQuery]string id)
2 years ago
{
2 years ago
var res = _invokeService.GetUserInfo(id);
2 years ago
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditUser")]
public DataResult EditUser([FromBody] UserInput model)
{
var res = _invokeService.EditUser(model);
return res;
}
2 years ago
// /// <summary>
// /// 审核
// /// </summary>
// /// <param name="model"></param>
// /// <returns></returns>
// [HttpPost]
// [Route("AuditUser")]
// public DataResult AuditUser([FromBody] UserInput model)
// {
// var res = _invokeService.AuditUser(model);
// return res;
// }
2 years ago
2 years ago
2 years ago
}