!72 岗位排序无效问题修复

Merge pull request !72 from 窗外的麻雀/abp
This commit is contained in:
橙子
2024-10-25 02:03:22 +00:00
committed by Gitee
2 changed files with 2 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post
public class PostUpdateInputVo
{
public bool? State { get; set; }
public int OrderNum { get; set; }
public string PostCode { get; set; }
public string PostName { get; set; }
public string? Remark { get; set; }

View File

@@ -30,6 +30,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.PostName),
x => x.PostName.Contains(input.PostName!))
.WhereIF(input.State is not null, x => x.State == input.State)
.OrderByDescending(x => x.OrderNum)
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
return new PagedResultDto<PostGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
}