| | |
| | | namespace IStation.Application |
| | | using Microsoft.AspNetCore.Authorization; |
| | | |
| | | namespace IStation.Application |
| | | { |
| | | /// <summary> |
| | | /// Certificate |
| | |
| | | return vm_list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取所有 (不需要Token验证) |
| | | /// </summary> |
| | | [AllowAnonymous] |
| | | [Route("GetAll@V2.0")] |
| | | [HttpGet] |
| | | public List<CertificateStdDto> GetAll_V2_0() |
| | | { |
| | | var keyContent = $"SQI_Certificate_Std_GetAll_V2_0"; |
| | | var cacheKey = $"{MemoryCacheKeyHelper.GetPrefix(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module)}_{keyContent}"; |
| | | var vm_list = MemoryCacheHelper.GetSet(cacheKey, () => |
| | | { |
| | | var allList = new Service.Certificate().GetAll(); |
| | | Service.Certificate.PublishCache(cacheKey); |
| | | var vmList = allList?.Select(x => new CertificateStdDto(x)).ToList(); |
| | | return vmList; |
| | | }, CacheHelper.CacheLevel5); |
| | | return vm_list; |
| | | } |
| | | |
| | | |
| | | |
| | | |