namespace IStation.Application
{
///
/// LogicSite
///
[Route("SZJT/Logic/Site/Std")]
[ApiDescriptionSettings("SZJT", Name = "站点(Std)", Order = 79900)]
public class LogicSite_StdController : IDynamicApiController
{
///
/// 获取所有
///
[Route("GetAll@V1.0")]
[HttpGet]
public List GetAll()
{
var keyContent = $"SZJT_Logic_Site_Std_GetAll";
var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent);
var vm_list = MemoryCacheHelper.GetSet(cacheKey, () =>
{
var all = new Service.LogicSite().GetAll();
Service.LogicSite.PublishCache(cacheKey);
var vmList = all?.Select(x => new LogicSiteStdDto(x)).ToList();
return vmList;
}, Yw.Service.ConfigHelper.CacheLevel1);
return vm_list;
}
}
}