using IMCS.CCS.Model;
using IMCS.CCS.Service;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq;
namespace IMCS.CCS.Controllers
{
///
/// 运行日志控制器
///
public class JobLoggerController : AppBaseController
{
public JobLoggerController(IJobLoggerService service) : base(service)
{
}
///
/// 获取运行日志
///
///
///
///
///
[HttpGet("{taskId}/{page}/{size}")]
public ApiResult GetJobLoggers(Guid taskId, int page, int size)
{
var data = _service.FindListById(taskId)
.OrderByDescending(w => w.CreateTime)
.Skip((page - 1) * size)
.Take(size)
.ToList()
;
return this.ResultOk(data);
}
}
}