From 06696e6f225733a60b03eea4a7c6374053d92c1d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 14 四月 2020 14:15:35 +0800 Subject: [PATCH] 20200414 --- HDL_ON/Entity/FunctionList.cs | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index eb8157c..7483e31 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -1,9 +1,10 @@ 锘縰sing System; using System.Collections.Generic; +using System.Linq; namespace HDL_ON.Entity { - public class FunctionList + public class FunctionList { /// <summary> /// 绌鸿皟鍒楄〃 @@ -25,6 +26,7 @@ /// 鍦烘櫙鍒楄〃 /// </summary> public List<Scene> scenes = new List<Scene>(); + [Newtonsoft.Json.JsonIgnore] public List<Function> functions = new List<Function>(); @@ -49,8 +51,10 @@ deviceFunctionList.AddRange(lights); deviceFunctionList.AddRange(curtains); deviceFunctionList.AddRange(floorHeatings); - return deviceFunctionList; + + return deviceFunctionList.OrderByDescending(o => o.usageCount).ToList(); } } + } -- Gitblit v1.8.0