| 123456789101112131415161718192021222324252627282930 |
- using Admin.NET.Plugin.AiDOP.Dto.S8;
- using Admin.NET.Plugin.AiDOP.Infrastructure;
- using Admin.NET.Plugin.AiDOP.Service.S8;
- namespace Admin.NET.Plugin.AiDOP.Controllers.S8;
- [ApiController]
- [Route("api/aidop/s8/config/detection-logs")]
- [NonUnify]
- public class AdoS8ConfigDetectionLogsController : ControllerBase
- {
- private readonly S8DetectionLogQueryService _svc;
- private readonly S8TrustedScopeResolver _scope;
- public AdoS8ConfigDetectionLogsController(S8DetectionLogQueryService svc, S8TrustedScopeResolver scope)
- {
- _svc = svc;
- _scope = scope;
- }
- [HttpGet]
- public async Task<IActionResult> GetPagedAsync([FromQuery] AdoS8DetectionLogQueryDto q)
- {
- var scope = await _scope.ResolveAsync();
- q.TenantId = scope.TenantId;
- q.FactoryId = scope.FactoryId;
- var (total, list) = await _svc.GetPagedAsync(q);
- return Ok(new { total, page = q.Page, pageSize = q.PageSize, list });
- }
- }
|