@@ -3,6 +3,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Post
|
|||||||
public class PostUpdateInputVo
|
public class PostUpdateInputVo
|
||||||
{
|
{
|
||||||
public bool? State { get; set; }
|
public bool? State { get; set; }
|
||||||
|
public int OrderNum { get; set; }
|
||||||
public string PostCode { get; set; }
|
public string PostCode { get; set; }
|
||||||
public string PostName { get; set; }
|
public string PostName { get; set; }
|
||||||
public string? Remark { get; set; }
|
public string? Remark { get; set; }
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
|
|||||||
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.PostName),
|
var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.PostName),
|
||||||
x => x.PostName.Contains(input.PostName!))
|
x => x.PostName.Contains(input.PostName!))
|
||||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
.WhereIF(input.State is not null, x => x.State == input.State)
|
||||||
|
.OrderByDescending(x => x.OrderNum)
|
||||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
||||||
return new PagedResultDto<PostGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
return new PagedResultDto<PostGetListOutputDto>(total, await MapToGetListOutputDtosAsync(entities));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user