using Yi.Framework.Ddd.Services; using Yi.Framework.Ddd.Dtos; using Yi.Framework.Core.Attributes; using Microsoft.AspNetCore.Mvc; using SqlSugar; using Cike.AutoWebApi.Setting; namespace Yi.Framework.OperLogManager { /// /// OperationLog服务实现 /// //[AppService] public class OperationLogService : CrudAppService, IOperationLogService, IAutoApiService { public override async Task> GetListAsync(OperationLogGetListInputVo input) { var entity = await MapToEntityAsync(input); RefAsync total = 0; var entities = await _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) .ToPageListAsync(input.PageNum, input.PageSize, total); return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); } [NonAction] public override Task UpdateAsync(long id, OperationLogGetListOutputDto input) { return base.UpdateAsync(id, input); } } }