Files
Yi.Admin/Yi.Furion.Net6/Yi.Framework.Module/WebFirstManager/Impl/TemplateService.cs

29 lines
1.1 KiB
C#
Raw Normal View History

2023-09-27 18:01:10 +08:00
using Furion.DependencyInjection;
2023-09-19 23:48:37 +08:00
using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
2023-09-27 18:01:10 +08:00
using SqlSugar;
using Yi.Framework.Infrastructure.Ddd.Dtos;
2023-09-22 10:25:05 +08:00
using Yi.Framework.Infrastructure.Ddd.Services;
using Yi.Framework.Module.WebFirstManager.Dtos.Template;
using Yi.Framework.Module.WebFirstManager.Entities;
2023-06-10 13:53:00 +08:00
namespace Yi.Framework.Module.WebFirstManager.Impl
{
2023-09-19 23:48:37 +08:00
[ApiDescriptionSettings("WebFirstManager")]
2023-09-22 10:25:05 +08:00
public class TemplateService : CrudAppService<TemplateEntity, TemplateDto, long, TemplateGetListInput>, ITemplateService, IDynamicApiController, ITransient
2023-06-10 13:53:00 +08:00
{
2023-09-27 18:01:10 +08:00
public async override Task<PagedResultDto<TemplateDto>> GetListAsync([FromQuery] TemplateGetListInput input)
{
RefAsync<int> 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<TemplateDto>
{
Total = total,
Items = await MapToGetListOutputDtosAsync(entities)
};
}
2023-06-10 13:53:00 +08:00
}
}