feat:修复bug

This commit is contained in:
陈淳
2023-03-27 19:36:21 +08:00
parent e5460ae3cc
commit aef6fe9229
68 changed files with 140 additions and 443 deletions

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.BBS.Application.Contracts.Exhibition.Dtos.Argee
{
public class AgreeDto
{
public AgreeDto(bool isAgree)
{
IsAgree = isAgree;
if (isAgree)
{
Message = "点赞成功,点赞+1";
}
else
{
Message = "取消点赞,点赞-1";
}
}
public bool IsAgree { get; set; }
public string Message { get; set; }
}
}

View File

@@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile>./ApplicationContractsSwaggerDoc.xml</DocumentationFile>
<DocumentationFile>./$(AssemblyName)SwaggerDoc.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
@@ -14,9 +14,8 @@
<ProjectReference Include="..\..\rbac\Yi.RBAC.Application.Contracts\Yi.RBAC.Application.Contracts.csproj" />
<ProjectReference Include="..\Yi.BBS.Domain.Shared\Yi.BBS.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="ApplicationContractsSwaggerDoc.xml">
<None Update="Yi.BBS.Application.ContractsSwaggerDoc.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

View File

@@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile>./ApplicationSwaggerDoc.xml</DocumentationFile>
<DocumentationFile>./$(AssemblyName)SwaggerDoc.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
@@ -18,7 +18,7 @@
<ProjectReference Include="..\Yi.BBS.Domain\Yi.BBS.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="ApplicationSwaggerDoc.xml">
<None Update="Yi.BBS.ApplicationSwaggerDoc.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

View File

@@ -17,7 +17,7 @@ using Yi.RBAC.Application;
namespace Yi.BBS.Application
{
[DependsOn(
typeof(YiBBSApplicationContractsModule),
typeof(YiBBSDomainModule),
typeof(YiFrameworkAuthJwtBearerModule),

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.BBS.Domain.Shared.Forum.EnumClasses
{
public enum DiscussPermissionTypeEnum
{
/// <summary>
/// 默认:公开
/// </summary>
Public = 0,
/// <summary>
/// 仅自己可见
/// </summary>
Oneself,
/// <summary>
/// 部分用户可见
/// </summary>
User
}
}

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Data.DataSeeds;
using Yi.Framework.Ddd.Repositories;
using Yi.RBAC.Domain.Identity.Entities;
using Yi.RBAC.Domain.Setting.Entities;
using Yi.RBAC.Domain.Shared.Identity.EnumClasses;
namespace Yi.BBS.Domain.DataSeed
{
[AppService(typeof(IDataSeed))]
public class BbsConfigDataSeed : AbstractDataSeed<ConfigEntity>
{
public BbsConfigDataSeed(IRepository<ConfigEntity> repository) : base(repository)
{
}
public override async Task<bool> IsInvoker()
{
return !await _repository.IsAnyAsync(x => x.ConfigKey == "ConfigEntity");
}
public override List<ConfigEntity> GetSeedData()
{
List<ConfigEntity> entities = new List<ConfigEntity>()
{
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.name", ConfigValue = "Yi意社区", ConfigName = "bbs站点名称" },
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.author", ConfigValue = "橙子", ConfigName = "bbs站点作者" },
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.icp", ConfigValue = "2023 意社区 | 赣ICP备xxxxxx号-4", ConfigName = "bbs备案号" },
new ConfigEntity { Id = SnowflakeHelper.NextId, ConfigKey = "bbs.site.bottom", ConfigValue = "YiFramework意框架", ConfigName = "bbs底部信息" },
};
return entities;
}
}
}

View File

@@ -26,6 +26,8 @@ namespace Yi.BBS.Domain.Forum.Entities
public long ParentId { get; set; }
[SugarColumn(IsIgnore =true)]
public List<ArticleEntity> Children { get; set; }
}

View File

@@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile>./DomainSwaggerDoc.xml</DocumentationFile>
<DocumentationFile>./$(AssemblyName)SwaggerDoc.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\GlobalUsings.cs" Link="Properties\GlobalUsings.cs" />
@@ -15,9 +15,8 @@
<ProjectReference Include="..\..\rbac\Yi.RBAC.Domain\Yi.RBAC.Domain.csproj" />
<ProjectReference Include="..\Yi.BBS.Domain.Shared\Yi.BBS.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="DomainSwaggerDoc.xml">
<None Update="Yi.BBS.DomainSwaggerDoc.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

View File

@@ -18,10 +18,11 @@ using System.Text.Json.Serialization;
namespace Yi.BBS.Web
{
[DependsOn(
typeof(YiBBSSqlsugarModule),
typeof(YiFrameworkAspNetCoreModule),
typeof(YiFrameworkCoreAutofacModule),
typeof(YiBBSSqlsugarModule),
typeof(YiBBSApplicationModule)
typeof(YiBBSApplicationModule),
typeof(YiBBSSqlsugarModule)
)]
public class YiBBSWebModule : IStartupModule
{

View File

@@ -14,16 +14,17 @@
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
"DbConnOptions": {
"Url": "DataSource=yi-sqlsugar-dev.db",
"DbType": "Sqlite",
//"Url": "DataSource=yi-sqlsugar-dev.db",
"Url": "server=106.52.94.217;port=3306;database=yi-bbs-dev;user id=root;password=Qz52013142020.",
"DbType": "Mysql",
"EnabledDbSeed": true,
"EnabledReadWrite": false,
"EnabledCodeFirst": true,
"EntityAssembly": null,
"ReadUrl": [
"DataSource=[xxxx]", //sqlite
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //mysql
"Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //sqlserver
"DataSource=[xxxx]", //Sqlite
"server=[xxxx];port=3306;database=[xxxx];user id=[xxxx];password=[xxxx]", //Mysql
"Data Source=[xxxx];Initial Catalog=[xxxx];User ID=[xxxx];password=[xxxx]" //Sqlserver
]
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB