feat: 添加文章页面
This commit is contained in:
@@ -64,11 +64,10 @@
|
||||
Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.Forum.DiscussService.GetPlateIdAsync(System.Int64,Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussGetListInputVo)">
|
||||
<member name="M:Yi.BBS.Application.Forum.DiscussService.GetListAsync(Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussGetListInputVo)">
|
||||
<summary>
|
||||
获取改板块下的主题
|
||||
查询
|
||||
</summary>
|
||||
<param name="plateId"></param>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
|
||||
@@ -9,5 +9,8 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
|
||||
{
|
||||
public class DiscussGetListInputVo : PagedAndSortedResultRequestDto
|
||||
{
|
||||
public string? Title { get; set; }
|
||||
|
||||
public long? PlateId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,11 +64,10 @@
|
||||
Discuss应用服务实现,用于参数效验、领域服务业务组合、日志记录、事务处理、账户信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Yi.BBS.Application.Forum.DiscussService.GetPlateIdAsync(System.Int64,Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussGetListInputVo)">
|
||||
<member name="M:Yi.BBS.Application.Forum.DiscussService.GetListAsync(Yi.BBS.Application.Contracts.Forum.Dtos.Discuss.DiscussGetListInputVo)">
|
||||
<summary>
|
||||
获取改板块下的主题
|
||||
查询
|
||||
</summary>
|
||||
<param name="plateId"></param>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
|
||||
@@ -29,17 +29,19 @@ namespace Yi.BBS.Application.Forum
|
||||
private IRepository<PlateEntity> _plateEntityRepository { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取改板块下的主题
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="plateId"></param>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<PagedResultDto<DiscussGetListOutputDto>> GetPlateIdAsync([FromRoute] long plateId, [FromQuery] DiscussGetListInputVo input)
|
||||
public override async Task<PagedResultDto<DiscussGetListOutputDto>> GetListAsync( [FromQuery] DiscussGetListInputVo input)
|
||||
{
|
||||
var entities = await _repository.GetPageListAsync(x => x.PlateId == plateId, input);
|
||||
RefAsync<int> total = 0;
|
||||
var entities = await _DbQueryable
|
||||
.WhereIF(!string.IsNullOrEmpty(input.Title), x => x.Title.Contains(input.Title))
|
||||
.WhereIF(input.PlateId is not null, x => x.PlateId == input.PlateId)
|
||||
.ToPageListAsync(input.PageNum, input.PageSize, total);
|
||||
var items = await MapToGetListOutputDtosAsync(entities);
|
||||
var total = await _repository.CountAsync(x => x.IsDeleted == false);
|
||||
return new PagedResultDto<DiscussGetListOutputDto>(total, items);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user