fix 配置处理
This commit is contained in:
@@ -27,7 +27,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.Sys", "Src\Dlhis.Sys\
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.Canteen", "Src\Dlhis.Canteen\Dlhis.Canteen.csproj", "{8317C526-3523-4195-9B19-2F17CFD71927}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.Sys.Api", "Src\Dlhis.User.Api\Dlhis.Sys.Api.csproj", "{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlhis.Sys.Api", "Src\Dlhis.Sys.Api\Dlhis.Sys.Api.csproj", "{85A345C7-913E-4C1B-BE1C-600DE408A02F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -67,10 +67,10 @@ Global
|
||||
{8317C526-3523-4195-9B19-2F17CFD71927}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8317C526-3523-4195-9B19-2F17CFD71927}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8317C526-3523-4195-9B19-2F17CFD71927}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{85A345C7-913E-4C1B-BE1C-600DE408A02F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{85A345C7-913E-4C1B-BE1C-600DE408A02F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{85A345C7-913E-4C1B-BE1C-600DE408A02F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{85A345C7-913E-4C1B-BE1C-600DE408A02F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -83,7 +83,7 @@ Global
|
||||
{9F9BC299-3CDD-4CCE-80CA-5FE57332B1F0} = {57074FD8-1A2F-40C7-8476-001778A3F65D}
|
||||
{925048C9-5940-4B51-8480-4DC908C754A1} = {57074FD8-1A2F-40C7-8476-001778A3F65D}
|
||||
{8317C526-3523-4195-9B19-2F17CFD71927} = {3D8A98C1-83C9-4375-AEAB-4F72AFAF365B}
|
||||
{F294CD7D-0412-48AD-A7E9-E72B9BA0E48E} = {57074FD8-1A2F-40C7-8476-001778A3F65D}
|
||||
{85A345C7-913E-4C1B-BE1C-600DE408A02F} = {57074FD8-1A2F-40C7-8476-001778A3F65D}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {7439494A-E2FD-4FEA-8ABF-74AE57A4A5A0}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Dlhis.Common.Api\Dlhis.Common.Api.csproj" />
|
||||
<ProjectReference Include="..\Dlhis.Entity\Dlhis.Entity.csproj" />
|
||||
<ProjectReference Include="..\Dlhis.User.Api\Dlhis.Sys.Api.csproj" />
|
||||
<ProjectReference Include="..\Dlhis.Sys.Api\Dlhis.Sys.Api.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -9,7 +9,7 @@ WORKDIR /src
|
||||
COPY ["Src/Dlhis.Basic/Dlhis.Basic.csproj", "Src/Dlhis.Basic/"]
|
||||
COPY ["Src/Dlhis.Common.Api/Dlhis.Common.Api.csproj", "Src/Dlhis.Common.Api/"]
|
||||
COPY ["Src/Dlhis.Entity/Dlhis.Entity.csproj", "Src/Dlhis.Entity/"]
|
||||
COPY ["Src/Dlhis.User.Api/Dlhis.Sys.Api.csproj", "Src/Dlhis.User.Api/"]
|
||||
COPY ["Src/Dlhis.Sys.Api/Dlhis.Sys.Api.csproj", "Src/Dlhis.Sys.Api/"]
|
||||
RUN dotnet restore "Src/Dlhis.Basic/Dlhis.Basic.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Src/Dlhis.Basic"
|
||||
|
||||
@@ -8,6 +8,14 @@
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://*:5002"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger/index.html",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_URLS": "http://+:80"
|
||||
},
|
||||
"publishAllPorts": true
|
||||
}
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"FaceConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=face;charset=utf8mb4;",
|
||||
"Timeout": 30,
|
||||
"SlowSqlTime": 1,
|
||||
"EnableSqlLog": true
|
||||
"EnableSqlLog": false
|
||||
},
|
||||
"SwaggerOptions": {
|
||||
"Enable": true,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"SlaveConnectionString": [],
|
||||
"Timeout": 30,
|
||||
"SlowSqlTime": 1,
|
||||
"EnableSqlLog": true
|
||||
"EnableSqlLog": false
|
||||
},
|
||||
"SwaggerOptions": {
|
||||
"Enable": true,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"SlaveConnectionString": [],
|
||||
"Timeout": 30,
|
||||
"SlowSqlTime": 1,
|
||||
"EnableSqlLog": true
|
||||
"EnableSqlLog": false
|
||||
},
|
||||
|
||||
"AllowedHosts": "*",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Dlhis.Entity\Dlhis.Entity.csproj" />
|
||||
<ProjectReference Include="..\Dlhis.User.Api\Dlhis.Sys.Api.csproj" />
|
||||
<ProjectReference Include="..\Dlhis.Sys.Api\Dlhis.Sys.Api.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -8,7 +8,7 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj", "Src/Dlhis.ScheduledTask/"]
|
||||
COPY ["Src/Dlhis.Entity/Dlhis.Entity.csproj", "Src/Dlhis.Entity/"]
|
||||
COPY ["Src/Dlhis.User.Api/Dlhis.Sys.Api.csproj", "Src/Dlhis.User.Api/"]
|
||||
COPY ["Src/Dlhis.Sys.Api/Dlhis.Sys.Api.csproj", "Src/Dlhis.Sys.Api/"]
|
||||
RUN dotnet restore "Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Src/Dlhis.ScheduledTask"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"FaceConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=face;charset=utf8mb4;",
|
||||
"Timeout": 30,
|
||||
"SlowSqlTime": 1,
|
||||
"EnableSqlLog": true
|
||||
"EnableSqlLog": false
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"HangfireConnection": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=hangfire;charset=utf8mb4;Allow User Variables=true;"
|
||||
|
||||
@@ -13,8 +13,10 @@ public class RoleService : IRoleService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
|
||||
public RoleService(IDbContext dbContext)
|
||||
public RoleService(IDbContext dbContext, IConfiguration configuration)
|
||||
{
|
||||
var identityConnection = configuration.GetSection("SqlSugarOptions:IdentityConnectionString").Value;
|
||||
dbContext.Client.CurrentConnectionConfig.ConnectionString = identityConnection;
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,10 @@ public class TenantService : ITenantService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
|
||||
public TenantService(IDbContext dbContext)
|
||||
public TenantService(IDbContext dbContext, IConfiguration configuration)
|
||||
{
|
||||
var identityConnection = configuration.GetSection("SqlSugarOptions:IdentityConnectionString").Value;
|
||||
dbContext.Client.CurrentConnectionConfig.ConnectionString = identityConnection;
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Dlhis.Entity.Sys.Entities;
|
||||
using System.Configuration;
|
||||
using Dlhis.Entity.Sys.Entities;
|
||||
using Dlhis.Sys.Identity.Request;
|
||||
using Dlhis.Sys.Identity.Response;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
@@ -12,8 +13,10 @@ public class UserService : IUserService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
|
||||
public UserService(IDbContext dbContext)
|
||||
public UserService(IDbContext dbContext, IConfiguration configuration)
|
||||
{
|
||||
var identityConnection = configuration.GetSection("SqlSugarOptions:IdentityConnectionString").Value;
|
||||
dbContext.Client.CurrentConnectionConfig.ConnectionString = identityConnection;
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
},
|
||||
"SqlSugarOptions": {
|
||||
"DefaultConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=yikatong;charset=utf8mb4;",
|
||||
"IdentityConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=identity;charset=utf8mb4;",
|
||||
"SlaveConnectionString": [],
|
||||
"Timeout": 30,
|
||||
"SlowSqlTime": 1,
|
||||
"EnableSqlLog": true
|
||||
"EnableSqlLog": false
|
||||
},
|
||||
"SwaggerOptions": {
|
||||
"Enable": true,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"SlaveConnectionString": [],
|
||||
"Timeout": 30,
|
||||
"SlowSqlTime": 1,
|
||||
"EnableSqlLog": true
|
||||
"EnableSqlLog": false
|
||||
},
|
||||
"SwaggerOptions": {
|
||||
"Enable": true,
|
||||
|
||||
Reference in New Issue
Block a user