😎1、恢复加删除字段定义 2、重命名租户种子数据特性及修复租户种子初始化
This commit is contained in:
parent
10470b374c
commit
fbd22c6e3b
@ -41,7 +41,7 @@
|
|||||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
|
<PackageReference Include="SqlSugarCore" Version="5.1.4.167" />
|
||||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
||||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
|
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.5" />
|
||||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1081" />
|
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1082" />
|
||||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -7,10 +7,10 @@
|
|||||||
namespace Admin.NET.Core;
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 业务应用种子特性
|
/// 租户种子数据特性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SuppressSniffer]
|
[SuppressSniffer]
|
||||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
|
||||||
public class AppSeedAttribute : Attribute
|
public class TenantSeedAttribute : Attribute
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ public abstract class EntityBase : EntityBaseId, IDeletedFilter
|
|||||||
/// 更新时间
|
/// 更新时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "更新时间")]
|
[SugarColumn(ColumnDescription = "更新时间")]
|
||||||
public virtual DateTime? UpdateTime { get; set; }
|
public virtual DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建者Id
|
/// 创建者Id
|
||||||
@ -81,7 +81,7 @@ public abstract class EntityBase : EntityBaseId, IDeletedFilter
|
|||||||
/// 软删除
|
/// 软删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "软删除")]
|
[SugarColumn(ColumnDescription = "软删除")]
|
||||||
public virtual bool? IsDelete { get; set; } = false;
|
public virtual bool IsDelete { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ internal interface IDeletedFilter
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 软删除
|
/// 软删除
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool? IsDelete { get; set; }
|
bool IsDelete { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -471,7 +471,7 @@ public class SysTenantService : IDynamicApiController, ITransient
|
|||||||
if (string.IsNullOrWhiteSpace(tenant.Connection) || tenant.Connection.Length < 10)
|
if (string.IsNullOrWhiteSpace(tenant.Connection) || tenant.Connection.Length < 10)
|
||||||
throw Oops.Oh(ErrorCodeEnum.Z1004);
|
throw Oops.Oh(ErrorCodeEnum.Z1004);
|
||||||
|
|
||||||
SqlSugarSetup.InitTenantData(_sysTenantRep.AsTenant(), SqlSugarConst.MainConfigId.ToLong());
|
SqlSugarSetup.InitTenantData(_sysTenantRep.AsTenant(), tenant.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -443,7 +443,7 @@ public static class SqlSugarSetup
|
|||||||
{
|
{
|
||||||
// 初始化业务应用种子数据
|
// 初始化业务应用种子数据
|
||||||
var seedDataTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.GetInterfaces().Any(i => i.HasImplementedRawGeneric(typeof(ISqlSugarEntitySeedData<>))))
|
var seedDataTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.GetInterfaces().Any(i => i.HasImplementedRawGeneric(typeof(ISqlSugarEntitySeedData<>))))
|
||||||
.Where(u => u.IsDefined(typeof(AppSeedAttribute), false))
|
.Where(u => u.IsDefined(typeof(TenantSeedAttribute), false))
|
||||||
.OrderBy(u => u.GetCustomAttributes(typeof(SeedDataAttribute), false).Length > 0 ? ((SeedDataAttribute)u.GetCustomAttributes(typeof(SeedDataAttribute), false)[0]).Order : 0).ToList();
|
.OrderBy(u => u.GetCustomAttributes(typeof(SeedDataAttribute), false).Length > 0 ? ((SeedDataAttribute)u.GetCustomAttributes(typeof(SeedDataAttribute), false)[0]).Order : 0).ToList();
|
||||||
if (seedDataTypes == null || seedDataTypes.Count < 1) return;
|
if (seedDataTypes == null || seedDataTypes.Count < 1) return;
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
"jsplumb": "^2.15.6",
|
"jsplumb": "^2.15.6",
|
||||||
"jwchat": "^2.0.3",
|
"jwchat": "^2.0.3",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"md-editor-v3": "^4.19.2",
|
"md-editor-v3": "^4.20.0",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"monaco-editor": "^0.51.0",
|
"monaco-editor": "^0.51.0",
|
||||||
"mqtt": "^4.3.8",
|
"mqtt": "^4.3.8",
|
||||||
@ -60,7 +60,7 @@
|
|||||||
"splitpanes": "^3.1.5",
|
"splitpanes": "^3.1.5",
|
||||||
"vcrontab-3": "^3.3.22",
|
"vcrontab-3": "^3.3.22",
|
||||||
"vform3-builds": "^3.0.10",
|
"vform3-builds": "^3.0.10",
|
||||||
"vue": "^3.5.2",
|
"vue": "^3.5.3",
|
||||||
"vue-clipboard3": "^2.0.0",
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-demi": "0.14.6",
|
"vue-demi": "0.14.6",
|
||||||
"vue-draggable-plus": "^0.5.3",
|
"vue-draggable-plus": "^0.5.3",
|
||||||
@ -89,7 +89,7 @@
|
|||||||
"@typescript-eslint/parser": "^8.4.0",
|
"@typescript-eslint/parser": "^8.4.0",
|
||||||
"@vitejs/plugin-vue": "^5.1.3",
|
"@vitejs/plugin-vue": "^5.1.3",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
||||||
"@vue/compiler-sfc": "^3.5.2",
|
"@vue/compiler-sfc": "^3.5.3",
|
||||||
"code-inspector-plugin": "^0.16.1",
|
"code-inspector-plugin": "^0.16.1",
|
||||||
"eslint": "^9.9.1",
|
"eslint": "^9.9.1",
|
||||||
"eslint-plugin-vue": "^9.28.0",
|
"eslint-plugin-vue": "^9.28.0",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user