using Cis.Application.Core.Component.MarkSeacher; namespace Cis.Application.Core; /// /// 标签追踪服务 /// [ApiDescriptionSettings(CoreInfo.GroupName, Order = CoreInfo.MarkSearchGroupOrder)] public class MarkSearchService : IDynamicApiController, ITransient { #region Attr private readonly IMarkSearcherServer _markSearcherServer; #endregion Attr public MarkSearchService(IMarkSearcherServer markSearcherServer) { _markSearcherServer = markSearcherServer; } /// /// 激活 Searcher /// /// cbCameraId /// [HttpPost] public async Task ActivateSearcher([Required][FromForm] long cameraId) { return await _markSearcherServer.ActivateSearcherAsync(cameraId); } /// /// 解除 Searcher /// /// cbCameraId /// [HttpPost] public async Task DeactivateSearcher([Required][FromForm] long cameraId) { return await _markSearcherServer.DeactivateSearcherAsync(cameraId); } /// /// 是否存在 Searcher /// /// cbCameraId /// [HttpGet] public async Task IsExistsSearcher([Required] long cameraId) { return await _markSearcherServer.IsExistsSearcherAsync(cameraId); } /// /// 激活标签 /// /// cbCameraId /// cmMarkLabelId /// [HttpPost] public async Task ActivateMarkLabel([Required][FromForm] long cameraId, [Required][FromForm] long markLabelId) { return await _markSearcherServer.ActivateMarkLabelAsync(cameraId, markLabelId); } /// /// 解除标签 /// /// cbCameraId /// cmMarkLabelId /// [HttpPost] public async Task DeactivateMarkLabel([Required][FromForm] long cameraId, [Required][FromForm] long markLabelId) { return await _markSearcherServer.DeactivateMarkLabelAsync(cameraId, markLabelId); } /// /// 是否存在标签 /// /// cbCameraId /// cmMarkLabelId /// [HttpGet] public async Task IsExistsMarkLabel([Required] long cameraId, [Required] long markLabelId) { return await _markSearcherServer.IsExistsMarkLabelAsync(cameraId, markLabelId); } /// /// 获取标签计算结果列表 /// /// cbCameraId /// [HttpGet] public async Task> GetMarkLabelCalcResultList([Required] long cameraId) { return await _markSearcherServer.GetMarkLabelCalcResultListAsync(cameraId); } }