平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
1.4 KiB

  1. using SafeCampus.Application.Services.Business.BuildingService;
  2. namespace SafeCampus.Web.Core.Controllers.Application.Business;
  3. /// <summary>
  4. /// 宿舍楼管理接口
  5. /// </summary>
  6. [ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 87, Tag = "宿舍楼管理")]
  7. [Route("/business/building")]
  8. [RolePermission]
  9. public class BuildingController
  10. {
  11. private readonly IBuildingService _buildingService;
  12. public BuildingController(IBuildingService buildingService)
  13. {
  14. _buildingService = buildingService;
  15. }
  16. /// <summary>
  17. /// 添加
  18. /// </summary>
  19. /// <param name="input">添加参数</param>
  20. /// <returns></returns>
  21. public async Task<bool> Add(BuildingInfoDto input)
  22. {
  23. return await _buildingService.Add(input);
  24. }
  25. /// <summary>
  26. /// 修改
  27. /// </summary>
  28. /// <param name="input">添加参数</param>
  29. /// <returns></returns>
  30. public async Task<bool> Update(BuildingInfoDto input)
  31. {
  32. return await _buildingService.Update(input);
  33. }
  34. /// <summary>
  35. /// 删除
  36. /// </summary>
  37. /// <param name="id">id</param>
  38. /// <returns></returns>
  39. public async Task<bool> Delete(long id)
  40. {
  41. return await _buildingService.Delete(id);
  42. }
  43. /// <summary>
  44. /// 获取列表
  45. /// </summary>
  46. /// <returns></returns>
  47. public async Task<List<BuildingInfoDto>> GetNoPageList()
  48. {
  49. return await _buildingService.GetNoPageList();
  50. }
  51. }