tangxu
2024-06-19 9cfdf165b8364eb8d5614fa6b86258ffd717ab29
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
31
32
33
34
35
36
37
namespace HStation.Application
{
    /// <summary>
    /// XhsProject
    /// </summary>
    [Route("Xhs/Project/Std")]
    [ApiDescriptionSettings("Xhs", Name = "项目(Std)", Order = 99000)]
    public class XhsProject_StdController : IDynamicApiController
    {
 
        /// <summary>
        /// 获取所有
        /// </summary>
        [Route("GetAll@V1.0")]
        [HttpGet]
        public List<XhsProjectStdDto> GetAll()
        {
            var keyContent = $"Xhs_Project_Std_GetAll";
            var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent);
 
            var vm_list = Yw.MemoryCacheHelper.GetSet(cacheKey, () =>
            {
                var all = new Service.XhsProject().GetAll();
                Service.XhsProject.PublishCache(cacheKey);
                var vmList = all?.Select(x => new XhsProjectStdDto(x)).ToList();
                return vmList;
            }, Yw.Service.ConfigHelper.CacheLevel1);
            return vm_list;
        }
 
 
 
 
 
 
    }
}