字典详情crud实体增加OrderNum,列表增加倒序
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
/// </summary>
|
||||
public class DictionaryCreateInputVo
|
||||
{
|
||||
public int OrderNum { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ListClass { get; set; }
|
||||
public string? CssClass { get; set; }
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
{
|
||||
public class DictionaryGetListOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public int OrderNum { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
||||
{
|
||||
public class DictionaryGetOutputDto : EntityDto<Guid>
|
||||
{
|
||||
public int OrderNum { get; set; }
|
||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||
public Guid? CreatorId { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -30,10 +30,12 @@ namespace Yi.Framework.Rbac.Application.Services
|
||||
public override async Task<PagedResultDto<DictionaryGetListOutputDto>> GetListAsync(DictionaryGetListInputVo input)
|
||||
{
|
||||
RefAsync<int> 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<DictionaryGetListOutputDto>
|
||||
{
|
||||
TotalCount = total,
|
||||
|
||||
Reference in New Issue
Block a user