//
namespace SafeCampus.Web.Core;
///
/// 职位管理控制器
///
[ApiDescriptionSettings(Tag = "职位管理")]
[Route("sys/organization/[controller]")]
[SuperAdmin]
public class PositionController : BaseController
{
private readonly ISysPositionService _sysPositionService;
public PositionController(ISysPositionService sysPositionService)
{
_sysPositionService = sysPositionService;
}
#region Get
///
/// 职位分页查询
///
///
///
[HttpGet("page")]
[DisplayName("职位分页查询")]
public async Task Page([FromQuery] PositionPageInput input)
{
return await _sysPositionService.Page(input);
}
///
/// 获取职位树
///
///
[HttpGet("tree")]
[DisplayName("获取职位树")]
public async Task Tree([FromQuery] PositionTreeInput input)
{
return await _sysPositionService.Tree(input);
}
///
/// 职位选择器
///
///
///
[HttpGet("selector")]
public async Task Selector([FromQuery] PositionSelectorInput input)
{
return await _sysPositionService.Selector(input);
}
///
/// 获取职位详情
///
///
///
[HttpGet("detail")]
[DisplayName("获取职位详情")]
public async Task Detail([FromQuery] BaseIdInput input)
{
return await _sysPositionService.Detail(input);
}
#endregion
#region Post
///
/// 添加职位
///
///
///
[HttpPost("add")]
[DisplayName("添加职位")]
public async Task Add([FromBody] PositionAddInput input)
{
await _sysPositionService.Add(input);
}
///
/// 修改职位
///
///
///
[HttpPost("edit")]
[DisplayName("修改职位")]
public async Task Edit([FromBody] PositionEditInput input)
{
await _sysPositionService.Edit(input);
}
///
/// 删除职位
///
///
///
[HttpPost("delete")]
[DisplayName("删除职位")]
public async Task Delete([FromBody] BaseIdListInput input)
{
await _sysPositionService.Delete(input);
}
#endregion
}