|
- using SafeCampus.Application.Services.Business.BuildingService;
-
- namespace SafeCampus.Web.Core.Controllers.Application.Business;
- /// <summary>
- /// 宿舍楼管理接口
- /// </summary>
- [ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 87, Tag = "宿舍楼管理")]
- [Route("/business/building")]
- [RolePermission]
- public class BuildingController
- {
- private readonly IBuildingService _buildingService;
-
- public BuildingController(IBuildingService buildingService)
- {
- _buildingService = buildingService;
- }
-
- /// <summary>
- /// 添加
- /// </summary>
- /// <param name="input">添加参数</param>
- /// <returns></returns>
- public async Task<bool> Add(BuildingInfoDto input)
- {
- return await _buildingService.Add(input);
- }
-
- /// <summary>
- /// 修改
- /// </summary>
- /// <param name="input">添加参数</param>
- /// <returns></returns>
- public async Task<bool> Update(BuildingInfoDto input)
- {
- return await _buildingService.Update(input);
- }
-
- /// <summary>
- /// 删除
- /// </summary>
- /// <param name="id">id</param>
- /// <returns></returns>
- public async Task<bool> Delete(long id)
- {
- return await _buildingService.Delete(id);
- }
-
- /// <summary>
- /// 获取列表
- /// </summary>
- /// <returns></returns>
- public async Task<List<BuildingInfoDto>> GetNoPageList()
- {
- return await _buildingService.GetNoPageList();
- }
- }
|