using Yi.RBAC.Application.Contracts.Setting; using Cike.AutoWebApi.Setting; using Yi.RBAC.Application.Contracts.Setting.Dtos; using Yi.RBAC.Domain.Setting.Entities; using Yi.Framework.Ddd.Services; using Yi.Framework.Ddd.Dtos; using SqlSugar; using Yi.RBAC.Application.Contracts.Identity.Dtos; using Yi.RBAC.Domain.Identity.Entities; using Microsoft.AspNetCore.Mvc; namespace Yi.RBAC.Application.Setting { /// /// Config服务实现 /// [AppService] public class ConfigService : CrudAppService, IConfigService, IAutoApiService { /// /// 多查 /// /// /// public override async Task> GetListAsync(ConfigGetListInputVo input) { var entity = await MapToEntityAsync(input); RefAsync total = 0; var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.ConfigKey), x => x.ConfigKey.Contains(input.ConfigKey!)) .WhereIF(!string.IsNullOrEmpty(input.ConfigName), x => x.ConfigName!.Contains(input.ConfigName!)) .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)); } } }