using Admin.Core.Common.Input; using Admin.Core.Common.Output; using Admin.Core.Model.Personnel; using Admin.Core.Service.Personnel.Position; using Admin.Core.Service.Personnel.Position.Input; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; namespace Admin.Core.Controllers.Personnel { /// /// 职位管理 /// public class PositionController : AreaController { private readonly IPositionService _positionService; public PositionController(IPositionService positionService) { _positionService = positionService; } /// /// 查询单条职位 /// /// /// [HttpGet] public async Task Get(long id) { return await _positionService.GetAsync(id); } /// /// 查询分页职位 /// /// /// [HttpPost] public async Task GetPage(PageInput model) { return await _positionService.PageAsync(model); } /// /// 新增职位 /// /// /// [HttpPost] public async Task Add(PositionAddInput input) { return await _positionService.AddAsync(input); } /// /// 修改职位 /// /// /// [HttpPut] public async Task Update(PositionUpdateInput input) { return await _positionService.UpdateAsync(input); } /// /// 删除职位 /// /// /// [HttpDelete] public async Task SoftDelete(long id) { return await _positionService.SoftDeleteAsync(id); } /// /// 批量删除职位 /// /// /// [HttpPut] public async Task BatchSoftDelete(long[] ids) { return await _positionService.BatchSoftDeleteAsync(ids); } } }