lixiaojun
2024-03-30 e9c15d84b7f5edc9fee0c1998e21877d24290d71
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
namespace Yw.Application
{
    /// <summary>
    /// BimfaceFileRelationLabel
    /// </summary>
    [Route("Bimface/File/Relation/Label/Std")]
    [ApiDescriptionSettings("Bimface", Name = "Bimface文件关联标签(Std)", Order = 69000)]
    public class BimfaceFileRelationLabel_StdController : IDynamicApiController
    {
        /// <summary>
        ///通过 RelationID 获取
        /// </summary>
        [Route("GetByRelationID@V1.0")]
        [HttpGet]
        public List<BimfaceFileRelationLabelStdDto> GetByRelationID([FromQuery][Required] RelationIDInput input)
        {
            var keyContent = $"Bimface_File_Relation_Label_Std_GetByRelationID_{input.RelationID}";
            var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent);
 
            var vm_list = MemoryCacheHelper.GetSet(cacheKey, () =>
            {
                var all = new Service.BimfaceFileRelationLabel().GetAll();
                Service.BimfaceFileRelationLabel.PublishCache(cacheKey);
                var vmList = all?.Select(x => new BimfaceFileRelationLabelStdDto(x)).ToList();
                return vmList;
            }, Yw.Service.ConfigHelper.CacheLevel5);
            return vm_list;
 
        }
 
 
 
    }
}