using SafeCampus.Application.Services.Business.DepartmentService;
namespace SafeCampus.Web.Core.Controllers.Application.Business;
///
///系部管理接口
///
[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 83, Tag = "系部管理")]
[Route("/business/department")]
[RolePermission]
public class DepartmentController
{
private readonly IDepartmentService _departmentService;
public DepartmentController(IDepartmentService departmentService)
{
_departmentService = departmentService;
}
///
/// 添加
///
/// 添加参数
///
public async Task Add(DepartmentDto input)
{
return await _departmentService.Add(input);
}
///
/// 修改
///
/// 添加参数
///
public async Task Update(DepartmentDto input)
{
return await _departmentService.Update(input);
}
///
/// 获取详情
///
///
///
public async Task GetInfo(long id)
{
return await _departmentService.GetInfo(id);
}
///
/// 删除
///
/// id
///
[HttpPost]
public async Task Delete(BaseIdListInput id)
{
return await _departmentService.Delete(id.Ids);
}
///
/// 获取列表
///
///
public async Task> GetPageList(DepartmentSearch search)
{
return await _departmentService.GetPageList(search);
}
///
/// 不分页获取列表
///
///
///
public async Task> GetNoPageList(DepartmentSearch search)
{
return await _departmentService.GetNoPageList(search);
}
}