using SqlSugar; using Yi.Framework.Infrastructure.Ddd.Dtos; using Yi.Framework.Infrastructure.Ddd.Services; using Yi.Furion.Core.Rbac.Dtos.Post; using Yi.Furion.Core.Rbac.Entities; namespace Yi.Furion.Application.Rbac.Services.Impl { /// /// Post服务实现 /// public class PostService : CrudAppService, IPostService, ITransient, IDynamicApiController { public override async Task> GetListAsync(PostGetListInputVo input) { var entity = await MapToEntityAsync(input); RefAsync total = 0; var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.PostName), x => x.PostName.Contains(input.PostName!)) .WhereIF(input.State is not null, x => x.State == input.State) .ToPageListAsync(input.PageNum, input.PageSize, total); return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); } } }