using learun.iapplication;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace learun.webapi.Controllers
{
///
/// 版 本 Learun-ADMS-Core 力软管理后台
/// Copyright (c) 2019-present 力软信息技术(苏州)有限公司
/// 创建人:tobin
/// 日 期:2020.04.22
/// 描 述:部门接口
///
public class DepartmentController : MvcControllerBase
{
private readonly DepartmentIBLL _departmentIBLL;
///
/// 初始化
///
/// 部门接口
public DepartmentController(DepartmentIBLL departmentIBLL) {
_departmentIBLL = departmentIBLL;
}
///
/// 根据公司 id 获取部门列表
///
/// 公司主键
///
[HttpGet]
public async Task List(string companyId)
{
var data = await _departmentIBLL.GetList(companyId);
return Success(data);
}
///
/// 根据 id 获取单个部门详情
///
/// 部门主键
///
[HttpGet]
public async Task Info(string departmentId)
{
var data = await _departmentIBLL.GetEntity(departmentId);
return Success(data);
}
}
}