diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryCreateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryCreateInputVo.cs index f4d9f21f..1ccfda7a 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryCreateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryCreateInputVo.cs @@ -5,6 +5,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary /// public class DictionaryCreateInputVo { + public int OrderNum { get; set; } public string? Remark { get; set; } public string? ListClass { get; set; } public string? CssClass { get; set; } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListOutputDto.cs index a9479a82..328d943d 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetListOutputDto.cs @@ -4,6 +4,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { public class DictionaryGetListOutputDto : EntityDto { + public int OrderNum { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; public Guid? CreatorId { get; set; } public string? Remark { get; set; } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetOutputDto.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetOutputDto.cs index 4171e9f3..9bbe9b71 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetOutputDto.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryGetOutputDto.cs @@ -4,6 +4,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { public class DictionaryGetOutputDto : EntityDto { + public int OrderNum { get; set; } public DateTime CreationTime { get; set; } = DateTime.Now; public Guid? CreatorId { get; set; } public string? Remark { get; set; } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryUpdateInputVo.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryUpdateInputVo.cs index 8c98c57b..3325264a 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryUpdateInputVo.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application.Contracts/Dtos/Dictionary/DictionaryUpdateInputVo.cs @@ -2,6 +2,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary { public class DictionaryUpdateInputVo { + public int OrderNum { get; set; } public string? Remark { get; set; } public string? ListClass { get; set; } public string? CssClass { get; set; } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryService.cs index e31d7596..07ca18d0 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/DictionaryService.cs @@ -30,10 +30,12 @@ namespace Yi.Framework.Rbac.Application.Services public override async Task> GetListAsync(DictionaryGetListInputVo input) { RefAsync total = 0; - var entities = await _repository._DbQueryable.WhereIF(input.DictType is not null, x => x.DictType == input.DictType) - .WhereIF(input.DictLabel is not null, x => x.DictLabel!.Contains(input.DictLabel!)) - .WhereIF(input.State is not null, x => x.State == input.State) - .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); + var entities = await _repository._DbQueryable + .WhereIF(input.DictType is not null, x => x.DictType == input.DictType) + .WhereIF(input.DictLabel is not null, x => x.DictLabel!.Contains(input.DictLabel!)) + .WhereIF(input.State is not null, x => x.State == input.State) + .OrderByDescending(x => x.OrderNum) + .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto { TotalCount = total,