using SafeCampus.Application.Services.Business.BuildingService; using SafeCampus.Application.Services.Business.CameraInfoService; namespace SafeCampus.Web.Core.Controllers.Application.Business; /// /// 宿舍楼管理接口 /// [ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 87, Tag = "宿舍楼管理")] [Route("/business/building")] [RolePermission] public class BuildingController { private readonly IBuildingService _buildingService; private readonly ICameraInfoService _cameraInfoService; public BuildingController(IBuildingService buildingService, ICameraInfoService cameraInfoService) { _buildingService = buildingService; _cameraInfoService = cameraInfoService; } /// /// 添加 /// /// 添加参数 /// public async Task Add(BuildingInfoDto input) { return await _buildingService.Add(input); } /// /// 修改 /// /// 添加参数 /// public async Task Update(BuildingInfoDto input) { return await _buildingService.Update(input); } /// /// 删除 /// /// id /// public async Task Delete(long id) { return await _buildingService.Delete(id); } /// /// 获取列表 /// /// public async Task> GetNoPageList() { return await _buildingService.GetNoPageList(); } /// /// 获取未被宿舍楼使用的摄像头 /// /// public async Task> GetBuildCameraList() { var list =await _buildingService.GetUseCameraList(); var camera = await _cameraInfoService.GetBuildCameraList(list); return camera; } }