feat: 添加子文章crud

This commit is contained in:
橙子
2023-03-14 22:58:35 +08:00
parent 2824e1325d
commit 295cf5e066
10 changed files with 75 additions and 24 deletions

View File

@@ -14,5 +14,7 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos
public string Name { get; set; }
public long DiscussId { get; set; }
public long ParentId { get; set; }
public List<ArticleAllOutputDto> Children { get; set; }
}
}

View File

@@ -8,7 +8,6 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos
{
public class ArticleUpdateInputVo
{
public long Id { get; set; }
public string Content { get; set; }
public string Name { get; set; }
public long DiscussId { get; set; }

View File

@@ -41,8 +41,8 @@ namespace Yi.BBS.Application.Forum
}
var entities = await _articleRepository.GetTreeAsync(x => x.DiscussId == discussId);
var result = entities.Tile();
var items = _mapper.Map<List<ArticleAllOutputDto>>(result);
//var result = entities.Tile();
var items = _mapper.Map<List<ArticleAllOutputDto>>(entities);
return items;
}