using BPA.SAAS.Manage.Application.Device.Dtos.Device; using BPA.SAAS.Manage.Comm.Const; using BPA.SAAS.Manage.Core.Base; using Furion.RemoteRequest.Extensions; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BPA.SAAS.Manage.Application { [ApiDescriptionSettings("Stop", Tag = "获取场景")] public class StoreServers: IDynamicApiController { public StoreServers() { } private string BaseServerUrl = App.GetConfig("baseurl"); [HttpGet("/api/stop/getstop")] public async Task> GetStop() { var getStoreurl = BaseServerUrl + "api/store/getstorelist_alm";//获取商品属性 var responseGoodsAttribute = await getStoreurl.SetHeaders(new { groupId = App.User?.FindFirst(ClaimConst.GroupId)?.Value }).SetHttpMethod(HttpMethod.Get).GetAsStringAsync(); var resStore = JsonConvert.DeserializeObject(responseGoodsAttribute); if (resStore?.statusCode != "200") throw Oops.Oh("获取场景数据失败"); var dataStore = JsonConvert.DeserializeObject>(resStore.data.ToString()); return dataStore; } } }