feat: 完成子文章的操作

This commit is contained in:
陈淳
2023-03-12 19:49:08 +08:00
parent 1eac218910
commit 8e56667760
40 changed files with 569 additions and 337 deletions

View File

@@ -14,7 +14,7 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
public string Title { get; set; }
public string Types { get; set; }
public string? Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public DateTime? CreateTime { get; set; } = DateTime.Now;
public string Content { get; set; }
public string? Color { get; set; }

View File

@@ -20,5 +20,7 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
public int SeeNum { get; set; }
public string Content { get; set; }
public string? Color { get; set; }
public long PlateId { get; set; }
}
}

View File

@@ -20,5 +20,7 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos
public int SeeNum { get; set; }
public string Content { get; set; }
public string? Color { get; set; }
public long PlateId { get; set; }
}
}

View File

@@ -11,7 +11,6 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
public string Title { get; set; }
public string Types { get; set; }
public string? Introduction { get; set; }
public DateTime? CreateTime { get; set; }
public int AgreeNum { get; set; }
public int SeeNum { get; set; }
public string Content { get; set; }

View File

@@ -40,6 +40,7 @@ namespace Yi.BBS.Application.Forum
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)
.OrderByDescending(x => x.CreateTime)
.ToPageListAsync(input.PageNum, input.PageSize, total);
var items = await MapToGetListOutputDtosAsync(entities);
return new PagedResultDto<DiscussGetListOutputDto>(total, items);

View File

@@ -38,6 +38,7 @@ namespace Yi.BBS.Domain.Forum.Entities
/// <returns></returns>
public static List<ArticleEntity> Tile(this List<ArticleEntity> entities)
{
if(entities is null)return new List<ArticleEntity>();
var result = new List<ArticleEntity>();
return StartRecursion(entities, result);
}

View File

@@ -15,8 +15,8 @@
<PackageReference Include="UAParser" Version="3.1.47" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Yi.Framework.DictionaryManager\Yi.Framework.DictionaryManager.csproj" />
<ProjectReference Include="..\..\..\framework\Yi.Framework.Data\Yi.Framework.Data.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.DictionaryManager\Yi.Framework.DictionaryManager.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.EventBus\Yi.Framework.EventBus.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.FileManager\Yi.Framework.FileManager.csproj" />
<ProjectReference Include="..\..\..\module\Yi.Framework.OperLogManager\Yi.Framework.OperLogManager.csproj" />