ningshuxia
2025-03-27 afbafeecc1325bff849a17fb63b9b2b65b48ddf1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace HStation.Application
{
    /// <summary>
    /// AssetsHydrantSeries
    /// </summary>
    [Route("Assets/Hydrant/Series/Std")]
    [ApiDescriptionSettings("Assets", Name = "消火栓系列(Std)", Order = 19900)]
    public class AssetsHydrantSeries_StdController : IDynamicApiController
    {
        /// <summary>
        /// 获取所有
        /// </summary>
        [Route("GetAll@V1.0")]
        [HttpGet]
        public List<AssetsHydrantSeriesStdDto> GetAll()
        {
            var keyContent = $"Assets_Hydrant_Series_Std_GetAll";
            var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent);
 
            var vm_list = MemoryCacheHelper.GetSet(cacheKey, () =>
            {
                var allList = new HStation.Service.AssetsHydrantSeries().GetAll();
                HStation.Service.AssetsHydrantSeries.PublishCache(cacheKey);
                var vmList = allList?.Select(x => new AssetsHydrantSeriesStdDto(x)).ToList();
                return vmList;
            }, Yw.Service.ConfigHelper.CacheLevel3);
            return vm_list;
        }
    }
}