diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000000000000000000000000000000000..94f480de94e1d767531580401cbf13844868e82b
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
\ No newline at end of file
diff --git a/.gitee/ISSUE_TEMPLATE/bug.yml b/.gitee/ISSUE_TEMPLATE/bug.yml
index 7d5b952477546c481702039851e4acc9303a4673..7a47249a9d7b67d237cbc34f96e188e7810d5187 100644
--- a/.gitee/ISSUE_TEMPLATE/bug.yml
+++ b/.gitee/ISSUE_TEMPLATE/bug.yml
@@ -1,6 +1,6 @@
name: 🐞 Bug 反馈
-description: 当你在代码中发现了一个 Bug,导致应用崩溃或抛出异常,或者有一个组件存在问题,或者某些地方看起来不对劲。
-title: "bug: "
+description: 当你在代码中发现了一个 Bug,导致应用崩溃或抛出异常,或者有模块/组件存在问题、某些地方看起来不对劲。
+title: "🐞 "
labels: [bug]
assignees:
- Argo
@@ -55,16 +55,16 @@ body:
声明:请勿以其他任何方式提供复现工程,不符合要求的提交,一律视为无效问题,不予处理。
validations:
required: true
-- type: textarea
- id: version
+- type: dropdown
+ id: netVersion
attributes:
- label: .NET Version
- description: |
- Run `dotnet --version`
- placeholder: |
- [这里粘贴执行结果]
+ label: .NET Version
+ description: Run `dotnet --version`
+ options:
+ - .NET 6.0
+ - .NET 8.0
validations:
- required: false
+ required: true
- type: dropdown
id: version
attributes:
@@ -72,5 +72,6 @@ body:
description: 你当前正在使用的版本/分支?
options:
- next (默认)
- validations:
- required: true
\ No newline at end of file
+ - next-beta
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.gitee/ISSUE_TEMPLATE/feature.yml b/.gitee/ISSUE_TEMPLATE/feature.yml
index 40916bcca555290c3853e4261c5cb18ee4152437..1e370f02dcbfd5121a8c68aa3e8011a1827764ff 100644
--- a/.gitee/ISSUE_TEMPLATE/feature.yml
+++ b/.gitee/ISSUE_TEMPLATE/feature.yml
@@ -1,22 +1,22 @@
name: 💡 功能建议
description: 对本项目提出一个功能建议
-title: "[功能建议]: "
+title: "💡 [功能建议]: "
labels: ["enhancement"]
body:
- type: input
attributes:
- label: 相关组件名称
+ label: 相关模块/组件名称
placeholder: |
- [现有组件填写组件名称,新组件请帮忙想一个组件名称。]
+ [现有组件则填写模块/组件名称,新模块/组件请帮忙想一个模块/组件名称。]
validations:
required: false
- type: textarea
id: related-problem
attributes:
- label: 开发过程中现有的模块或组件无法实现的功能
- description: 请清晰的描述现有模块或组件使用场景,以及开发中遇到的难处。
+ label: 开发过程中现有的模块/组件无法实现的功能
+ description: 请清晰的描述现有模块/组件使用场景,以及开发中遇到的难处。
placeholder: |
- 如果是现有的模块或组件,请先仔细阅读文档或在QQ群内提问,确定想要的功能无法实现后再提交。
+ 如果是现有的模块/组件,请先仔细阅读文档或在QQ群内提问,确定想要的功能无法实现后再提交。
validations:
required: false
- type: textarea
diff --git a/Admin.NET/.editorconfig b/Admin.NET/.editorconfig
index aab71a9f8368ff71a991e385035be40a3e08acb6..e1c1be388ffbf34b82db491438909d4a22aa1741 100644
--- a/Admin.NET/.editorconfig
+++ b/Admin.NET/.editorconfig
@@ -175,4 +175,5 @@ tab_width = 4
dotnet_style_operator_placement_when_wrapping = beginning_of_line
# Add copyright file header
-file_header_template = Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n\n本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n\n不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
\ No newline at end of file
+# file_header_template = Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。\n\n本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。\n\n不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
+file_header_template =
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Application/GlobalUsings.cs b/Admin.NET/Admin.NET.Application/GlobalUsings.cs
index a91dba88f7f6b15e4907f5d472d6bb95ceb00282..c7663610393e0338d317cc2bf631b88f49bc948f 100644
--- a/Admin.NET/Admin.NET.Application/GlobalUsings.cs
+++ b/Admin.NET/Admin.NET.Application/GlobalUsings.cs
@@ -6,20 +6,10 @@
global using Admin.NET.Core;
global using Furion;
-global using Furion.DatabaseAccessor;
-global using Furion.DependencyInjection;
global using Furion.DynamicApiController;
-global using Furion.FriendlyException;
-global using Mapster;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.Extensions.DependencyInjection;
-global using Magicodes.ExporterAndImporter.Core;
-global using Magicodes.ExporterAndImporter.Excel;
-global using SqlSugar;
global using System;
global using System.Collections.Generic;
-global using System.ComponentModel;
-global using System.ComponentModel.DataAnnotations;
-global using System.Threading.Tasks;
-global using System.Linq;
\ No newline at end of file
+global using System.Threading.Tasks;
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
index aa8bf644b9ac85a1cd504f42bb965c408ca28935..565a3e4fa80f382a260dad2652a18b52e6a26703 100644
--- a/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
+++ b/Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
@@ -17,31 +17,33 @@
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
@@ -50,19 +52,19 @@
-
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
diff --git a/Admin.NET/Admin.NET.Core/Attribute/CommandAttribute.cs b/Admin.NET/Admin.NET.Core/Attribute/CommandAttribute.cs
new file mode 100644
index 0000000000000000000000000000000000000000..cd8a9b7745d410f759eecc9e5c6d020a0e4308e8
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Attribute/CommandAttribute.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Admin.NET.Core;
+
+///
+/// 指定属性对应的的指令
+///
+[SuppressSniffer]
+[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
+public class CommandAttribute : Attribute
+{
+ public string Command { get; set; }
+
+ public CommandAttribute(string command)
+ {
+ Command = command;
+ }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Attribute/CommonValidationAttribute.cs b/Admin.NET/Admin.NET.Core/Attribute/CommonValidationAttribute.cs
new file mode 100644
index 0000000000000000000000000000000000000000..e58d08a45da7f88ddf33846f0996a0b7f78b8070
--- /dev/null
+++ b/Admin.NET/Admin.NET.Core/Attribute/CommonValidationAttribute.cs
@@ -0,0 +1,92 @@
+// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
+//
+// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
+//
+// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
+
+namespace Admin.NET.Core;
+
+///
+/// 通用接口参数验证特性类
+///
+[AttributeUsage(AttributeTargets.Property)]
+public class CommonValidationAttribute : ValidationAttribute
+{
+ private readonly Dictionary _conditions;
+ private static readonly Dictionary CompiledConditions = new();
+
+ ///
+ ///
+ /// 条件对参数,长度必须为偶数
+ /// 奇数字符串参数:动态条件
+ /// 偶数字符串参数:提示消息
+ ///
+ ///
+ ///
+ /// public class ModelInput {
+ ///
+ ///
+ /// public string A { get; set; }
+ ///
+ ///
+ /// [CommonValidation(
+ /// "A == 1 && B == null", "当 A == 1时,B不能为空",
+ /// "C == 2 && B == null", "当 C == 2时,B不能为空"
+ /// )]
+ /// public string B { get; set; }
+ /// }
+ ///
+ ///
+ public CommonValidationAttribute(params string[] conditionPairs)
+ {
+ if (conditionPairs.Length % 2 != 0) throw new ArgumentException("条件对必须以偶数个字符串的形式提供。");
+
+ var conditions = new Dictionary();
+ for (int i = 0; i < conditionPairs.Length; i += 2)
+ conditions.Add(conditionPairs[i], conditionPairs[i + 1]);
+
+ _conditions = conditions;
+ }
+
+ protected override ValidationResult IsValid(object value, ValidationContext validationContext)
+ {
+ foreach (var (expr, errorMessage) in _conditions)
+ {
+ var conditionKey = $"{validationContext.ObjectType.FullName}.{expr}";
+ if (!CompiledConditions.TryGetValue(conditionKey, out var condition))
+ {
+ condition = CreateCondition(validationContext.ObjectType, expr);
+ CompiledConditions[conditionKey] = condition;
+ }
+
+ if ((bool)condition.DynamicInvoke(validationContext.ObjectInstance)!)
+ {
+ return new ValidationResult(errorMessage ?? $"[{validationContext.MemberName}]校验失败");
+ }
+ }
+
+ return ValidationResult.Success;
+ }
+
+ private Delegate CreateCondition(Type modelType, string expression)
+ {
+ try
+ {
+ // 创建参数表达式
+ var parameter = Expression.Parameter(typeof(object), "x");
+
+ // 构建 Lambda 表达式
+ var lambda = DynamicExpressionParser.ParseLambda(new[] { Expression.Parameter(modelType, "x") }, typeof(bool), expression);
+
+ // 创建新的 Lambda 表达式,接受 object 参数并调用编译后的表达式
+ var invokeExpression = Expression.Invoke(lambda, Expression.Convert(parameter, modelType));
+ var finalLambda = Expression.Lambda>(invokeExpression, parameter);
+
+ return finalLambda.Compile();
+ }
+ catch (Exception ex)
+ {
+ throw new ArgumentException($"无法解析表达式 '{expression}': {ex.Message}", ex);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs b/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs
index f0d256544506328428abe982a1f127a48e5d824d..e7f3a6efad12d5a5e382e50ac6e0c7c5937ec5ea 100644
--- a/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs
+++ b/Admin.NET/Admin.NET.Core/Const/ClaimConst.cs
@@ -15,7 +15,7 @@ public class ClaimConst
/// 应用Id
///
public const string AppId = "AppId";
-
+
///
/// 用户Id
///
diff --git a/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs b/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs
index cdcdce6d7f5e261e4ac46b845e59bd235833a8fe..1662f3e1912a1c7bfe89e9e27227d7868fa064b9 100644
--- a/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs
+++ b/Admin.NET/Admin.NET.Core/Const/ConfigConst.cs
@@ -70,7 +70,7 @@ public class ConfigConst
/// 域登录验证
///
public const string SysDomainLogin = "sys_domain_login";
-
+
///
/// 租户域名隔离登录验证
///
diff --git a/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs b/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs
index 4caf784930ab87adb728a2d4f415ffa9d3386d20..ea6ed8c21fb5adae171677556b8eac05718b2d2b 100644
--- a/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs
+++ b/Admin.NET/Admin.NET.Core/Const/SqlSugarConst.cs
@@ -25,7 +25,7 @@ public class SqlSugarConst
/// 默认表主键
///
public const string PrimaryKey = "Id";
-
+
///
/// 默认租户Id
///
@@ -35,7 +35,7 @@ public class SqlSugarConst
/// 默认租户Id
///
public const long DefaultTenantId = 1300000000001;
-
+
///
/// 默认租户域名
///
diff --git a/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs b/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs
index aed86c6e92c7386844ccc6ac48cbca637797969b..42af689bed4690b903e051862109e15fa2075b65 100644
--- a/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/EntityBase.cs
@@ -14,6 +14,7 @@ public abstract class EntityBaseId
///
/// 雪花Id
///
+ [Description("Id."), Category("Common Parameters"), DisplayName("Id"), Browsable(false), ReadOnly(true)]
[SugarColumn(ColumnName = "Id", ColumnDescription = "主键Id", IsPrimaryKey = true, IsIdentity = false)]
public virtual long Id { get; set; }
}
@@ -39,8 +40,8 @@ public abstract class EntityBase : EntityBaseId, IDeletedFilter
///
/// 创建者Id
///
- [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)]
[OwnerUser]
+ [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)]
public virtual long? CreateUserId { get; set; }
/////
@@ -92,8 +93,8 @@ public abstract class EntityBaseData : EntityBase, IOrgIdFilter
///
/// 创建者部门Id
///
- [SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true)]
[OwnerOrg]
+ [SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true)]
public virtual long? CreateOrgId { get; set; }
///
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysApp.cs b/Admin.NET/Admin.NET.Core/Entity/SysApp.cs
index 9b4f212a1f38ebdc51595aef81a0076a7035df6f..fc79f2c61d63332501a778fe340b0609044a1627 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysApp.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysApp.cs
@@ -18,49 +18,49 @@ public partial class SysApp : EntityBase
///
[SugarColumn(ColumnDescription = "名称", Length = 32), Required, MaxLength(32)]
public virtual string Name { get; set; }
-
+
///
/// 图标
///
[SugarColumn(ColumnDescription = "图标", Length = 256), Required, MaxLength(256)]
public virtual string? Logo { get; set; }
-
+
///
/// 标题
///
[SugarColumn(ColumnDescription = "标题", Length = 32), MaxLength(32)]
public string Title { get; set; }
-
+
///
/// 副标题
///
[SugarColumn(ColumnDescription = "副标题", Length = 32), MaxLength(32)]
public string ViceTitle { get; set; }
-
+
///
/// 副描述
///
[SugarColumn(ColumnDescription = "副描述", Length = 64), MaxLength(64)]
public string? ViceDesc { get; set; }
-
+
///
/// 水印
///
[SugarColumn(ColumnDescription = "水印", Length = 32), MaxLength(32)]
public string? Watermark { get; set; }
-
+
///
/// 版权信息
///
[SugarColumn(ColumnDescription = "版权信息", Length = 64), MaxLength(64)]
public string? Copyright { get; set; }
-
+
///
/// ICP备案号
///
[SugarColumn(ColumnDescription = "ICP备案号", Length = 32), MaxLength(32)]
public string? Icp { get; set; }
-
+
///
/// 排序
///
@@ -73,7 +73,7 @@ public partial class SysApp : EntityBase
///
[SugarColumn(ColumnDescription = "备注", Length = 256), MaxLength(256)]
public string? Remark { get; set; }
-
+
///
/// 应用租户
///
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs b/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs
index 20905948302bc840c2d3c8cb4e7bd69671923a8c..09990e5622ddc8af6eb64b2971952e96f75b0803 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysCodeGen.cs
@@ -84,7 +84,7 @@ public partial class SysCodeGen : EntityBase
[SugarColumn(ColumnDescription = "业务名", Length = 128)]
[MaxLength(128)]
public string? BusName { get; set; }
-
+
///
/// 表唯一字段配置
///
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs b/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs
index c23e4bf2d34385b0293c0668c22e69ed126e3186..75e6fb87866a3eb3b19ae5a533ef352565823aaf 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysCodeGenConfig.cs
@@ -25,7 +25,7 @@ public partial class SysCodeGenConfig : EntityBase
[SugarColumn(ColumnDescription = "字段名称", Length = 128)]
[Required, MaxLength(128)]
public virtual string ColumnName { get; set; }
-
+
///
/// 主键
///
@@ -52,7 +52,7 @@ public partial class SysCodeGenConfig : EntityBase
[SugarColumn(ColumnDescription = "字段描述", Length = 128)]
[MaxLength(128)]
public string? ColumnComment { get; set; }
-
+
///
/// 数据库中类型(物理类型)
///
@@ -115,7 +115,7 @@ public partial class SysCodeGenConfig : EntityBase
[SugarColumn(ColumnDescription = "外键显示字段.NET类型", Length = 64)]
[MaxLength(64)]
public string? FkColumnNetType { get; set; }
-
+
///
/// 父级字段
///
@@ -129,14 +129,14 @@ public partial class SysCodeGenConfig : EntityBase
[SugarColumn(ColumnDescription = "字典编码", Length = 64)]
[MaxLength(64)]
public string? DictTypeCode { get; set; }
-
+
///
/// 查询方式
///
[SugarColumn(ColumnDescription = "查询方式", Length = 16)]
[MaxLength(16)]
public string? QueryType { get; set; }
-
+
///
/// 是否是查询条件
///
@@ -178,7 +178,7 @@ public partial class SysCodeGenConfig : EntityBase
[SugarColumn(ColumnDescription = "增改", Length = 8)]
[MaxLength(8)]
public string? WhetherAddUpdate { get; set; }
-
+
///
/// 导入
///
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs b/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs
index 09179a48d4c3ec0d930fa218dc56bb4241b63b4c..e587154862ec2484c399ecab6bf0220e66632ed1 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysDictData.cs
@@ -12,7 +12,7 @@ namespace Admin.NET.Core;
[SugarTable(null, "系统字典值表")]
[SysTable]
[SugarIndex("index_{table}_C", nameof(Value), OrderByType.Asc)]
-public partial class SysDictData : EntityBase
+public partial class SysDictData : EntityTenant
{
///
/// 字典类型Id
@@ -34,6 +34,16 @@ public partial class SysDictData : EntityBase
[Required, MaxLength(256)]
public virtual string Value { get; set; }
+ ///
+ /// 编码
+ ///
+ ///
+ /// 即将移除的字段,直接移除该字段并不会从数据库中删除,且该字段之前是必填的,容易导致不能为null的异常,建议先保留,后期再移除
+ ///
+ [Obsolete("即将移除的字段, 已引用的建议尽快移除")]
+ [SugarColumn(ColumnDescription = "编码", Length = 256)]
+ public virtual string? Code { get; set; }
+
///
/// 名称
///
@@ -86,7 +96,7 @@ public partial class SysDictData : EntityBase
///
[SugarColumn(ColumnDescription = "状态")]
public StatusEnum Status { get; set; } = StatusEnum.Enable;
-
+
///
/// 字典类型
///
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs b/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs
index df1d3d2ae5eab66d5cfcb6fff44feacb1cd24ee0..d79ed611a0f489c08a7e67aad3a8c8f203dfb01b 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysDictType.cs
@@ -13,7 +13,7 @@ namespace Admin.NET.Core;
[SysTable]
[SugarIndex("index_{table}_N", nameof(Name), OrderByType.Asc)]
[SugarIndex("index_{table}_C", nameof(Code), OrderByType.Asc)]
-public partial class SysDictType : EntityBase
+public partial class SysDictType : EntityTenant
{
///
/// 名称
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs b/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs
index a8d629b70c94bc73131a050b946dc82a412e59a7..0b6ce8f4752416a61ced4b67989db8c799b01f61 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysLdap.cs
@@ -1,4 +1,4 @@
-// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
+// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
@@ -36,7 +36,7 @@ public class SysLdap : EntityTenant
///
/// 绑定DN(有管理权限制的用户)
///
- [SugarColumn(ColumnDescription = "绑定DN", Length = 32)]
+ [SugarColumn(ColumnDescription = "绑定DN", Length = 128)]
[Required]
public virtual string BindDn { get; set; }
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs b/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs
index 95894bc2da13366a1bd417de2b56b6dee5dc9989..a89a776a89225f3e4a7bc8efc7333fa40fdb4a24 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysMenu.cs
@@ -130,5 +130,5 @@ public partial class SysMenu : EntityBase
/// 菜单子项
///
[SugarColumn(IsIgnore = true)]
- public List Children { get; set; } = new ();
+ public List Children { get; set; } = new();
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysPos.cs b/Admin.NET/Admin.NET.Core/Entity/SysPos.cs
index d20f060c6a497845039eb31cd4fbf295f794d739..1712688bc6f5891dfba34cf507a50d12499fe8c3 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysPos.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysPos.cs
@@ -47,4 +47,10 @@ public partial class SysPos : EntityTenant
///
[SugarColumn(ColumnDescription = "状态")]
public StatusEnum Status { get; set; } = StatusEnum.Enable;
+
+ ///
+ /// 在职人员
+ ///
+ [SugarColumn(IsIgnore = true)]
+ public List UserList { get; set; }
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs
index 943e5d6e694f63406056feee7293287f2c6e499a..a601a3c02013385e1f88f39444f27b87e0c9adfe 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysTenant.cs
@@ -18,7 +18,7 @@ public partial class SysTenant : EntityBase
///
[SugarColumn(ColumnDescription = "应用Id")]
public long AppId { get; set; }
-
+
///
/// 用户Id
///
@@ -88,7 +88,7 @@ public partial class SysTenant : EntityBase
///
[SugarColumn(ColumnDescription = "状态")]
public StatusEnum Status { get; set; } = StatusEnum.Enable;
-
+
///
/// 应用
///
diff --git a/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs b/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs
index 282dadd20bd9a548d1dac99e8453f5d92defa5c2..26fd866fc1737fdc447325e5c72b586228b43208 100644
--- a/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs
+++ b/Admin.NET/Admin.NET.Core/Entity/SysUserLdap.cs
@@ -65,6 +65,7 @@ public class SysUserLdap : EntityTenantId
///
[SugarColumn(ColumnDescription = "检查账户是否已过期")]
public bool AccountExpiresFlag { get; set; } = false;
+
///
/// 密码设置是否永不过期
///
diff --git a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs
index 71f005a8a612bbeb7e9888901974e0a0c6dc8d93..631500d883acad4edb6474dd1f2dbdde6ccd18df 100644
--- a/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs
+++ b/Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs
@@ -222,7 +222,7 @@ public enum ErrorCodeEnum
///
[ErrorCodeItemMetadata("开放接口绑定租户禁止删除")]
D1031,
-
+
///
/// 手机号已存在
///
@@ -324,13 +324,13 @@ public enum ErrorCodeEnum
///
[ErrorCodeItemMetadata("字典状态错误")]
D3005,
-
+
///
/// 字典编码不能以Enum结尾
///
[ErrorCodeItemMetadata("字典编码不能以Enum结尾")]
D3006,
-
+
///
/// 禁止修改枚举类型的字典编码
///
@@ -552,7 +552,7 @@ public enum ErrorCodeEnum
///
[ErrorCodeItemMetadata("租户从库配置错误")]
D1302,
-
+
///
/// 已存在同名的租户域名
///
@@ -654,19 +654,19 @@ public enum ErrorCodeEnum
///
[ErrorCodeItemMetadata("已存在同名功能或同名程序及插件")]
D1900,
-
+
///
/// 禁止删除存在关联租户的应用
///
[ErrorCodeItemMetadata("禁止删除存在关联租户的应用")]
A1001,
-
+
///
/// 禁止删除存在关联菜单的应用
///
[ErrorCodeItemMetadata("禁止删除存在关联菜单的应用")]
A1002,
-
+
///
/// 找不到系统应用
///
diff --git a/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs b/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs
index 38f2a2dcdcb2d225cc2cc109375b3310cdcbd80c..091263532bba006103d9ae73da78d93a2a418662 100644
--- a/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs
+++ b/Admin.NET/Admin.NET.Core/Enum/MenuTypeEnum.cs
@@ -15,7 +15,7 @@ public enum MenuTypeEnum
///
/// 目录
///
-
+
[Description("目录"), Theme("warning")]
Dir = 1,
diff --git a/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs b/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs
index 0372eb0c869d2cb7a7f1384a1217b1e74ae076b3..5c28f6c6cd71f12205ad362ca847fff0251a50d3 100644
--- a/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs
+++ b/Admin.NET/Admin.NET.Core/EventBus/RabbitMQEventSourceStore.cs
@@ -13,27 +13,27 @@ namespace Admin.NET.Core;
///
/// RabbitMQ自定义事件源存储器
///
-public class RabbitMQEventSourceStore : IEventSourceStorer
+public class RabbitMQEventSourceStore : IEventSourceStorer, IDisposable
{
///
/// 内存通道事件源存储器
///
- private readonly Channel _channel;
+ private Channel _channelEventSource;
///
- /// 通道对象
+ /// 路由键
///
- private readonly IModel _model;
+ private string _routeKey;
///
/// 连接对象
///
- private readonly IConnection _connection;
+ private IConnection _connection;
///
- /// 路由键
+ /// 通道对象
///
- private readonly string _routeKey;
+ private IChannel _channel;
///
/// 构造函数
@@ -43,30 +43,41 @@ public class RabbitMQEventSourceStore : IEventSourceStorer
/// 存储器最多能够处理多少消息,超过该容量进入等待写入
public RabbitMQEventSourceStore(ConnectionFactory factory, string routeKey, int capacity)
{
- // 配置通道,设置超出默认容量后进入等待
+ InitEventSourceStore(factory, routeKey, capacity).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// 初始化事件源存储器
+ ///
+ /// 连接工厂
+ /// 路由键
+ /// 存储器最多能够处理多少消息,超过该容量进入等待写入
+ private async Task InitEventSourceStore(ConnectionFactory factory, string routeKey, int capacity)
+ {
+ // 配置通道(超出默认容量后进入等待)
var boundedChannelOptions = new BoundedChannelOptions(capacity)
{
FullMode = BoundedChannelFullMode.Wait
};
-
// 创建有限容量通道
- _channel = Channel.CreateBounded(boundedChannelOptions);
+ _channelEventSource = Channel.CreateBounded(boundedChannelOptions);
// 创建连接
- _connection = factory.CreateConnection();
+ _connection = await factory.CreateConnectionAsync();
+ // 路由键名
_routeKey = routeKey;
// 创建通道
- _model = _connection.CreateModel();
+ _channel = await _connection.CreateChannelAsync();
// 声明路由队列
- _model.QueueDeclare(routeKey, false, false, false, null);
+ await _channel.QueueDeclareAsync(routeKey, false, false, false, null);
// 创建消息订阅者
- var consumer = new EventingBasicConsumer(_model);
+ var consumer = new AsyncEventingBasicConsumer(_channel);
// 订阅消息并写入内存 Channel
- consumer.Received += (ch, ea) =>
+ consumer.ReceivedAsync += async (ch, ea) =>
{
// 读取原始消息
var stringEventSource = Encoding.UTF8.GetString(ea.Body.ToArray());
@@ -75,14 +86,14 @@ public class RabbitMQEventSourceStore : IEventSourceStorer
var eventSource = JSON.Deserialize(stringEventSource);
// 写入内存管道存储器
- _channel.Writer.WriteAsync(eventSource);
+ await _channelEventSource.Writer.WriteAsync(eventSource);
// 确认该消息已被消费
- _model.BasicAck(ea.DeliveryTag, false);
+ await _channel.BasicAckAsync(ea.DeliveryTag, false);
};
// 启动消费者且设置为手动应答消息
- _model.BasicConsume(routeKey, false, consumer);
+ await _channel.BasicConsumeAsync(routeKey, false, consumer);
}
///
@@ -101,12 +112,15 @@ public class RabbitMQEventSourceStore : IEventSourceStorer
{
// 序列化及发布
var data = Encoding.UTF8.GetBytes(JSON.Serialize(source));
- _model.BasicPublish("", _routeKey, null, data);
+ var props = new BasicProperties();
+ props.ContentType = "text/plain";
+ props.DeliveryMode = DeliveryModes.Persistent;
+ await _channel.BasicPublishAsync("", _routeKey, false, props, data);
}
else
{
// 处理动态订阅
- await _channel.Writer.WriteAsync(eventSource, cancellationToken);
+ await _channelEventSource.Writer.WriteAsync(eventSource, cancellationToken);
}
}
@@ -117,7 +131,7 @@ public class RabbitMQEventSourceStore : IEventSourceStorer
/// 事件源对象
public async ValueTask ReadAsync(CancellationToken cancellationToken)
{
- var eventSource = await _channel.Reader.ReadAsync(cancellationToken);
+ var eventSource = await _channelEventSource.Reader.ReadAsync(cancellationToken);
return eventSource;
}
@@ -126,7 +140,7 @@ public class RabbitMQEventSourceStore : IEventSourceStorer
///
public void Dispose()
{
- _model.Dispose();
+ _channel.Dispose();
_connection.Dispose();
}
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs b/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs
index e7faf5a6902e8d629fe368f6442fc69499bedfff..aa2bd6e14a13c8c9c5c34fcb2acdc1797bd6106e 100644
--- a/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs
+++ b/Admin.NET/Admin.NET.Core/Extension/EnumExtension.cs
@@ -174,6 +174,26 @@ public static class EnumExtension
return value.GetType().GetField(value.ToString()!)?.GetCustomAttribute()?.Theme;
}
+ ///
+ /// 获取枚举的Category
+ ///
+ ///
+ ///
+ public static string GetCategory(this object value)
+ {
+ return value.GetType().GetField(value.ToString()!)?.GetCustomAttribute()?.Category;
+ }
+
+ ///
+ /// 获取枚举的Command
+ ///
+ ///
+ ///
+ public static string GetCommand(this object value)
+ {
+ return value.GetType().GetField(value.ToString()!)?.GetCustomAttribute()?.Command;
+ }
+
///
/// 将枚举转成枚举信息集合
///
diff --git a/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs b/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs
index 760c3e385639bca170f1892aa681a676d308d2fa..699422403b211f371263df46864f8ea329787e0c 100644
--- a/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs
+++ b/Admin.NET/Admin.NET.Core/Extension/SqlSugarFilterExtension.cs
@@ -14,14 +14,11 @@ public static class SqlSugarFilterExtension
///
///
///
- private static List GetPropertyNames(this Type type)
- where T : Attribute
+ private static List GetPropertyNames(this Type type) where T : Attribute
{
- var allProperties = type.GetProperties();
-
- var properties = allProperties.Where(x => x.CustomAttributes.Any(a => a.AttributeType == typeof(T)));
-
- return properties.Select(x => x.Name).ToList();
+ return type.GetProperties()
+ .Where(p => p.CustomAttributes.Any(x => x.AttributeType == typeof(T)))
+ .Select(x => x.Name).ToList();
}
///
@@ -34,28 +31,28 @@ public static class SqlSugarFilterExtension
public static LambdaExpression GetConditionExpression(this Type type, List owners) where T : Attribute
{
var fieldNames = type.GetPropertyNames();
-
ParameterExpression parameter = Expression.Parameter(type, "c");
+
Expression right = Expression.Constant(false);
- fieldNames.ForEach(fieldName =>
+ ConstantExpression ownersCollection = Expression.Constant(owners);
+ foreach (var fieldName in fieldNames)
{
- owners.ForEach(owner =>
- {
- var property = type.GetProperty(fieldName);
- Expression temp = Expression.Property(parameter, property);
-
- // 如果属性是可为空的类型,则转换为其基础类型
- var propertyType = property.PropertyType;
- if (Nullable.GetUnderlyingType(propertyType) != null)
- {
- temp = Expression.Convert(temp, Nullable.GetUnderlyingType(propertyType));
- }
-
- Expression left = Expression.Equal(temp, Expression.Constant(owner));
- right = Expression.OrElse(left, right);
- });
- });
- var finalExpression = Expression.Lambda(right, new ParameterExpression[] { parameter });
- return finalExpression;
+ var property = type.GetProperty(fieldName);
+ Expression memberExp = Expression.Property(parameter, property!);
+
+ // 如果属性是可为空的类型,则转换为其基础类型
+ var baseType = Nullable.GetUnderlyingType(property.PropertyType);
+ if (baseType != null) memberExp = Expression.Convert(memberExp, baseType);
+
+ // 调用ownersCollection.Contains方法,检查是否包含属性值
+ right = Expression.OrElse(Expression.Call(
+ typeof(Enumerable),
+ nameof(Enumerable.Contains),
+ new[] { memberExp.Type },
+ ownersCollection,
+ memberExp
+ ), right);
+ }
+ return Expression.Lambda(right, parameter);
}
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs b/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs
index f6f4b87ed977311b6b69ae1add7ddea0c19dca2a..407bbde5cf3b988bce50429ae81093019571487f 100644
--- a/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs
+++ b/Admin.NET/Admin.NET.Core/Job/EnumToDictJob.cs
@@ -4,8 +4,6 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
-using System.Security.Cryptography;
-
namespace Admin.NET.Core;
///
@@ -29,10 +27,10 @@ public class EnumToDictJob : IJob
var originColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine($"【{DateTime.Now}】系统枚举转换字典");
-
+
using var serviceScope = _scopeFactory.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService().CopyNew();
-
+
var sysEnumService = serviceScope.ServiceProvider.GetRequiredService();
var sysDictTypeList = GetDictByEnumType(sysEnumService.GetEnumTypeList());
@@ -43,7 +41,7 @@ public class EnumToDictJob : IJob
sysDictTypeList = sysDictTypeList.Where(x => x.Code.EndsWith("Enum")).ToList();
await SyncEnumToDictInfoAsync(db, sysDictTypeList);
-
+
Console.ForegroundColor = ConsoleColor.Yellow;
try
{
@@ -54,16 +52,17 @@ public class EnumToDictJob : IJob
.ToStorageAsync();
await storageable1.BulkCopyAsync();
await storageable1.BulkUpdateAsync();
-
+
Console.WriteLine($"【{DateTime.Now}】系统枚举类转字典类型数据: 插入{storageable1.InsertList.Count}条, 更新{storageable1.UpdateList.Count}条, 共{storageable1.TotalList.Count}条。");
+ var config = App.GetOptions().ConnectionConfigs.FirstOrDefault(u => SqlSugarConst.MainConfigId.Equals(u.ConfigId));
var storageable2 = await db.Storageable(sysDictTypeList.SelectMany(x => x.Children).ToList())
.WhereColumns(it => new { it.DictTypeId, it.Value })
.SplitUpdate(it => it.Any())
.SplitInsert(_ => true)
.ToStorageAsync();
await storageable2.BulkCopyAsync();
- await storageable2.BulkUpdateAsync(nameof(SysDictData.Label), nameof(SysDictData.Value), nameof(SysDictData.Name));
+ await storageable2.BulkUpdateAsync(nameof(SysDictData.Label), nameof(SysDictData.Value), nameof(SysDictData.Name), (config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(nameof(SysDictData.TenantId)) : nameof(SysDictData.TenantId)));
Console.WriteLine($"【{DateTime.Now}】系统枚举项转字典值数据: 插入{storageable2.InsertList.Count}条, 更新{storageable2.UpdateList.Count}条, 共{storageable2.TotalList.Count}条。");
@@ -82,19 +81,24 @@ public class EnumToDictJob : IJob
}
///
- /// 用于同步枚举转字典旧数据, 后期可删除
+ /// 用于同步枚举转字典数据
///
///
///
- [Obsolete]
private async Task SyncEnumToDictInfoAsync(SqlSugarClient db, List list)
{
var codeList = list.Select(x => x.Code).ToList();
- foreach (var dbDictType in await db.Queryable().Where(x => codeList.Contains(x.Code)).ToListAsync() ?? new())
+ foreach (var dbDictType in await db.Queryable().ClearFilter().Where(x => codeList.Contains(x.Code)).ToListAsync() ?? new())
{
var enumDictType = list.First(x => x.Code == dbDictType.Code);
- if (enumDictType.Id == dbDictType.Id) continue;
-
+ if (enumDictType.Id == dbDictType.Id)
+ {
+ // 字典值表字段改变后每条字典值记录会多出一条,此处用于删除多余的字典值数据
+ var dataValueList = enumDictType.Children.Select(e => e.Value).ToList();
+ await db.Deleteable().Where(x => x.DictTypeId == dbDictType.Id && !dataValueList.Contains(x.Value)).ExecuteCommandAsync();
+ continue;
+ }
+
// 数据不一致则删除
await db.Deleteable().Where(x => x.DictTypeId == dbDictType.Id).ExecuteCommandAsync();
await db.Deleteable().Where(x => x.Id == dbDictType.Id).ExecuteCommandAsync();
@@ -118,7 +122,8 @@ public class EnumToDictJob : IJob
Id = 900000000000 + CommonUtil.GetFixedHashCode(type.TypeName),
Code = type.TypeName,
Name = type.TypeDescribe,
- Remark = type.TypeRemark
+ Remark = type.TypeRemark,
+ TenantId = SqlSugarConst.DefaultTenantId
};
dictType.Children = type.EnumEntities.Select(x => new SysDictData
{
@@ -129,6 +134,7 @@ public class EnumToDictJob : IJob
Value = x.Value.ToString(),
OrderNo = x.Value + OrderOffset,
TagType = x.Theme != "" ? x.Theme : DefaultTagType,
+ TenantId = SqlSugarConst.DefaultTenantId
}).ToList();
list.Add(dictType);
}
diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs
index 9ef9c9091c61112c382d79631a70c041f1befe36..aa90191e896c85067e892623f79fe12c4264ecbd 100644
--- a/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs
+++ b/Admin.NET/Admin.NET.Core/SeedData/SysAppMenuSeedData.cs
@@ -18,6 +18,6 @@ public class SysAppMenuSeedData : ISqlSugarEntitySeedData
public IEnumerable HasData()
{
long id = 1300000000001;
- return new SysMenuSeedData().HasData().Select(m => new SysAppMenu { Id=id++, AppId=SqlSugarConst.DefaultAppId, MenuId=m.Id });
+ return new SysMenuSeedData().HasData().Select(m => new SysAppMenu { Id = id++, AppId = SqlSugarConst.DefaultAppId, MenuId = m.Id });
}
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs
index a16f34af8e62fa35167dce5886c85414b7433ceb..53edcee60dc9ac80f11019e6a504e33f09f7d591 100644
--- a/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs
+++ b/Admin.NET/Admin.NET.Core/SeedData/SysAppSeedData.cs
@@ -19,7 +19,8 @@ public class SysAppSeedData : ISqlSugarEntitySeedData
{
return new[]
{
- new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="Admin.NET", ViceTitle="Admin.NET", ViceDesc="站在巨人肩膀上的 .NET 通用权限开发框架", Watermark="Admin.NET", Copyright="Copyright \u00a9 2021-present Admin.NET All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+ //new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="Admin.NET", ViceTitle="Admin.NET", ViceDesc="站在巨人肩膀上的 .NET 通用权限开发框架", Watermark="Admin.NET", Copyright="Copyright \u00a9 2021-present Admin.NET All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+ new SysApp{ Id=SqlSugarConst.DefaultAppId, Name="默认应用", Logo="/upload/logo.png", Title="OTALL_Mirror", ViceTitle="MTNet", ViceDesc="自动化测试 V3.0", Watermark="OTALL_Mirror", Copyright="Copyright \u00a9 2021-present MTNet All rights reserved.", Icp="省ICP备12345678号", Remark="系统默认应用", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
};
}
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs
index 9fa2dbe67eab22a12c48673b3a9695c40cfa66ec..1920d24a94f9b8c67e7f514b17d87e698ff079fd 100644
--- a/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs
+++ b/Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs
@@ -19,61 +19,61 @@ public class SysDictDataSeedData : ISqlSugarEntitySeedData
{
return new[]
{
- new SysDictData{ Id=1300000000101, DictTypeId=1300000000101, Label="输入框", Value="Input", OrderNo=100, Remark="输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000102, DictTypeId=1300000000101, Label="字典选择器", Value="DictSelector", OrderNo=100, Remark="字典选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000103, DictTypeId=1300000000101, Label="常量选择器", Value="ConstSelector", OrderNo=100, Remark="常量选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000104, DictTypeId=1300000000101, Label="枚举选择器", Value="EnumSelector", OrderNo=100, Remark="枚举选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000105, DictTypeId=1300000000101, Label="树选择器", Value="ApiTreeSelector", OrderNo=100, Remark="树选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000106, DictTypeId=1300000000101, Label="外键", Value="ForeignKey", OrderNo=100, Remark="外键", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000107, DictTypeId=1300000000101, Label="数字输入框", Value="InputNumber", OrderNo=100, Remark="数字输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000108, DictTypeId=1300000000101, Label="时间选择", Value="DatePicker", OrderNo=100, Remark="时间选择", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000109, DictTypeId=1300000000101, Label="文本域", Value="InputTextArea", OrderNo=100, Remark="文本域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000110, DictTypeId=1300000000101, Label="上传", Value="Upload", OrderNo=100, Remark="上传", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000111, DictTypeId=1300000000101, Label="开关", Value="Switch", OrderNo=100, Remark="开关", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+ new SysDictData{ Id=1300000000101, DictTypeId=1300000000101, Label="输入框", Value="Input", OrderNo=100, Remark="输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000102, DictTypeId=1300000000101, Label="字典选择器", Value="DictSelector", OrderNo=100, Remark="字典选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000103, DictTypeId=1300000000101, Label="常量选择器", Value="ConstSelector", OrderNo=100, Remark="常量选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000104, DictTypeId=1300000000101, Label="枚举选择器", Value="EnumSelector", OrderNo=100, Remark="枚举选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000105, DictTypeId=1300000000101, Label="树选择器", Value="ApiTreeSelector", OrderNo=100, Remark="树选择器", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000106, DictTypeId=1300000000101, Label="外键", Value="ForeignKey", OrderNo=100, Remark="外键", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000107, DictTypeId=1300000000101, Label="数字输入框", Value="InputNumber", OrderNo=100, Remark="数字输入框", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000108, DictTypeId=1300000000101, Label="时间选择", Value="DatePicker", OrderNo=100, Remark="时间选择", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000109, DictTypeId=1300000000101, Label="文本域", Value="InputTextArea", OrderNo=100, Remark="文本域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000110, DictTypeId=1300000000101, Label="上传", Value="Upload", OrderNo=100, Remark="上传", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000111, DictTypeId=1300000000101, Label="开关", Value="Switch", OrderNo=100, Remark="开关", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
- new SysDictData{ Id=1300000000201, DictTypeId=1300000000102, Label="等于", Value="==", OrderNo=1, Remark="等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000202, DictTypeId=1300000000102, Label="模糊", Value="like", OrderNo=1, Remark="模糊", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000203, DictTypeId=1300000000102, Label="大于", Value=">", OrderNo=1, Remark="大于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000204, DictTypeId=1300000000102, Label="小于", Value="<", OrderNo=1, Remark="小于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000205, DictTypeId=1300000000102, Label="不等于", Value="!=", OrderNo=1, Remark="不等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000206, DictTypeId=1300000000102, Label="大于等于", Value=">=", OrderNo=1, Remark="大于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000207, DictTypeId=1300000000102, Label="小于等于", Value="<=", OrderNo=1, Remark="小于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000208, DictTypeId=1300000000102, Label="不为空", Value="isNotNull", OrderNo=1, Remark="不为空", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000209, DictTypeId=1300000000102, Label="时间范围", Value="~", OrderNo=1, Remark="时间范围", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+ new SysDictData{ Id=1300000000201, DictTypeId=1300000000102, Label="等于", Value="==", OrderNo=1, Remark="等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000202, DictTypeId=1300000000102, Label="模糊", Value="like", OrderNo=1, Remark="模糊", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000203, DictTypeId=1300000000102, Label="大于", Value=">", OrderNo=1, Remark="大于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000204, DictTypeId=1300000000102, Label="小于", Value="<", OrderNo=1, Remark="小于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000205, DictTypeId=1300000000102, Label="不等于", Value="!=", OrderNo=1, Remark="不等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000206, DictTypeId=1300000000102, Label="大于等于", Value=">=", OrderNo=1, Remark="大于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000207, DictTypeId=1300000000102, Label="小于等于", Value="<=", OrderNo=1, Remark="小于等于", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000208, DictTypeId=1300000000102, Label="不为空", Value="isNotNull", OrderNo=1, Remark="不为空", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000209, DictTypeId=1300000000102, Label="时间范围", Value="~", OrderNo=1, Remark="时间范围", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
- new SysDictData{ Id=1300000000301, DictTypeId=1300000000103, Label="long", Value="long", OrderNo=1, Remark="long", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000302, DictTypeId=1300000000103, Label="string", Value="string", OrderNo=1, Remark="string", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000303, DictTypeId=1300000000103, Label="DateTime", Value="DateTime", OrderNo=1, Remark="DateTime", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000304, DictTypeId=1300000000103, Label="bool", Value="bool", OrderNo=1, Remark="bool", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000305, DictTypeId=1300000000103, Label="int", Value="int", OrderNo=1, Remark="int", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000306, DictTypeId=1300000000103, Label="double", Value="double", OrderNo=1, Remark="double", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000307, DictTypeId=1300000000103, Label="float", Value="float", OrderNo=1, Remark="float", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000308, DictTypeId=1300000000103, Label="decimal", Value="decimal", OrderNo=1, Remark="decimal", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000309, DictTypeId=1300000000103, Label="Guid", Value="Guid", OrderNo=1, Remark="Guid", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000310, DictTypeId=1300000000103, Label="DateTimeOffset", Value="DateTimeOffset", OrderNo=1, Remark="DateTimeOffset", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+ new SysDictData{ Id=1300000000301, DictTypeId=1300000000103, Label="long", Value="long", OrderNo=1, Remark="long", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000302, DictTypeId=1300000000103, Label="string", Value="string", OrderNo=1, Remark="string", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000303, DictTypeId=1300000000103, Label="DateTime", Value="DateTime", OrderNo=1, Remark="DateTime", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000304, DictTypeId=1300000000103, Label="bool", Value="bool", OrderNo=1, Remark="bool", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000305, DictTypeId=1300000000103, Label="int", Value="int", OrderNo=1, Remark="int", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000306, DictTypeId=1300000000103, Label="double", Value="double", OrderNo=1, Remark="double", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000307, DictTypeId=1300000000103, Label="float", Value="float", OrderNo=1, Remark="float", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000308, DictTypeId=1300000000103, Label="decimal", Value="decimal", OrderNo=1, Remark="decimal", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000309, DictTypeId=1300000000103, Label="Guid", Value="Guid", OrderNo=1, Remark="Guid", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000310, DictTypeId=1300000000103, Label="DateTimeOffset", Value="DateTimeOffset", OrderNo=1, Remark="DateTimeOffset", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
- new SysDictData{ Id=1300000000401, DictTypeId=1300000000104, Label="下载压缩包", Value="100", OrderNo=1, Remark="下载压缩包", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000402, DictTypeId=1300000000104, Label="下载压缩包(前端)", Value="111", OrderNo=2, Remark="下载压缩包(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000403, DictTypeId=1300000000104, Label="下载压缩包(后端)", Value="121", OrderNo=3, Remark="下载压缩包(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000404, DictTypeId=1300000000104, Label="生成到本项目", Value="200", OrderNo=4, Remark="生成到本项目", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000405, DictTypeId=1300000000104, Label="生成到本项目(前端)", Value="211", OrderNo=5, Remark="生成到本项目(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000406, DictTypeId=1300000000104, Label="生成到本项目(后端)", Value="221", OrderNo=6, Remark="生成到本项目(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+ new SysDictData{ Id=1300000000401, DictTypeId=1300000000104, Label="下载压缩包", Value="100", OrderNo=1, Remark="下载压缩包", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000402, DictTypeId=1300000000104, Label="下载压缩包(前端)", Value="111", OrderNo=2, Remark="下载压缩包(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000403, DictTypeId=1300000000104, Label="下载压缩包(后端)", Value="121", OrderNo=3, Remark="下载压缩包(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000404, DictTypeId=1300000000104, Label="生成到本项目", Value="200", OrderNo=4, Remark="生成到本项目", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000405, DictTypeId=1300000000104, Label="生成到本项目(前端)", Value="211", OrderNo=5, Remark="生成到本项目(前端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000406, DictTypeId=1300000000104, Label="生成到本项目(后端)", Value="221", OrderNo=6, Remark="生成到本项目(后端)", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
- new SysDictData{ Id=1300000000501, DictTypeId=1300000000105, Label="EntityBaseId【基础实体Id】", Value="EntityBaseId", OrderNo=1, Remark="【基础实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000502, DictTypeId=1300000000105, Label="EntityBase【基础实体】", Value="EntityBase", OrderNo=1, Remark="【基础实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000503, DictTypeId=1300000000105, Label="EntityTenantId【租户实体Id】", Value="EntityTenantId", OrderNo=1, Remark="【租户实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000504, DictTypeId=1300000000105, Label="EntityTenant【租户实体】", Value="EntityTenant", OrderNo=1, Remark="【租户实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000505, DictTypeId=1300000000105, Label="EntityBaseData【业务实体】", Value="EntityBaseData", OrderNo=1, Remark="【业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictData{ Id=1300000000506, DictTypeId=1300000000105, Label="EntityTenantBaseData【租户业务实体】", Value="EntityTenantBaseData", OrderNo=1, Remark="【租户业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+ new SysDictData{ Id=1300000000501, DictTypeId=1300000000105, Label="EntityBaseId【基础实体Id】", Value="EntityBaseId", OrderNo=1, Remark="【基础实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000502, DictTypeId=1300000000105, Label="EntityBase【基础实体】", Value="EntityBase", OrderNo=1, Remark="【基础实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000503, DictTypeId=1300000000105, Label="EntityTenantId【租户实体Id】", Value="EntityTenantId", OrderNo=1, Remark="【租户实体Id】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000504, DictTypeId=1300000000105, Label="EntityTenant【租户实体】", Value="EntityTenant", OrderNo=1, Remark="【租户实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000505, DictTypeId=1300000000105, Label="EntityBaseData【业务实体】", Value="EntityBaseData", OrderNo=1, Remark="【业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000506, DictTypeId=1300000000105, Label="EntityTenantBaseData【租户业务实体】", Value="EntityTenantBaseData", OrderNo=1, Remark="【租户业务实体】", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
- new SysDictData{ Id=1300000000601, DictTypeId=1300000000106, Label="不需要", Value="off", OrderNo=100, Remark="不需要打印支持", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") },
- new SysDictData{ Id=1300000000602, DictTypeId=1300000000106, Label="绑定打印模版", Value="custom", OrderNo=101, Remark="绑定打印模版", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") },
+ new SysDictData{ Id=1300000000601, DictTypeId=1300000000106, Label="不需要", Value="off", OrderNo=100, Remark="不需要打印支持", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000602, DictTypeId=1300000000106, Label="绑定打印模版", Value="custom", OrderNo=101, Remark="绑定打印模版", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
- new SysDictData{ Id=1300000000701, DictTypeId=1300000000201, Label="集团", Value="101", OrderNo=100, Remark="集团", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
- new SysDictData{ Id=1300000000702, DictTypeId=1300000000201, Label="公司", Value="201", OrderNo=101, Remark="公司", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
- new SysDictData{ Id=1300000000703, DictTypeId=1300000000201, Label="部门", Value="301", OrderNo=102, Remark="部门", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
- new SysDictData{ Id=1300000000704, DictTypeId=1300000000201, Label="区域", Value="401", OrderNo=103, Remark="区域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
- new SysDictData{ Id=1300000000705, DictTypeId=1300000000201, Label="组", Value="501", OrderNo=104, Remark="组", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
+ new SysDictData{ Id=1300000000701, DictTypeId=1300000000201, Label="集团", Value="101", OrderNo=100, Remark="集团", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000702, DictTypeId=1300000000201, Label="公司", Value="201", OrderNo=101, Remark="公司", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000703, DictTypeId=1300000000201, Label="部门", Value="301", OrderNo=102, Remark="部门", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000704, DictTypeId=1300000000201, Label="区域", Value="401", OrderNo=103, Remark="区域", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictData{ Id=1300000000705, DictTypeId=1300000000201, Label="组", Value="501", OrderNo=104, Remark="组", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
};
}
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs
index 9117084d7e74a886c5818576f346219246e5b706..837fb99599ed1852f1792f9e1a3bed84063e5e6e 100644
--- a/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs
+++ b/Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs
@@ -19,13 +19,13 @@ public class SysDictTypeSeedData : ISqlSugarEntitySeedData
{
return new[]
{
- new SysDictType{ Id=1300000000101, Name="代码生成控件类型", Code="code_gen_effect_type", OrderNo=100, Remark="代码生成控件类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictType{ Id=1300000000102, Name="代码生成查询类型", Code="code_gen_query_type", OrderNo=101, Remark="代码生成查询类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictType{ Id=1300000000103, Name="代码生成.NET类型", Code="code_gen_net_type", OrderNo=102, Remark="代码生成.NET类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictType{ Id=1300000000104, Name="代码生成方式", Code="code_gen_create_type", OrderNo=103, Remark="代码生成方式", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictType{ Id=1300000000105, Name="代码生成基类", Code="code_gen_base_class", OrderNo=104, Remark="代码生成基类", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
- new SysDictType{ Id=1300000000106, Name="代码生成打印类型", Code="code_gen_print_type", OrderNo=105, Remark="代码生成打印类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00") },
- new SysDictType{ Id=1300000000201, Name="机构类型", Code="org_type", OrderNo=201, Remark="机构类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00") },
+ new SysDictType{ Id=1300000000101, Name="代码生成控件类型", Code="code_gen_effect_type", OrderNo=100, Remark="代码生成控件类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictType{ Id=1300000000102, Name="代码生成查询类型", Code="code_gen_query_type", OrderNo=101, Remark="代码生成查询类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictType{ Id=1300000000103, Name="代码生成.NET类型", Code="code_gen_net_type", OrderNo=102, Remark="代码生成.NET类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictType{ Id=1300000000104, Name="代码生成方式", Code="code_gen_create_type", OrderNo=103, Remark="代码生成方式", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictType{ Id=1300000000105, Name="代码生成基类", Code="code_gen_base_class", OrderNo=104, Remark="代码生成基类", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2022-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictType{ Id=1300000000106, Name="代码生成打印类型", Code="code_gen_print_type", OrderNo=105, Remark="代码生成打印类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-12-04 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
+ new SysDictType{ Id=1300000000201, Name="机构类型", Code="org_type", OrderNo=201, Remark="机构类型", Status=StatusEnum.Enable, CreateTime=DateTime.Parse("2023-02-10 00:00:00"),TenantId=SqlSugarConst.DefaultTenantId },
};
}
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs
index c1e5415b685fa159b99252842b77a9f5cbc7c3f9..0a7bab9aaebd29f8ad1b0324f428de0d5b744301 100644
--- a/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs
+++ b/Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs
@@ -24,6 +24,43 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData
new SysMenu{ Id=1300000000121, Pid=1300000000101, Title="站内信", Path="/dashboard/notice", Name="notice", Component="/home/notice/index", Icon="ele-Bell", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=101 },
// 建议此处Id范围之间放置具体业务应用菜单
+ new SysMenu{ Id=1300000000201, Pid=0, Title="终端测试", Path="/test", Name="test", Component="Layout", Icon="ele-Platform", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=1000 },
+
+ new SysMenu{ Id=1300000000211, Pid=1300000000201, Title="设备管理", Path="/test/device", Name="device", Component="/test/device/index", Icon="ele-Coordinate", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000212, Pid=1300000000211, Title="查询", Permission="device:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000213, Pid=1300000000211, Title="编辑", Permission="device:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000214, Pid=1300000000211, Title="增加", Permission="device:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000215, Pid=1300000000211, Title="删除", Permission="device:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+
+ new SysMenu{ Id=1300000000221, Pid=1300000000201, Title="映射管理", Path="/test/mapping", Name="mapping", Component="/test/mapping/index", Icon="ele-SetUp", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=110 },
+ new SysMenu{ Id=1300000000222, Pid=1300000000221, Title="查询", Permission="mapping:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000223, Pid=1300000000221, Title="编辑", Permission="mapping:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000224, Pid=1300000000221, Title="增加", Permission="mapping:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000225, Pid=1300000000221, Title="删除", Permission="mapping:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+
+ new SysMenu{ Id=1300000000231, Pid=1300000000201, Title="模板管理", Path="/test/template", Name="template", Component="/test/template/index", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=120 },
+ new SysMenu{ Id=1300000000232, Pid=1300000000231, Title="查询", Permission="template:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000233, Pid=1300000000231, Title="编辑", Permission="template:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000234, Pid=1300000000231, Title="增加", Permission="template:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000235, Pid=1300000000231, Title="删除", Permission="template:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+
+ new SysMenu{ Id=1300000000241, Pid=1300000000201, Title="任务管理", Path="/test/task", Name="task", Component="/test/task/index", Icon="ele-List", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=130 },
+ new SysMenu{ Id=1300000000242, Pid=1300000000241, Title="查询", Permission="task:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000243, Pid=1300000000241, Title="编辑", Permission="task:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000244, Pid=1300000000241, Title="增加", Permission="task:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000245, Pid=1300000000241, Title="删除", Permission="task:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+
+ new SysMenu{ Id=1300000000251, Pid=1300000000201, Title="测试监控", Path="/test/testing", Name="testing", Component="/test/testing/index", Icon="ele-Loading", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=140 },
+ new SysMenu{ Id=1300000000252, Pid=1300000000251, Title="查询", Permission="testing:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000253, Pid=1300000000251, Title="编辑", Permission="testing:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000254, Pid=1300000000251, Title="增加", Permission="testing:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000255, Pid=1300000000251, Title="删除", Permission="testing:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+
+ new SysMenu{ Id=1300000000261, Pid=1300000000201, Title="报表统计", Path="/test/report", Name="report", Component="/test/report/index", Icon="ele-PieChart", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=150 },
+ new SysMenu{ Id=1300000000262, Pid=1300000000261, Title="查询", Permission="report:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000263, Pid=1300000000261, Title="编辑", Permission="report:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000264, Pid=1300000000261, Title="增加", Permission="report:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
+ new SysMenu{ Id=1300000000265, Pid=1300000000261, Title="删除", Permission="report:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000000101, Pid=0, Title="系统管理", Path="/system", Name="system", Component="Layout", Icon="ele-Setting", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=10000 },
@@ -98,7 +135,7 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData
new SysMenu{ Id=1310000001315, Pid=1310000001311, Title="删除", Permission="sysApp:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000001316, Pid=1310000001311, Title="授权菜单", Permission="sysApp:grantMenu", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000001317, Pid=1310000001311, Title="切换应用", Permission="sysApp:changeApp", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
-
+
new SysMenu{ Id=1310000000311, Pid=1310000000301, Title="租户管理", Path="/platform/tenant", Name="sysTenant", Component="/system/tenant/index", Icon="ele-School", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000000312, Pid=1310000000311, Title="查询", Permission="sysTenant:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
new SysMenu{ Id=1310000000313, Pid=1310000000311, Title="编辑", Permission="sysTenant:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
diff --git a/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs b/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs
index a9c1d30e1a725d10653a83e385ae730d80732e85..b43ba6caa88e2e20044b71e82e5da8d99d58b6da 100644
--- a/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs
+++ b/Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs
@@ -145,6 +145,44 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData
new SysRoleMenu{ Id=1300000000404, RoleId=1300000000101, MenuId=1310000000713 },
new SysRoleMenu{ Id=1300000000405, RoleId=1300000000101, MenuId=1310000000714 },
new SysRoleMenu{ Id=1300000000455, RoleId=1300000000101, MenuId=1310000000801 },
+ ////// 终端测试
+ new SysRoleMenu{ Id=1300000000901, RoleId=1300000000101, MenuId=1300000000201 },
+ // 设备管理
+ new SysRoleMenu{ Id=1300000000911, RoleId=1300000000101, MenuId=1300000000211 },
+ new SysRoleMenu{ Id=1300000000912, RoleId=1300000000101, MenuId=1300000000212 },
+ new SysRoleMenu{ Id=1300000000913, RoleId=1300000000101, MenuId=1300000000213 },
+ new SysRoleMenu{ Id=1300000000914, RoleId=1300000000101, MenuId=1300000000214 },
+ new SysRoleMenu{ Id=1300000000915, RoleId=1300000000101, MenuId=1300000000215 },
+ // 映射管理
+ new SysRoleMenu{ Id=1300000000921, RoleId=1300000000101, MenuId=1300000000221 },
+ new SysRoleMenu{ Id=1300000000922, RoleId=1300000000101, MenuId=1300000000222 },
+ new SysRoleMenu{ Id=1300000000923, RoleId=1300000000101, MenuId=1300000000223 },
+ new SysRoleMenu{ Id=1300000000924, RoleId=1300000000101, MenuId=1300000000224 },
+ new SysRoleMenu{ Id=1300000000925, RoleId=1300000000101, MenuId=1300000000225 },
+ // 模板配置
+ new SysRoleMenu{ Id=1300000000931, RoleId=1300000000101, MenuId=1300000000231 },
+ new SysRoleMenu{ Id=1300000000932, RoleId=1300000000101, MenuId=1300000000232 },
+ new SysRoleMenu{ Id=1300000000933, RoleId=1300000000101, MenuId=1300000000233 },
+ new SysRoleMenu{ Id=1300000000934, RoleId=1300000000101, MenuId=1300000000234 },
+ new SysRoleMenu{ Id=1300000000935, RoleId=1300000000101, MenuId=1300000000235 },
+ // 任务管理
+ new SysRoleMenu{ Id=1300000000941, RoleId=1300000000101, MenuId=1300000000241 },
+ new SysRoleMenu{ Id=1300000000942, RoleId=1300000000101, MenuId=1300000000242 },
+ new SysRoleMenu{ Id=1300000000943, RoleId=1300000000101, MenuId=1300000000243 },
+ new SysRoleMenu{ Id=1300000000944, RoleId=1300000000101, MenuId=1300000000244 },
+ new SysRoleMenu{ Id=1300000000945, RoleId=1300000000101, MenuId=1300000000245 },
+ // 测试监控
+ new SysRoleMenu{ Id=1300000000951, RoleId=1300000000101, MenuId=1300000000251 },
+ new SysRoleMenu{ Id=1300000000952, RoleId=1300000000101, MenuId=1310000000252 },
+ new SysRoleMenu{ Id=1300000000953, RoleId=1300000000101, MenuId=1300000000253 },
+ new SysRoleMenu{ Id=1300000000954, RoleId=1300000000101, MenuId=1300000000254 },
+ new SysRoleMenu{ Id=1300000000955, RoleId=1300000000101, MenuId=1300000000255 },
+ // 报表统计
+ new SysRoleMenu{ Id=1300000000961, RoleId=1300000000101, MenuId=1300000000261 },
+ new SysRoleMenu{ Id=1300000000962, RoleId=1300000000101, MenuId=1300000000262 },
+ new SysRoleMenu{ Id=1300000000963, RoleId=1300000000101, MenuId=1300000000263 },
+ new SysRoleMenu{ Id=1300000000964, RoleId=1300000000101, MenuId=1300000000264 },
+ new SysRoleMenu{ Id=1300000000965, RoleId=1300000000101, MenuId=1300000000265 },
// 其他角色默认菜单
// 数据面板【1300000000102】
diff --git a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs
index 3aba33c54d0cdf2e188032a89051e02eb655b5b5..b7ca928c5406f07d89761ec3f46748ae12e26c24 100644
--- a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppInput.cs
@@ -1,7 +1,7 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
-//
+//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
-//
+//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core.Service;
@@ -15,56 +15,56 @@ public class SysAppBaseInput
/// 主键Id
///
public virtual long? Id { get; set; }
-
+
///
/// 名称
///
[Required(ErrorMessage = "名称不能为空")]
public virtual string Name { get; set; }
-
+
///
/// 标题
///
[Required(ErrorMessage = "标题不能为空")]
public virtual string Title { get; set; }
-
+
///
/// 副标题
///
[Required(ErrorMessage = "副标题不能为空")]
public virtual string ViceTitle { get; set; }
-
+
///
/// 副描述
///
public virtual string? ViceDesc { get; set; }
-
+
///
/// 水印
///
public virtual string? Watermark { get; set; }
-
+
///
/// 版权信息
///
public virtual string? Copyright { get; set; }
-
+
///
/// ICP备案号
///
public virtual string? Icp { get; set; }
-
+
///
/// 排序
///
[Required(ErrorMessage = "排序不能为空")]
public virtual int? OrderNo { get; set; }
-
+
///
/// 备注
///
public virtual string? Remark { get; set; }
-
+
///
/// 图标
///
@@ -81,43 +81,43 @@ public class AddSysAppInput
///
[Required(ErrorMessage = "Logo不能为空")]
public string Logo { get; set; }
-
+
///
/// 名称
///
[Required(ErrorMessage = "名称不能为空")]
public string Name { get; set; }
-
+
///
/// 标题
///
[Required(ErrorMessage = "标题不能为空")]
public string Title { get; set; }
-
+
///
/// 副标题
///
[Required(ErrorMessage = "副标题不能为空")]
public string ViceTitle { get; set; }
-
+
///
/// 副描述
///
[Required(ErrorMessage = "副描述不能为空")]
public string ViceDesc { get; set; }
-
+
///
/// 水印
///
[Required(ErrorMessage = "水印不能为空")]
public string Watermark { get; set; }
-
+
///
/// 版权信息
///
[Required(ErrorMessage = "版权信息不能为空")]
public string Copyright { get; set; }
-
+
///
/// ICP备案号
///
@@ -129,7 +129,7 @@ public class AddSysAppInput
///
[Required(ErrorMessage = "排序不能为空")]
public int OrderNo { get; set; } = 100;
-
+
///
/// 备注
///
@@ -144,7 +144,7 @@ public class UpdateSysAppInput : AddSysAppInput
{
///
/// 主键Id
- ///
+ ///
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
diff --git a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs
index 207f8f99675441413f93419540d7237280328fb1..e152912fd03629f695fbd4284ccb5cf580bbb5b7 100644
--- a/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Application/Dto/SysAppOutput.cs
@@ -1,7 +1,7 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
-//
+//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
-//
+//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core.Service;
@@ -14,88 +14,88 @@ public class SysAppOutput
///
/// 主键Id
///
- public long Id { get; set; }
-
+ public long Id { get; set; }
+
///
/// 名称
///
public string Name { get; set; }
-
+
///
/// 图标
///
public string? Logo { get; set; }
-
+
///
/// 标题
///
public string Title { get; set; }
-
+
///
/// 副标题
///
- public string ViceTitle { get; set; }
-
+ public string ViceTitle { get; set; }
+
///
/// 副描述
///
- public string? ViceDesc { get; set; }
-
+ public string? ViceDesc { get; set; }
+
///
/// 水印
///
- public string? Watermark { get; set; }
-
+ public string? Watermark { get; set; }
+
///
/// 版权信息
///
- public string? Copyright { get; set; }
-
+ public string? Copyright { get; set; }
+
///
/// ICP备案号
///
- public string? Icp { get; set; }
-
+ public string? Icp { get; set; }
+
///
/// 排序
///
- public int OrderNo { get; set; }
-
+ public int OrderNo { get; set; }
+
///
/// 备注
///
- public string? Remark { get; set; }
-
+ public string? Remark { get; set; }
+
///
/// 创建时间
///
- public DateTime? CreateTime { get; set; }
-
+ public DateTime? CreateTime { get; set; }
+
///
/// 更新时间
///
- public DateTime? UpdateTime { get; set; }
-
+ public DateTime? UpdateTime { get; set; }
+
///
/// 创建者Id
///
- public long? CreateUserId { get; set; }
-
+ public long? CreateUserId { get; set; }
+
///
/// 创建者姓名
///
- public string? CreateUserName { get; set; }
-
+ public string? CreateUserName { get; set; }
+
///
/// 修改者Id
///
- public long? UpdateUserId { get; set; }
-
+ public long? UpdateUserId { get; set; }
+
///
/// 修改者姓名
///
- public string? UpdateUserName { get; set; }
-
+ public string? UpdateUserName { get; set; }
+
///
/// 软删除
///
diff --git a/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs b/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs
index cd37ec3528de7c8fa9ddd1af8370e3206b3c3da1..b0fa772b0c5a0c950fe3b0dbda7513439fb16c2d 100644
--- a/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Application/SysAppService.cs
@@ -1,7 +1,7 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
-//
+//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
-//
+//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core.Service;
@@ -36,12 +36,12 @@ public class SysAppService : IDynamicApiController, ITransient
{
input.Keyword = input.Keyword?.Trim();
var query = _sysAppRep.AsQueryable()
- .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) ||
- u.Title.Contains(input.Keyword) || u.ViceTitle.Contains(input.Keyword) ||
+ .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Name.Contains(input.Keyword) ||
+ u.Title.Contains(input.Keyword) || u.ViceTitle.Contains(input.Keyword) ||
u.ViceDesc.Contains(input.Keyword) || u.Remark.Contains(input.Keyword))
.OrderBy(u => new { u.OrderNo, u.Id })
.Select();
- return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
+ return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
}
///
@@ -67,7 +67,7 @@ public class SysAppService : IDynamicApiController, ITransient
public async Task Update(UpdateSysAppInput input)
{
_ = await _sysAppRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
-
+
var entity = input.Adapt();
await _sysAppRep.AsUpdateable(entity).ExecuteCommandAsync();
}
@@ -82,16 +82,16 @@ public class SysAppService : IDynamicApiController, ITransient
public async Task Delete(BaseIdInput input)
{
var entity = await _sysAppRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
-
+
// 禁止删除存在关联租户的应用
if (await _sysAppRep.Context.Queryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1001);
-
+
// 禁止删除存在关联菜单的应用
if (await _sysAppMenuRep.AsQueryable().AnyAsync(u => u.AppId == input.Id)) throw Oops.Oh(ErrorCodeEnum.A1002);
-
+
await _sysAppRep.DeleteAsync(entity);
}
-
+
///
/// 获取授权菜单 🔖
///
@@ -100,11 +100,11 @@ public class SysAppService : IDynamicApiController, ITransient
[UnitOfWork]
[DisplayName("获取授权菜单")]
[ApiDescriptionSettings(Name = "GrantMenu"), HttpGet]
- public async Task> GrantMenu([FromQuery]long id)
+ public async Task> GrantMenu([FromQuery] long id)
{
- return await _sysAppMenuRep.AsQueryable().Where(u => u.AppId == id).Select(u => u.MenuId).ToListAsync();
+ return await _sysAppMenuRep.AsQueryable().Where(u => u.AppId == id).Select(u => u.MenuId).ToListAsync();
}
-
+
///
/// 授权菜单 🔖
///
@@ -116,11 +116,11 @@ public class SysAppService : IDynamicApiController, ITransient
public async Task GrantMenu(UpdateAppMenuInput input)
{
input.MenuIdList ??= new();
-
+
await _sysAppMenuRep.DeleteAsync(u => u.AppId == input.Id);
-
+
var list = input.MenuIdList.Select(id => new SysAppMenu { AppId = input.Id, MenuId = id }).ToList();
-
+
await _sysAppMenuRep.InsertRangeAsync(list);
// 清除应用下其他模块越权的授权数据,包括角色菜单,用户收藏菜单
@@ -130,7 +130,7 @@ public class SysAppService : IDynamicApiController, ITransient
await _sysAppRep.Context.Deleteable().Where(u => roleIds.Contains(u.RoleId) && !input.MenuIdList.Contains(u.MenuId)).ExecuteCommandAsync();
await _sysAppRep.Context.Deleteable().Where(u => userIds.Contains(u.UserId) && !input.MenuIdList.Contains(u.MenuId)).ExecuteCommandAsync();
}
-
+
///
/// 获取切换应用数据 🔖
///
@@ -159,7 +159,7 @@ public class SysAppService : IDynamicApiController, ITransient
})
};
}
-
+
///
/// 切换应用 🔖
///
@@ -172,10 +172,10 @@ public class SysAppService : IDynamicApiController, ITransient
{
_ = await _sysAppRep.Context.Queryable().FirstAsync(u => u.Id == input.TenantId) ?? throw Oops.Oh(ErrorCodeEnum.Z1003);
_ = await _sysAppRep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
-
+
var user = await _sysAppRep.Context.Queryable().FirstAsync(u => u.Id == _userManager.UserId);
user.TenantId = input.TenantId;
-
+
return await _sysAuthService.CreateToken(user, input.Id);
}
diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs
index 0d0a74692f27f489e15b55f3352d032f7d8cedd9..b03828ce7a4a2610ab1c00b6f4828ad58ddbda98 100644
--- a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs
@@ -24,7 +24,7 @@ public class LoginInput
/// 123456
[Required(ErrorMessage = "密码不能为空"), MinLength(3, ErrorMessage = "密码不能少于3个字符")]
public string Password { get; set; }
-
+
///
/// 租户域名
///
@@ -58,7 +58,7 @@ public class LoginPhoneInput
/// 123456
[Required(ErrorMessage = "验证码不能为空"), MinLength(4, ErrorMessage = "验证码不能少于4个字符")]
public string Code { get; set; }
-
+
///
/// 租户域名
///
diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs
index 73ee10311a387e1fe610f1493e097358e8024391..b6a863f1cf0f7d80c48952b55ce2e3de2b7d8a9a 100644
--- a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs
@@ -66,7 +66,7 @@ public class SysAuthService : IDynamicApiController, ITransient
// 判断是否开启验证码,其校验验证码
if (await _sysConfigService.GetConfigValue(ConfigConst.SysCaptcha) && !_captcha.Validate(input.CodeId.ToString(), input.Code)) throw Oops.Oh(ErrorCodeEnum.D0008);
-
+
// 获取登录租户和用户
var (tenant, user) = await GetLoginUserAndTenant(input.Host, account: input.Account);
@@ -95,7 +95,7 @@ public class SysAuthService : IDynamicApiController, ITransient
return await CreateToken(user, tenant.AppId);
}
-
+
///
/// 获取登录租户和用户
///
@@ -104,20 +104,20 @@ public class SysAuthService : IDynamicApiController, ITransient
///
///
[NonAction]
- public async Task<(SysTenant tenant, SysUser user)> GetLoginUserAndTenant(string host, string account=null, string phone=null)
+ public async Task<(SysTenant tenant, SysUser user)> GetLoginUserAndTenant(string host, string account = null, string phone = null)
{
// 是否租户隔离登录验证
var isTenantHostLogin = await _sysConfigService.GetConfigValue(ConfigConst.SysTenantHostLogin);
-
+
SysUser user;
SysTenant tenant;
-
+
// 租户隔离登录
if (isTenantHostLogin)
{
// 若租户域名为空或为本地域名,则取默认租户域名
if (string.IsNullOrWhiteSpace(host) || host.StartsWith("localhost")) host = SqlSugarConst.DefaultTenantHost;
-
+
// 租户是否存在或已禁用
tenant = await _sysUserRep.ChangeRepository>().GetFirstAsync(u => u.Host == host.ToLower());
if (tenant?.Status != StatusEnum.Enable) throw Oops.Oh(ErrorCodeEnum.Z1003);
@@ -129,7 +129,7 @@ public class SysAuthService : IDynamicApiController, ITransient
.WhereIF(!string.IsNullOrWhiteSpace(phone), u => u.Phone.Equals(phone))
.FirstAsync();
_ = user ?? throw Oops.Oh(ErrorCodeEnum.D0009);
-
+
// 若登录的是超级管理员,则引用当前绑定的租户,这样登陆后操作的租户数据会与该租户关联
if (user.AccountType == AccountTypeEnum.SuperAdmin) user.TenantId = tenant.Id;
}
@@ -141,7 +141,7 @@ public class SysAuthService : IDynamicApiController, ITransient
.WhereIF(!string.IsNullOrWhiteSpace(phone), u => u.Phone.Equals(phone))
.FirstAsync();
_ = user ?? throw Oops.Oh(ErrorCodeEnum.D0009);
-
+
// 租户是否存在或已禁用
tenant = await _sysUserRep.ChangeRepository>().GetFirstAsync(u => u.Id == user.TenantId);
if (tenant?.Status != StatusEnum.Enable) throw Oops.Oh(ErrorCodeEnum.Z1003);
@@ -227,7 +227,7 @@ public class SysAuthService : IDynamicApiController, ITransient
{
// 校验短信验证码
App.GetRequiredService().VerifyCode(new SmsVerifyCodeInput { Phone = input.Phone, Code = input.Code });
-
+
// 获取登录租户和用户
var (tenant, user) = await GetLoginUserAndTenant(input.Host, phone: input.Phone);
diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs
index 8bf69270b7d5f74aba03dba5732590c36f145d59..170deb44aabc8a2ae8603504a412e39c0be85a07 100644
--- a/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysLdapService.cs
@@ -190,7 +190,8 @@ public class SysLdapService : IDynamicApiController, ITransient
try
{
ldapConn.Connect(sysLdap.Host, sysLdap.Port);
- ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, sysLdap.BindPass);
+ string bindPass = CryptogramUtil.Decrypt(sysLdap.BindPass);
+ ldapConn.Bind(sysLdap.Version, sysLdap.BindDn, bindPass);
var ldapSearchResults = ldapConn.Search(sysLdap.BaseDn, LdapConnection.ScopeOne, "(objectClass=*)", null, false);
var userLdapList = new List();
while (ldapSearchResults.HasMore())
@@ -216,7 +217,7 @@ public class SysLdapService : IDynamicApiController, ITransient
{
var sysUserLdap = CreateSysUserLdap(attrs, sysLdap.BindAttrAccount, sysLdap.BindAttrEmployeeId, deptCode);
sysUserLdap.Dn = ldapEntry.Dn;
- sysUserLdap.TenantId=sysLdap.TenantId;
+ sysUserLdap.TenantId = sysLdap.TenantId;
userLdapList.Add(sysUserLdap);
}
}
@@ -265,16 +266,16 @@ public class SysLdapService : IDynamicApiController, ITransient
{
var userLdap = new SysUserLdap
{
- Account = !attrs.ContainsKey(bindAttrAccount) ? null : attrs.GetAttribute(bindAttrAccount)?.StringValue,
- EmployeeId = !attrs.ContainsKey(bindAttrEmployeeId) ? null : attrs.GetAttribute(bindAttrEmployeeId)?.StringValue,
+ Account = attrs.ContainsKey(bindAttrAccount) ? attrs.GetAttribute(bindAttrAccount)?.StringValue : null,
+ EmployeeId = attrs.ContainsKey(bindAttrEmployeeId) ? attrs.GetAttribute(bindAttrEmployeeId)?.StringValue : null,
DeptCode = deptCode,
- UserName = !attrs.ContainsKey("name") ? null : attrs.GetAttribute("name")?.StringValue,
- Mail = !attrs.ContainsKey("mail") ? null : attrs.GetAttribute("mail")?.StringValue
+ UserName = attrs.ContainsKey("name") ? attrs.GetAttribute("name")?.StringValue : null,
+ Mail = attrs.ContainsKey("mail") ? attrs.GetAttribute("mail")?.StringValue : null
};
- var pwdLastSet = !attrs.ContainsKey("pwdLastSet") ? null : attrs.GetAttribute("pwdLastSet")?.StringValue;
- if (!pwdLastSet!.Equals("0")) userLdap.PwdLastSetTime = DateTime.FromFileTime(Convert.ToInt64(pwdLastSet));
- var userAccountControl = !attrs.ContainsKey("userAccountControl") ? null : attrs.GetAttribute("userAccountControl")?.StringValue;
- if ((Convert.ToInt32(userAccountControl) & 0x2) == 0x2) // 检查账户是否已过期(通过检查userAccountControl属性的特定位)
+ var pwdLastSet = attrs.ContainsKey("pwdLastSet") ? attrs.GetAttribute("pwdLastSet")?.StringValue : null;
+ if (pwdLastSet != null && !pwdLastSet.Equals("0")) userLdap.PwdLastSetTime = DateTime.FromFileTime(Convert.ToInt64(pwdLastSet));
+ var userAccountControl = attrs.ContainsKey("userAccountControl") ? attrs.GetAttribute("userAccountControl")?.StringValue : null;
+ if ((Convert.ToInt32(userAccountControl) & 0x2) == 0x2) // 检查账户是否已过期(通过检查userAccountControl属性的特定位)
userLdap.AccountExpiresFlag = true;
if ((Convert.ToInt32(userAccountControl) & 0x10000) == 0x10000) // 检查账户密码设置是否永不过期
userLdap.DontExpiresFlag = true;
@@ -427,9 +428,9 @@ public class SysLdapService : IDynamicApiController, ITransient
{
Pid = org.Id,
Id = YitIdHelper.NextId(),
- Code = !attrs.ContainsKey(sysLdap.BindAttrCode) ? null : new Guid(attrs.GetAttribute(sysLdap.BindAttrCode)?.ByteValue).ToString(),
+ Code = attrs.ContainsKey(sysLdap.BindAttrCode) ? new Guid(attrs.GetAttribute(sysLdap.BindAttrCode)?.ByteValue).ToString() : null,
Level = org.Level + 1,
- Name = !attrs.ContainsKey(sysLdap.BindAttrAccount) ? null : attrs.GetAttribute(sysLdap.BindAttrAccount)?.StringValue,
+ Name = attrs.ContainsKey(sysLdap.BindAttrAccount) ? attrs.GetAttribute(sysLdap.BindAttrAccount)?.StringValue : null,
OrderNo = listOrgs.Count + 1,
};
}
diff --git a/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs b/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs
index eaab128e39f08b78485d176b77c44ea8ab3f2efa..52dbbe2a3ff6ba6e7acc31c6a82703932410e87b 100644
--- a/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Cache/SysCacheService.cs
@@ -4,7 +4,6 @@
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
-using NewLife.Reflection;
using Newtonsoft.Json;
namespace Admin.NET.Core.Service;
@@ -139,7 +138,7 @@ public class SysCacheService : IDynamicApiController, ISingleton
private static string Key(string cacheName, object[] obs)
{
if (obs.OfType().Any()) throw new Exception("缓存参数类型不能能是:TimeSpan类型");
- StringBuilder sb = new (cacheName + ":");
+ StringBuilder sb = new(cacheName + ":");
foreach (var a in obs) sb.Append($"<{KeySingle(a)}>");
return sb.ToString();
}
@@ -311,6 +310,7 @@ public class SysCacheService : IDynamicApiController, ISingleton
var hash = GetHashMap(key);
hash.Add(hashKey, value);
}
+
///
/// 添加或更新一条HASH
///
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs
index d679f60dedd9319f12bead1ddd0244959401f98c..4425c3b8d7ead038fbab59d6d9cd5ba3354fecb5 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/CustomViewEngine.cs
@@ -23,7 +23,7 @@ public class CustomViewEngine : ViewEngineModel
public string NameSpace { get; set; }
public string ClassName { get; set; }
-
+
public string LowerClassName { get; set; }
public string ProjectLastName { get; set; }
@@ -33,39 +33,39 @@ public class CustomViewEngine : ViewEngineModel
public string PrintType { get; set; }
public string PrintName { get; set; }
-
+
public bool HasLikeQuery { get; set; }
-
+
public bool HasJoinTable { get; set; }
-
+
public bool HasEnumField { get; set; }
-
+
public bool HasDictField { get; set; }
-
+
public bool HasConstField { get; set; }
-
+
public bool HasSetStatus => TableField.Any(IsStatus);
-
+
public List TableField { get; set; }
-
+
public List ImportFieldList { get; set; }
-
+
public List UploadFieldList { get; set; }
public List QueryWhetherList { get; set; }
-
+
public List ApiTreeFieldList { get; set; }
-
+
public List DropdownFieldList { get; set; }
-
+
public List AddUpdateFieldList { get; set; }
-
+
public List PrimaryKeyFieldList { get; set; }
-
+
public List TableUniqueConfigList { get; set; }
public List IgnoreUpdateFieldList => TableField.Where(u => u.WhetherAddUpdate == "N" && u.ColumnKey != "True" && u.WhetherCommon != "Y").ToList();
-
+
///
/// 格式化主键查询条件
/// 例: PrimaryKeysFormat(" || ", "u.{0} == input.{0}")
@@ -77,12 +77,13 @@ public class CustomViewEngine : ViewEngineModel
/// 字段首字母小写
///
public string PrimaryKeysFormat(string separator, string format, bool lowerFirstLetter = false) => string.Join(separator, PrimaryKeyFieldList.Select(u => string.Format(format, lowerFirstLetter ? u.LowerPropertyName : u.PropertyName)));
-
+
///
/// 注入的服务
///
///
- public Dictionary InjectServiceMap {
+ public Dictionary InjectServiceMap
+ {
get
{
var injectMap = new Dictionary();
@@ -92,33 +93,33 @@ public class CustomViewEngine : ViewEngineModel
return injectMap;
}
}
-
+
///
/// 服务构造参数
///
- public string InjectServiceArgs => InjectServiceMap.Count > 0 ? ", " +string.Join(", ", InjectServiceMap.Select(kv => $"{kv.Key} {kv.Value}")) : "";
-
+ public string InjectServiceArgs => InjectServiceMap.Count > 0 ? ", " + string.Join(", ", InjectServiceMap.Select(kv => $"{kv.Key} {kv.Value}")) : "";
+
///
/// 判断字段是否为状态字段
///
///
///
public bool IsStatus(CodeGenConfig column) => column.PropertyName == nameof(SysUser.Status) && column.NetType == nameof(StatusEnum);
-
+
///
/// 获取首字母小写字符串
///
///
///
public string ToLowerFirstLetter(string text) => string.IsNullOrWhiteSpace(text) ? text : text[..1].ToLower() + text[1..];
-
+
///
/// 将基本字段类型转为可空类型
///
///
///
public string GetNullableNetType(string netType) => Regex.IsMatch(netType, "(.*?Enum|bool|char|int|long|double|float|decimal)[?]?") ? netType.TrimEnd('?') + "?" : netType;
-
+
///
/// 获取前端表格列定义的属性
///
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs
index d370a7d32d45a60d7cf63cbb9fff4e7aec918858..6ae4b6e1765ab34f089429fa79f5f306c69f4d75 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenConfig.cs
@@ -25,7 +25,7 @@ public class CodeGenConfig
/// 数据库字段名
///
public string ColumnName { get; set; }
-
+
///
/// 主外键
///
@@ -55,12 +55,12 @@ public class CodeGenConfig
/// .NET类型
///
public string NetType { get; set; }
-
+
///
/// 数据库中类型(物理类型)
///
public string DataType { get; set; }
-
+
///
/// 可空.NET类型
///
@@ -95,14 +95,14 @@ public class CodeGenConfig
/// 外键链接字段
///
public string FkLinkColumnName { get; set; }
-
+
///
/// 外键显示字段
///
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string FkDisplayColumns { get; set; }
-
+
///
/// 外键显示字段
///
@@ -117,17 +117,17 @@ public class CodeGenConfig
/// 外键显示字段.NET类型
///
public string FkColumnNetType { get; set; }
-
+
///
/// 父级字段
///
public string PidColumn { get; set; }
-
+
///
/// 字典code
///
public string DictTypeCode { get; set; }
-
+
///
/// 查询方式
///
@@ -162,7 +162,7 @@ public class CodeGenConfig
/// 增改
///
public string WhetherAddUpdate { get; set; }
-
+
///
/// 导入
///
@@ -172,7 +172,7 @@ public class CodeGenConfig
/// 是否是通用字段
///
public string WhetherCommon { get; set; }
-
+
///
/// 排序
///
@@ -182,7 +182,7 @@ public class CodeGenConfig
/// 是否是选择器控件
///
public bool IsSelectorEffectType => Regex.IsMatch(EffectType ?? "", "Selector$|ForeignKey", RegexOptions.IgnoreCase);
-
+
///
/// 去掉尾部Id的属性名
///
@@ -217,7 +217,7 @@ public class CodeGenConfig
return displayPropertyName[..1].ToLower() + displayPropertyName[1..];
}
}
-
+
///
/// 获取外键显示值语句
///
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs
index d29e8d5982ed311e4d3d509257d62d87aba4866f..f57fa4d0ad36aca44c5bd0c8f387ae30560085b8 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/CodeGenInput.cs
@@ -70,19 +70,19 @@ public class CodeGenInput : BasePageInput
/// 功能名(数据库表名称)
///
public virtual string TableComment { get; set; }
-
+
///
/// 表唯一字段
///
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public virtual string TableUniqueConfig { get; set; }
-
+
///
/// 表唯一字段列表
///
public virtual List TableUniqueList { get; set; }
-
+
///
/// 菜单应用分类(应用编码)
///
@@ -144,7 +144,7 @@ public class AddCodeGenInput : CodeGenInput
///
[Required(ErrorMessage = "作者姓名不能为空")]
public override string AuthorName { get; set; }
-
+
/////
///// 类名
/////
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs
index fe8b56b6625585cddd098b2259173f568bc4fe4b..c4bb5e2201c0428819c42ca13dde18ad441c3347 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/ColumnOuput.cs
@@ -45,7 +45,7 @@ public class ColumnOuput
/// .NET字段类型
///
public string NetType { get; set; }
-
+
///
/// 字典编码
///
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs
index 9e119e16b89f64ed3b64734d5610999cd9e29ace..0cac927b7baa3f970e05bab07dbcdf708f63c649 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/Dto/TableUniqueConfigItem.cs
@@ -1,7 +1,7 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
-//
+//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
-//
+//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
namespace Admin.NET.Core.Service;
@@ -15,12 +15,12 @@ public class TableUniqueConfigItem
/// 字段列表
///
public List Columns { get; set; }
-
+
///
/// 描述信息
///
public string Message { get; set; }
-
+
///
/// 格式化查询条件
///
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs
index 795a15635b526c93119c95a68babc0dd1baec6dc..f3b96848a0ed28560741cbe973cc9523eec791e2 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenConfigService.cs
@@ -131,7 +131,7 @@ public class SysCodeGenConfigService : IDynamicApiController, ITransient
codeGenConfig.QueryType = GetDefaultQueryType(codeGenConfig); // QueryTypeEnum.eq.ToString();
codeGenConfig.OrderNo = orderNo;
codeGenConfigs.Add(codeGenConfig);
-
+
if (!string.IsNullOrWhiteSpace(tableColumn.DictTypeCode))
{
codeGenConfig.QueryType = "==";
diff --git a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs
index aedd713b0b12b8a324248c19bb09627b3b481071..75291bf34910585530e891d041d6aa7179aa4dcb 100644
--- a/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs
@@ -15,7 +15,7 @@ namespace Admin.NET.Core.Service;
public class SysCodeGenService : IDynamicApiController, ITransient
{
private readonly ISqlSugarClient _db;
-
+
private readonly SysCodeGenConfigService _codeGenConfigService;
private readonly CodeGenOptions _codeGenOptions;
private readonly IViewEngine _viewEngine;
@@ -152,6 +152,10 @@ public class SysCodeGenService : IDynamicApiController, ITransient
var tableOutputList = new List();
foreach (var item in entityInfos)
{
+ var tbConfigId = item.Type.GetCustomAttribute()?.configId as string ?? SqlSugarConst.MainConfigId;
+ if (item.Type.IsDefined(typeof(LogTableAttribute))) tbConfigId = SqlSugarConst.LogConfigId;
+ if (tbConfigId != configId) continue;
+
var table = dbTableInfos.FirstOrDefault(u => string.Equals(u.Name, (config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(item.DbTableName) : item.DbTableName), StringComparison.CurrentCultureIgnoreCase));
if (table == null) continue;
tableOutputList.Add(new TableOutput
@@ -365,14 +369,14 @@ public class SysCodeGenService : IDynamicApiController, ITransient
}
if (input.GenerateMenu) await AddMenu(input.TableName, input.BusName, input.MenuPid ?? 0, input.MenuIcon, input.PagePath, tableFieldList);
-
+
// 非ZIP压缩返回空
if (!input.GenerateType.StartsWith('1')) return null;
-
+
// 判断是否存在同名称文件
string downloadPath = zipPath + ".zip";
if (File.Exists(downloadPath)) File.Delete(downloadPath);
-
+
// 创建zip文件并返回下载地址
ZipFile.CreateFromDirectory(zipPath, downloadPath);
return new { url = $"{App.HttpContext.Request.Scheme}://{App.HttpContext.Request.Host.Value}/codeGen/{input.TableName}.zip" };
@@ -383,7 +387,6 @@ public class SysCodeGenService : IDynamicApiController, ITransient
///
///
[DisplayName("获取代码生成预览")]
- // ReSharper disable once MemberCanBePrivate.Global
public async Task> Preview(SysCodeGen input)
{
var (_, result) = await RenderTemplateAsync(input);
@@ -413,7 +416,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
ProjectLastName = input.NameSpace!.Split('.').Last(),
LowerClassName = input.TableName![..1].ToLower() + input.TableName[1..],
TableUniqueConfigList = input.TableUniqueList ?? new(),
-
+
TableField = tableFieldList,
QueryWhetherList = tableFieldList.Where(u => u.WhetherQuery == "Y").ToList(),
ImportFieldList = tableFieldList.Where(u => u.WhetherImport == "Y").ToList(),
@@ -422,7 +425,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
AddUpdateFieldList = tableFieldList.Where(u => u.WhetherAddUpdate == "Y").ToList(),
ApiTreeFieldList = tableFieldList.Where(u => u.EffectType == "ApiTreeSelector").ToList(),
DropdownFieldList = tableFieldList.Where(u => u.EffectType is "ForeignKey" or "ApiTreeSelector").ToList(),
-
+
HasJoinTable = joinTableList.Count > 0,
HasDictField = tableFieldList.Any(u => u.EffectType == "DictSelector"),
HasEnumField = tableFieldList.Any(u => u.EffectType == "EnumSelector"),
@@ -445,7 +448,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
builder.AddAssemblyReferenceByName("System.Text.RegularExpressions");
builder.AddAssemblyReferenceByName("System.Collections");
builder.AddAssemblyReferenceByName("System.Linq");
-
+
builder.AddUsing("System.Text.RegularExpressions");
builder.AddUsing("System.Collections.Generic");
builder.AddUsing("System.Linq");
@@ -474,11 +477,11 @@ public class SysCodeGenService : IDynamicApiController, ITransient
var parentMenuPath = "";
var appId = _userManager.AppId;
var appMenuList = new List();
- var lowerClassName = className[..1].ToLower() + className[1..];
+ var lowerClassName = className[..1].ToLower() + className[1..];
if (pid == 0)
{
// 新增目录,并记录Id
- var dirMenu = new SysMenu { Pid=0, Title=title, Type=MenuTypeEnum.Dir, Icon="robot", Path="/" + className.ToLower(), Component="Layout" };
+ var dirMenu = new SysMenu { Pid = 0, Title = title, Type = MenuTypeEnum.Dir, Icon = "robot", Path = "/" + className.ToLower(), Component = "Layout" };
pid = (await _db.Insertable(dirMenu).ExecuteReturnEntityAsync()).Id;
appMenuList.Add(new SysAppMenu { AppId = appId, MenuId = pid });
}
@@ -487,9 +490,9 @@ public class SysCodeGenService : IDynamicApiController, ITransient
var parentMenu = await _db.Queryable().FirstAsync(u => u.Id == pid) ?? throw Oops.Oh(ErrorCodeEnum.D1505);
parentMenuPath = parentMenu.Path;
}
-
+
// 新增菜单,并记录Id
- var rootMenu = new SysMenu { Pid=pid, Title=title, Type=MenuTypeEnum.Menu, Icon=menuIcon, Path=$"{parentMenuPath}/{className.ToLower()}", Component=$"/{pagePath}/{lowerClassName}/index" };
+ var rootMenu = new SysMenu { Pid = pid, Title = title, Type = MenuTypeEnum.Menu, Icon = menuIcon, Path = $"{parentMenuPath}/{className.ToLower()}", Component = $"/{pagePath}/{lowerClassName}/index" };
pid = (await _db.Insertable(rootMenu).ExecuteReturnEntityAsync()).Id;
appMenuList.Add(new SysAppMenu { AppId = appId, MenuId = pid });
@@ -509,13 +512,13 @@ public class SysCodeGenService : IDynamicApiController, ITransient
};
if (tableFieldList.Any(u => u.EffectType is "ForeignKey" or "ApiTreeSelector" && (u.WhetherAddUpdate == "Y" || u.WhetherQuery == "Y")))
- menuList.Add(new SysMenu { Title="下拉列表数据", Permission=$"{lowerClassName}:dropdownData", Pid=pid, Type=MenuTypeEnum.Btn, OrderNo=orderNo+=10});
-
+ menuList.Add(new SysMenu { Title = "下拉列表数据", Permission = $"{lowerClassName}:dropdownData", Pid = pid, Type = MenuTypeEnum.Btn, OrderNo = orderNo += 10 });
+
foreach (var column in tableFieldList.Where(u => u.EffectType == "Upload"))
- menuList.Add(new SysMenu { Title=$"上传{column.ColumnComment}", Permission=$"{lowerClassName}:upload{column.PropertyName}", Pid=pid, Type=MenuTypeEnum.Btn, OrderNo=orderNo+=10});
-
+ menuList.Add(new SysMenu { Title = $"上传{column.ColumnComment}", Permission = $"{lowerClassName}:upload{column.PropertyName}", Pid = pid, Type = MenuTypeEnum.Btn, OrderNo = orderNo += 10 });
+
await _db.Insertable(menuList).ExecuteCommandAsync();
-
+
// 新增应用菜单关联
appMenuList.AddRange(menuList.Select(u => new SysAppMenu { AppId = appId, MenuId = u.Id }));
await _db.Insertable(appMenuList).ExecuteCommandAsync();
diff --git a/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs b/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs
index 51a5d02574b9b0a4e13abab2165bfda452dc83d3..535f17d0f5b8d2baa94a58ca78587fffb648a1b2 100644
--- a/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs
@@ -94,7 +94,7 @@ public class SysConfigService : IDynamicApiController, ITransient
public async Task DeleteConfig(DeleteConfigInput input)
{
var config = await _sysConfigRep.GetFirstAsync(u => u.Id == input.Id);
-
+
// 禁止删除系统参数
if (config.SysFlag == YesNoEnum.Y) throw Oops.Oh(ErrorCodeEnum.D9001);
@@ -115,7 +115,7 @@ public class SysConfigService : IDynamicApiController, ITransient
foreach (var id in ids)
{
var config = await _sysConfigRep.GetFirstAsync(u => u.Id == id);
-
+
// 禁止删除系统参数
if (config.SysFlag == YesNoEnum.Y) continue;
@@ -225,7 +225,7 @@ public class SysConfigService : IDynamicApiController, ITransient
{
var info = await _sysConfigRep.GetFirstAsync(c => c.Code == Config.Code);
if (info == null) continue;
-
+
await _sysConfigRep.AsUpdateable().SetColumns(u => u.Value == Config.Value).Where(u => u.Code == Config.Code).ExecuteCommandAsync();
Remove(info);
}
@@ -248,7 +248,7 @@ public class SysConfigService : IDynamicApiController, ITransient
// var sysCopyright = await GetConfigValue(ConfigConst.SysWebCopyright);
// var sysIcp = await GetConfigValue(ConfigConst.SysWebIcp);
var app = await App.GetRequiredService().GetCurrentAppInfo();
-
+
var sysIcpUrl = await GetConfigValue(ConfigConst.SysWebIcpUrl);
var sysSecondVer = await GetConfigValue(ConfigConst.SysSecondVer);
var sysCaptcha = await GetConfigValue(ConfigConst.SysCaptcha);
@@ -297,7 +297,7 @@ public class SysConfigService : IDynamicApiController, ITransient
// 删除已存在文件
if (File.Exists(oldSysLogoAbsoluteFilePath)) File.Delete(oldSysLogoAbsoluteFilePath);
-
+
// 创建文件夹
var absoluteFileDir = Path.GetDirectoryName(absoluteFilePath);
if (!Directory.Exists(absoluteFileDir)) Directory.CreateDirectory(absoluteFileDir);
@@ -317,7 +317,7 @@ public class SysConfigService : IDynamicApiController, ITransient
app.Icp = input.SysIcp;
await _sysConfigRep.Context.Updateable(app).ExecuteCommandAsync();
-
+
await UpdateConfigValue(ConfigConst.SysWebIcpUrl, input.SysIcpUrl);
await UpdateConfigValue(ConfigConst.SysSecondVer, (input.SysSecondVer ?? false).ToString());
await UpdateConfigValue(ConfigConst.SysCaptcha, (input.SysCaptcha ?? true).ToString());
@@ -329,6 +329,5 @@ public class SysConfigService : IDynamicApiController, ITransient
_sysCacheService.Remove($"{CacheConst.KeyConfig}Remark:{config.Code}");
_sysCacheService.Remove($"{CacheConst.KeyConfig}{config.GroupCode}:GroupWithCache");
_sysCacheService.Remove($"{CacheConst.KeyConfig}{config.Code}");
-
}
}
\ No newline at end of file
diff --git a/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs b/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs
index 88359d698e80f9d98ad95763279508d5d38b2f2a..6b5f4e8d49cd0f5ca711a23cfb64ba789da3ba9b 100644
--- a/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs
+++ b/Admin.NET/Admin.NET.Core/Service/DataBase/SysDatabaseService.cs
@@ -342,7 +342,7 @@ public class SysDatabaseService : IDynamicApiController, ITransient
// 再使用第一个主键排序
query = query.OrderBy(dbColumnInfos.First(u => u.IsPrimarykey).DbColumnName);
var records = ((IEnumerable)await query.ToListAsync()).ToDynamicList();
-
+
// 过滤已存在的数据
if (input.FilterExistingData && records.Any())
{
@@ -372,14 +372,14 @@ public class SysDatabaseService : IDynamicApiController, ITransient
{
string fullName = seedDataTypes[i].FullName;
if ((fullName == doNotFilterFullName1) || (fullName == doNotFilterFullName2)) continue;
-
+
// 删除重复数据
var instance = Activator.CreateInstance(seedDataTypes[i]);
var hasDataMethod = seedDataTypes[i].GetMethod("HasData");
var seedData = ((IEnumerable)hasDataMethod?.Invoke(instance, null))?.Cast