diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/LoginLogService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/LoginLogService.cs index 8a30b299..f83766e2 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/LoginLogService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/LoginLogService.cs @@ -20,12 +20,12 @@ namespace Yi.Framework.Rbac.Application.Services.RecordLog public override async Task> GetListAsync(LoginLogGetListInputVo input) { RefAsync total = 0; - if (input.Sorting.IsNullOrWhiteSpace()) - input.Sorting = $"{nameof(LoginLogAggregateRoot.CreationTime)} Desc"; + //if (input.Sorting.IsNullOrWhiteSpace()) + // input.Sorting = $"{nameof(LoginLogAggregateRoot.CreationTime)} Desc"; var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.LoginIp), x => x.LoginIp.Contains(input.LoginIp!)) .WhereIF(!string.IsNullOrEmpty(input.LoginUser), x => x.LoginUser!.Contains(input.LoginUser!)) .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) - .OrderBy(input.Sorting) + .OrderByDescending(it => it.CreationTime) //降序 .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); } diff --git a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/OperationLogService.cs b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/OperationLogService.cs index 4e70b58a..5f0ec9e9 100644 --- a/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/OperationLogService.cs +++ b/Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Application/Services/RecordLog/OperationLogService.cs @@ -24,12 +24,12 @@ namespace Yi.Framework.Rbac.Application.Services.RecordLog public override async Task> GetListAsync(OperationLogGetListInputVo input) { RefAsync total = 0; - if (input.Sorting.IsNullOrWhiteSpace()) - input.Sorting = $"{nameof(OperationLogEntity.CreationTime)} Desc"; + //if (input.Sorting.IsNullOrWhiteSpace()) + // input.Sorting = $"{nameof(OperationLogEntity.CreationTime)} Desc"; var entities = await _repository._DbQueryable.WhereIF(!string.IsNullOrEmpty(input.OperUser), x => x.OperUser.Contains(input.OperUser!)) .WhereIF(input.OperType is not null, x => x.OperType == input.OperType) .WhereIF(input.StartTime is not null && input.EndTime is not null, x => x.CreationTime >= input.StartTime && x.CreationTime <= input.EndTime) - .OrderBy(input.Sorting) + .OrderByDescending(it => it.CreationTime) //降序 .ToPageListAsync(input.SkipCount, input.MaxResultCount, total); return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); }