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 41da5812..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 @@ -6,7 +6,6 @@ using Yi.Framework.Ddd.Application; using Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary; using Yi.Framework.Rbac.Application.Contracts.IServices; using Yi.Framework.Rbac.Domain.Entities; -using Yi.Framework.Rbac.Domain.Shared.Consts; using Yi.Framework.SqlSugarCore.Abstractions; @@ -15,29 +14,27 @@ namespace Yi.Framework.Rbac.Application.Services /// /// Dictionary服务实现 /// - public class DictionaryService : YiCrudAppService, - IDictionaryService + public class DictionaryService : YiCrudAppService, + IDictionaryService { private ISqlSugarRepository _repository; - public DictionaryService(ISqlSugarRepository repository) : base(repository) { - _repository = repository; + _repository= repository; } /// /// 查询 /// - public override async Task> GetListAsync( - DictionaryGetListInputVo input) + + 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) + .OrderByDescending(x => x.OrderNum) .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto { @@ -60,4 +57,4 @@ namespace Yi.Framework.Rbac.Application.Services return result; } } -} \ No newline at end of file +}