duyongjia
2024-12-14 1bdb5689ddf1560a312de9413ce1c26e5163627d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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();
        }
    }
}