namespace HStation.Application
|
{
|
/// <summary>
|
/// AssetsCompressorSeries
|
/// </summary>
|
[Route("Assets/Compressor/Series/Std")]
|
[ApiDescriptionSettings("Assets", Name = "压缩机系列(Std)", Order = 19900)]
|
public class AssetsCompressorSeries_StdController : IDynamicApiController
|
{
|
|
/// <summary>
|
/// 获取所有
|
/// </summary>
|
[Route("GetAll@V1.0")]
|
[HttpGet]
|
public List<AssetsCompressorSeriesStdDto> GetAll()
|
{
|
var keyContent = $"Assets_Compressor_Series_Std_GetAll";
|
var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent);
|
|
var vm_list = MemoryCacheHelper.GetSet(cacheKey, () =>
|
{
|
var allList = new HStation.Service.AssetsCompressorSeries().GetAll();
|
HStation.Service.AssetsCompressorSeries.PublishCache(cacheKey);
|
var vmList = allList?.Select(x => new AssetsCompressorSeriesStdDto(x)).ToList();
|
return vmList;
|
}, Yw.Service.ConfigHelper.CacheLevel3);
|
return vm_list;
|
}
|
|
|
|
|
|
|
}
|
}
|