dss пре 2 година
родитељ
комит
839b6837c1

+ 4 - 1
src/Hotline.Api/Controllers/SettingController.cs

@@ -57,7 +57,10 @@ namespace Hotline.Api.Controllers
         {
            //return await _systemSettingsRepository.QueryAsync(x => true);
 
-           return await _systemSettingGroupRepository.QueryExtAsync(x => true, x => x.Includes(d => d.SystemSettings));
+           return await _systemSettingGroupRepository.QueryExtAsync(
+               x => true, 
+               x => x.Includes(d => d.SystemSettings.OrderBy(x=>x.Sort)),
+               x => x.OrderBy(d=>d.Sort));
 
         }
 

+ 5 - 0
src/Hotline/Settings/SystemSetting.cs

@@ -40,5 +40,10 @@ namespace Hotline.Settings
         [SugarColumn(ColumnDataType = "varchar(4000)", IsNullable = true)]
         public string SettingValue { get; set; }
 
+        /// <summary>
+        /// 排序
+        /// </summary>
+        public int Sort { get; set; }
+
     }
 }

+ 5 - 0
src/Hotline/Settings/SystemSettingGroup.cs

@@ -23,5 +23,10 @@ namespace Hotline.Settings
         /// </summary>
         [Navigate(NavigateType.OneToMany, nameof(SystemSetting.SystemSettingGroupId))]
         public List<SystemSetting> SystemSettings { get; set; }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        public int Sort { get; set; }
     }
 }