fix:修复bug

This commit is contained in:
橙子
2023-03-27 23:15:04 +08:00
parent aef6fe9229
commit 16556ddb84
24 changed files with 109 additions and 31 deletions

View File

@@ -20,7 +20,7 @@ namespace Yi.BBS.Domain.DataSeed
public override async Task<bool> IsInvoker()
{
return !await _repository.IsAnyAsync(x => x.ConfigKey == "ConfigEntity");
return !await _repository.IsAnyAsync(x => x.ConfigKey == "bbs.site.name");
}
public override List<ConfigEntity> GetSeedData()
{

View File

@@ -24,7 +24,7 @@ namespace Yi.BBS.Domain
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
{
//services.AddTransient<StudentManager>();
}
}
}

View File

@@ -6,7 +6,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:19003",
"applicationUrl": "http://localhost:19001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

View File

@@ -16,6 +16,9 @@
</ItemGroup>
<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="nlog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

View File

@@ -8,15 +8,15 @@
"AllowedHosts": "*",
//程序启动地址,*代表全部网口
"StartUrl": "http://*:19003",
"StartUrl": "http://*:19001",
//数据库类型列表
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
"DbConnOptions": {
//"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",
"Url": "DataSource=yi-sqlsugar-dev.db",
//"Url": "server=106.52.94.217;port=3306;database=yi-bbs-dev;user id=root;password=Qz52013142020.",
"DbType": "Sqlite",
"EnabledDbSeed": true,
"EnabledReadWrite": false,
"EnabledCodeFirst": true,

View File

@@ -19,7 +19,7 @@ namespace Yi.BBS.Application.Contracts.Forum.Dtos.Discuss
public string Content { get; set; }
public string? Color { get; set; }
public long plateId { get; set; }
public long PlateId { get; set; }
/// <summary>
/// 默认公开

View File

@@ -110,7 +110,7 @@ namespace Yi.BBS.Application.Forum
/// <returns></returns>
public override async Task<DiscussGetOutputDto> CreateAsync(DiscussCreateInputVo input)
{
if (!await _plateEntityRepository.IsAnyAsync(x => x.Id == input.plateId))
if (!await _plateEntityRepository.IsAnyAsync(x => x.Id == input.PlateId))
{
throw new UserFriendlyException(PlateConst.);
}

View File

@@ -20,7 +20,7 @@ namespace Yi.BBS.Domain.DataSeed
public override async Task<bool> IsInvoker()
{
return !await _repository.IsAnyAsync(x => x.ConfigKey == "ConfigEntity");
return !await _repository.IsAnyAsync(x => x.ConfigKey == "bbs.site.name");
}
public override List<ConfigEntity> GetSeedData()
{

View File

@@ -60,6 +60,6 @@ namespace Yi.BBS.Domain.Forum.Entities
/// 当PermissionType为部分用户时候以下列表中的用户+创建者 代表拥有权限
/// </summary>
[SugarColumn(IsJson = true)]//使用json处理
public List<long> PermissionUserIds { get; set; }
public List<long>? PermissionUserIds { get; set; }
}
}

View File

@@ -24,7 +24,7 @@ namespace Yi.BBS.Domain
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
{
//services.AddTransient<StudentManager>();
}
}
}

View File

@@ -6,7 +6,7 @@
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:19003",
"applicationUrl": "http://localhost:19001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}

View File

@@ -16,6 +16,9 @@
</ItemGroup>
<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="nlog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

View File

@@ -8,15 +8,15 @@
"AllowedHosts": "*",
//程序启动地址,*代表全部网口
"StartUrl": "http://*:19003",
"StartUrl": "http://*:19001",
//数据库类型列表
"DbList": [ "Sqlite", "Mysql", "Sqlserver", "Oracle" ],
"DbConnOptions": {
//"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",
"Url": "DataSource=yi-sqlsugar-dev.db",
//"Url": "server=106.52.94.217;port=3306;database=yi-bbs-dev;user id=root;password=Qz52013142020.",
"DbType": "Sqlite",
"EnabledDbSeed": true,
"EnabledReadWrite": false,
"EnabledCodeFirst": true,