using Application.Models; using IoTNode.DeviceServices.FBee; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; using System; namespace IoTNode.Controllers { [SwaggerTag("网关")] public class GatewayController : BaseDeviceController { private readonly FBeeService _deviceService; public GatewayController(IServiceProvider applicationServices, FBeeService deviceService) : base(applicationServices) { this._deviceService = deviceService; } [HttpGet, Route("/[controller]/[action]"), SwaggerOperation("查询所有网关")] public ApiResponse Refresh() { return this.AsyncAction(() => { this._deviceService.Execute(); }); } [HttpGet, Route("/[controller]/[action]"), SwaggerOperation("查询网关信息")] public ApiResponse X9d([SwaggerParameter("网关Id")]string number) { return this.AsyncAction(() => { this._deviceService.X9d(number); }); } [HttpGet, Route("/[controller]/[action]"), SwaggerOperation("查询所有设备")] public ApiResponse X81([SwaggerParameter("网关Id")]string number) { return this.AsyncAction(() => { this._deviceService.X81(number); }); } //[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("删除指定设备")] //public ApiResponse X95([SwaggerParameter("网关编号")]string gateway, [SwaggerParameter("设备编号")]string number) //{ // return this.AsyncAction(() => // { // this._deviceService.X95(gateway, number); // }); //} } }