wankeda
2 天以前 6cc35000a6e138cfad96e7b02f8aeddcdb4ba6bf
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
46
47
48
49
using Autofac.Core;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_SystemServices;
 
namespace WIDESEAWCS_Server.Controllers.System
{
    [Route("api/Dt_Stationinfo")]
    [ApiController]
    public class Dt_StationinfoController : ApiBaseController<IDt_StationinfoService, Dt_Stationinfo>
    {
        public Dt_StationinfoController(IDt_StationinfoService service) : base(service)
        {
        }
        [HttpPost, Route("SetStationEnable"), AllowAnonymous]
        public WebResponseContent SetStationEnable([FromBody] object parm)
        {
            return Service.SetStationEnable(parm);
        }
 
        //public WebResponseContent SetStationEnable(object parm)
        //{
        //    WebResponseContent content = new WebResponseContent();
        //    try
        //    {
        //        var data = JsonConvert.DeserializeObject<Parm>(parm.ToString());
        //        var res = BaseDal.QueryFirst(x => data.data.Contains(x.id.ToString()));
        //        res.Enable = data.type.ObjToBool();
        //        var isTrue = BaseDal.UpdateData(res);
        //        if (isTrue)
        //        {
        //            content.OK("缓存架状态更新成功");
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        content.Error(ex.Message);
        //    }
        //    return content;
        //}
 
    }
}