🐛 修复多库数据库偶先bug

This commit is contained in:
不做码农
2023-06-23 16:36:00 +08:00
parent dea937033e
commit a9547257e6
10 changed files with 35 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System;
using System.Security.Claims;
@@ -9,6 +10,11 @@ namespace Infrastructure
{
public static class App
{
/// <summary>
/// 全局配置文件
/// </summary>
public static OptionsSetting OptionsSetting => CatchOrDefault(() => ServiceProvider?.GetService<IOptions<OptionsSetting>>()?.Value);
/// <summary>
/// 服务提供器
/// </summary>

View File

@@ -1,14 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Infrastructure
namespace Infrastructure
{
/// <summary>
/// 全局静态常量
/// </summary>
public class GlobalConstant
{
/// <summary>
/// 代码生成常量
/// </summary>
public static readonly string CodeGenDbConfig;
/// <summary>
/// 管理员权限
/// </summary>

View File

@@ -19,6 +19,7 @@ namespace Infrastructure
public JwtSettings JwtSettings { get; set; }
public Gen Gen { get; set; }
public List<DbConfigs> DbConfigs { get; set; }
public DbConfigs CodeGenDbConfig { get; set; }
}
/// <summary>
/// 发送邮件数据配置
@@ -94,10 +95,6 @@ namespace Infrastructure
public int DbType { get; set; }
public string ConfigId { get; set; }
public bool IsAutoCloseConnection { get; set; }
/// <summary>
/// 是否代码生成使用库
/// </summary>
public bool IsGenerateDb { get; set; }
public string DbName { get; set; }
}