using Furion.DependencyInjection; using Furion.DynamicApiController; using Microsoft.AspNetCore.Mvc; using SqlSugar; using Yi.Framework.Infrastructure.Ddd.Dtos; using Yi.Framework.Infrastructure.Ddd.Services; using Yi.Framework.Module.WebFirstManager.Dtos.Template; using Yi.Framework.Module.WebFirstManager.Entities; namespace Yi.Framework.Module.WebFirstManager.Impl { [ApiDescriptionSettings("WebFirstManager")] public class TemplateService : CrudAppService, ITemplateService, IDynamicApiController, ITransient { public async override Task> GetListAsync([FromQuery] TemplateGetListInput input) { RefAsync total = 0; var entities = await _DbQueryable.WhereIF(input.Name is not null, x => x.Name.Equals(input.Name!)) .ToPageListAsync(input.PageNum, input.PageSize, total); return new PagedResultDto { Total = total, Items = await MapToGetListOutputDtosAsync(entities) }; } } }