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 { 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.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; //} } }