Merge branch 'v2' of https://code.adminnet.top/Admin.NET/Admin.NET.Pro into v2
This commit is contained in:
commit
b5abbf61df
@ -400,7 +400,7 @@ public static class SqlSugarSetup
|
|||||||
entityTypes = entityTypes.Where(u => u.GetCustomAttribute<TenantAttribute>()?.configId.ToString() == config.ConfigId.ToString()).ToList(); // 自定义的库
|
entityTypes = entityTypes.Where(u => u.GetCustomAttribute<TenantAttribute>()?.configId.ToString() == config.ConfigId.ToString()).ToList(); // 自定义的库
|
||||||
|
|
||||||
// 过滤指定实体
|
// 过滤指定实体
|
||||||
if (entityNames != null && entityNames.Count > 0)
|
if (entityNames is { Count: > 0 })
|
||||||
entityTypes = entityTypes.Where(u => entityNames.Contains(u.Name)).ToList();
|
entityTypes = entityTypes.Where(u => entityNames.Contains(u.Name)).ToList();
|
||||||
|
|
||||||
// 删除视图再初始化表结构,防止因为视图导致无法同步表结构
|
// 删除视图再初始化表结构,防止因为视图导致无法同步表结构
|
||||||
@ -441,8 +441,8 @@ public static class SqlSugarSetup
|
|||||||
// 扫描所有继承 AppStartup 的类(排序执行顺序)
|
// 扫描所有继承 AppStartup 的类(排序执行顺序)
|
||||||
var startups = App.EffectiveTypes
|
var startups = App.EffectiveTypes
|
||||||
.Where(u => typeof(AppStartup).IsAssignableFrom(u) && u.IsClass && !u.IsAbstract && !u.IsGenericType && (u.GetMethod("BeforeInitTable") != null || u.GetMethod("AfterInitSeed") != null))
|
.Where(u => typeof(AppStartup).IsAssignableFrom(u) && u.IsClass && !u.IsAbstract && !u.IsGenericType && (u.GetMethod("BeforeInitTable") != null || u.GetMethod("AfterInitSeed") != null))
|
||||||
.OrderByDescending(u => !u.IsDefined(typeof(AppStartupAttribute), true) ? 0 : u.GetCustomAttribute<AppStartupAttribute>(true).Order);
|
.OrderByDescending(u => !u.IsDefined(typeof(AppStartupAttribute), true) ? 0 : u.GetCustomAttribute<AppStartupAttribute>(true)!.Order);
|
||||||
if (startups == null || !startups.Any()) return (startups, 0, 0);
|
if (!startups!.Any()) return (startups, 0, 0);
|
||||||
|
|
||||||
long oldVerion = 0, currentVersion = 0;
|
long oldVerion = 0, currentVersion = 0;
|
||||||
try
|
try
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user