@@ -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));
}
@@ -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; }
+
@@ -23,5 +23,10 @@ namespace Hotline.Settings
/// </summary>
[Navigate(NavigateType.OneToMany, nameof(SystemSetting.SystemSettingGroupId))]
public List<SystemSetting> SystemSettings { get; set; }