using SafeCampus.Application.Services.Business.CameraGroupService;
namespace SafeCampus.Web.Core.Controllers.Application.Business;
///
/// 摄像头分组管理接口
///
[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 90, Tag = "摄像头分组管理")]
[Route("/business/cameraGroup")]
[RolePermission]
public class CameraGroupController
{
private readonly ICameraGroupService _cameraGroupService;
public CameraGroupController(ICameraGroupService cameraGroupService)
{
_cameraGroupService = cameraGroupService;
}
///
/// 添加分组
///
/// 添加参数
///
public Task Add(CameraGroupAddInput input)
{
return _cameraGroupService.Add(input);
}
///
/// 修改分组
///
/// 添加参数
///
public Task Update(CameraGroupInput input)
{
return _cameraGroupService.Update(input);
}
///
/// 删除分组
///
/// id
///
public Task Delete(long id)
{
return _cameraGroupService.Delete(id);
}
///
/// 获取分组列表
///
///
public async Task> GetNoPageList()
{
var list =await _cameraGroupService.GetNoPageList();
list.Insert(0, new CameraGroup { Name = "无分组", Id = -1 });
return list;
}
}