using SqlSugar; using Yi.Framework.Infrastructure.Ddd.Dtos; using Yi.Framework.Infrastructure.Ddd.Services; using Yi.Furion.Application.App.Services; using Yi.Furion.Core.App.Dtos.Trends; using Yi.Furion.Core.App.Entities; namespace Yi.Furion.Application.App.Services.Impl { /// /// Trends服务实现 /// [ApiDescriptionSettings("App")] public class TrendsService : CrudAppService, ITrendsService, IDynamicApiController, ITransient { /// /// 多查 /// /// /// public override async Task> GetListAsync(TrendsGetListInput input) { var entity = await MapToEntityAsync(input); RefAsync total = 0; var entities = await _DbQueryable .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)); } } }