字典详情crud实体增加OrderNum,列表增加倒序
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class DictionaryCreateInputVo
|
public class DictionaryCreateInputVo
|
||||||
{
|
{
|
||||||
|
public int OrderNum { get; set; }
|
||||||
public string? Remark { get; set; }
|
public string? Remark { get; set; }
|
||||||
public string? ListClass { get; set; }
|
public string? ListClass { get; set; }
|
||||||
public string? CssClass { 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 class DictionaryGetListOutputDto : EntityDto<Guid>
|
||||||
{
|
{
|
||||||
|
public int OrderNum { get; set; }
|
||||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||||
public Guid? CreatorId { get; set; }
|
public Guid? CreatorId { get; set; }
|
||||||
public string? Remark { 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 class DictionaryGetOutputDto : EntityDto<Guid>
|
||||||
{
|
{
|
||||||
|
public int OrderNum { get; set; }
|
||||||
public DateTime CreationTime { get; set; } = DateTime.Now;
|
public DateTime CreationTime { get; set; } = DateTime.Now;
|
||||||
public Guid? CreatorId { get; set; }
|
public Guid? CreatorId { get; set; }
|
||||||
public string? Remark { get; set; }
|
public string? Remark { get; set; }
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ namespace Yi.Framework.Rbac.Application.Contracts.Dtos.Dictionary
|
|||||||
{
|
{
|
||||||
public class DictionaryUpdateInputVo
|
public class DictionaryUpdateInputVo
|
||||||
{
|
{
|
||||||
|
public int OrderNum { get; set; }
|
||||||
public string? Remark { get; set; }
|
public string? Remark { get; set; }
|
||||||
public string? ListClass { get; set; }
|
public string? ListClass { get; set; }
|
||||||
public string? CssClass { 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)
|
public override async Task<PagedResultDto<DictionaryGetListOutputDto>> GetListAsync(DictionaryGetListInputVo input)
|
||||||
{
|
{
|
||||||
RefAsync<int> total = 0;
|
RefAsync<int> total = 0;
|
||||||
var entities = await _repository._DbQueryable.WhereIF(input.DictType is not null, x => x.DictType == input.DictType)
|
var entities = await _repository._DbQueryable
|
||||||
.WhereIF(input.DictLabel is not null, x => x.DictLabel!.Contains(input.DictLabel!))
|
.WhereIF(input.DictType is not null, x => x.DictType == input.DictType)
|
||||||
.WhereIF(input.State is not null, x => x.State == input.State)
|
.WhereIF(input.DictLabel is not null, x => x.DictLabel!.Contains(input.DictLabel!))
|
||||||
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
|
.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>
|
return new PagedResultDto<DictionaryGetListOutputDto>
|
||||||
{
|
{
|
||||||
TotalCount = total,
|
TotalCount = total,
|
||||||
|
|||||||
Reference in New Issue
Block a user