|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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();
- }
- }
|