namespace Yw.Application { /// /// Product /// [Route("Auth/Product/Std")] [ApiDescriptionSettings("Auth", Name = "产品(Std)", Order = 9990)] public class Product_StdController : IDynamicApiController { /// /// 获取所有 /// [Route("GetAll@V1.0")] [HttpGet] public List GetAll() { var keyContent = "Auth_Product_Std_GetAll"; var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent); var vm_list = MemoryCacheHelper.GetSet(cacheKey, () => { var allList = new Service.Product().GetAll(); Service.Product.PublishCache(cacheKey); allList = allList?.Where(x => x.UseStatus == Model.eUseStatus.Enable).ToList(); var vmList = allList?.Select(x => new ProductStdDto(x)).ToList(); return vmList; }, Yw.Service.ConfigHelper.CacheLevel1); return vm_list; } } }