using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Mvc;
|
using Newtonsoft.Json;
|
using WIDESEA_Core.BaseController;
|
using WIDESEA_Core.Helper;
|
using WIDESEA_ISystemService;
|
using WIDESEA_Model.Models;
|
using WIDESEA_DTO.System;
|
using WIDESEA_Core;
|
|
namespace WIDESEA_WMSServer.Controllers.System
|
{
|
[Route("api/Sys_Job")]
|
[ApiController]
|
public class Sys_JobController : ApiBaseController<ISys_JobService, Sys_Job>
|
{
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
private readonly ISys_JobService _sys_JobService;
|
public Sys_JobController(ISys_JobService service, IHttpContextAccessor httpContextAccessor) : base(service)
|
{
|
_httpContextAccessor = httpContextAccessor;
|
_sys_JobService = service;
|
}
|
|
/// <summary>
|
/// 启动服务
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost, Route("StartServe"), AllowAnonymous]
|
public WebResponseContent StartServe()
|
{
|
return _sys_JobService.StartServe();
|
}
|
|
/// <summary>
|
/// 关闭服务
|
/// </summary>
|
/// <returns></returns>
|
[HttpPost, Route("CloseServe"), AllowAnonymous]
|
public WebResponseContent CloseServe()
|
{
|
return _sys_JobService.CloseServe();
|
}
|
}
|
}
|