diff --git a/Lib/Tiobon.Core.dll b/Lib/Tiobon.Core.dll index b22a158d..f5d6e3ff 100644 Binary files a/Lib/Tiobon.Core.dll and b/Lib/Tiobon.Core.dll differ diff --git a/Lib/Tiobon.Core.xml b/Lib/Tiobon.Core.xml index 41c324e9..71f1c350 100644 --- a/Lib/Tiobon.Core.xml +++ b/Lib/Tiobon.Core.xml @@ -79,6 +79,179 @@ TOptions + + + 这个Attribute就是使用时候的验证,把它添加到要缓存数据的方法中,即可完成缓存的操作。 + + + + + 缓存绝对过期时间(分钟) + + + + + + + + + + 标签类型 样式 + + + + + 中文描述 + + + + + 图标 + + + + + 图标颜色 + + + + + 视图类属性是字典值时根据属性值获取字典值 + + + + + 数据源字段名 + + + + + 数据源的model类型 + + + + + 数据类型,(1)序列 (2)嵌套model (3)数据项 + + + + + 动态数据的字段名和类型 + + 数据源字段名 + 数据源的类型(typeof(类名)) + + + + 标识 + + (1)序列 (2)嵌套model (3)数据项 + + + + 这个Attribute就是使用时候的验证,把它添加到需要执行事务的方法中,即可完成事务的操作。 + + + + + 事务传播方式 + + + + + 缓存相关常量 + + + + + 用户缓存 + + + + + 用户部门缓存 + + + + + 菜单缓存 + + + + + 菜单 + + + + + 权限缓存 + + + + + 接口路由 + + + + + 系统配置 + + + + + 查询过滤器缓存 + + + + + 机构Id集合缓存 + + + + + 最大角色数据范围缓存 + + + + + 验证码缓存 + + + + + 所有缓存关键字集合 + + + + + 定时任务缓存 + + + + + 在线用户缓存 + + + + + 常量下拉框 + + + + + swagger登录缓存 + + + + + + + + + + 默认Log数据库标识 + + 内部只用于初始化使用 @@ -96,6 +269,26 @@ 配置对象 + + + + + + + + 默认:如果当前没有事务,就新建一个事务,如果已存在一个事务中,加入到这个事务中。 + + + + + 使用当前事务,如果没有当前事务,就抛出异常 + + + + + 以嵌套事务方式执行 + + 获取项目程序集,排除所有的系统程序集(Microsoft.***、System.***等)、Nuget下载包 diff --git a/Tiobon.Core.Common/Attribute/CachingAttribute.cs b/Tiobon.Core.Common/Attribute/CachingAttribute.cs deleted file mode 100644 index fb244d1d..00000000 --- a/Tiobon.Core.Common/Attribute/CachingAttribute.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Tiobon.Core.Common; - -/// -/// 这个Attribute就是使用时候的验证,把它添加到要缓存数据的方法中,即可完成缓存的操作。 -/// -[AttributeUsage(AttributeTargets.Method, Inherited = true)] -public class CachingAttribute : Attribute -{ - /// - /// 缓存绝对过期时间(分钟) - /// - public int AbsoluteExpiration { get; set; } = 30; - -} diff --git a/Tiobon.Core.Common/Attribute/EnumAttachedAttribute.cs b/Tiobon.Core.Common/Attribute/EnumAttachedAttribute.cs deleted file mode 100644 index ef456cd8..00000000 --- a/Tiobon.Core.Common/Attribute/EnumAttachedAttribute.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace Tiobon.Core.Common; - - -[AttributeUsage(AttributeTargets.Field, Inherited = true)] -public class EnumAttachedAttribute : Attribute -{ - /// - /// 标签类型 样式 - /// - public string TagType { get; set; } - /// - /// 中文描述 - /// - public string Description { get; set; } - - /// - /// 图标 - /// - public string Icon { get; set; } - - /// - /// 图标颜色 - /// - public string IconColor { get; set; } -} diff --git a/Tiobon.Core.Common/Attribute/ExportDatatAttribute.cs b/Tiobon.Core.Common/Attribute/ExportDatatAttribute.cs deleted file mode 100644 index 6090b510..00000000 --- a/Tiobon.Core.Common/Attribute/ExportDatatAttribute.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace Tiobon.Core.Common; -/// -/// 视图类属性是字典值时根据属性值获取字典值 -/// -[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)] -public sealed class ExportDatatAttribute : Attribute -{ - /// - /// 数据源字段名 - /// - public string ExportDataName { get; } - - /// - /// 数据源的model类型 - /// - public Type ExportDataType { get; } - - /// - /// 数据类型,(1)序列 (2)嵌套model (3)数据项 - /// - public string ExportDataFlag { get; } - - /// - /// 动态数据的字段名和类型 - /// - /// 数据源字段名 - /// 数据源的类型(typeof(类名)) - public ExportDatatAttribute(string name, Type type) - { - ExportDataName = name; - ExportDataType = type; - } - - /// - /// 标识 - /// - /// (1)序列 (2)嵌套model (3)数据项 - public ExportDatatAttribute(string flag) - { - ExportDataFlag = flag; - } -} \ No newline at end of file diff --git a/Tiobon.Core.Common/Attribute/UseTranAttribute.cs b/Tiobon.Core.Common/Attribute/UseTranAttribute.cs deleted file mode 100644 index 63a9d53d..00000000 --- a/Tiobon.Core.Common/Attribute/UseTranAttribute.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Tiobon.Core.Common.DB; - -namespace Tiobon.Core.Common; - -/// -/// 这个Attribute就是使用时候的验证,把它添加到需要执行事务的方法中,即可完成事务的操作。 -/// -[AttributeUsage(AttributeTargets.Method, Inherited = true)] -public class UseTranAttribute : Attribute -{ - /// - /// 事务传播方式 - /// - public Propagation Propagation { get; set; } = Propagation.Required; -} \ No newline at end of file diff --git a/Tiobon.Core.Common/Caches/Caching.cs b/Tiobon.Core.Common/Caches/Caching.cs index 4635e7db..5cca5033 100644 --- a/Tiobon.Core.Common/Caches/Caching.cs +++ b/Tiobon.Core.Common/Caches/Caching.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Caching.Distributed; using Newtonsoft.Json; using System.Text; -using Tiobon.Core.Common.Const; +using Tiobon.Core.Const; namespace Tiobon.Core.Common.Caches; diff --git a/Tiobon.Core.Common/Const/CacheConst.cs b/Tiobon.Core.Common/Const/CacheConst.cs deleted file mode 100644 index 71c7ab4b..00000000 --- a/Tiobon.Core.Common/Const/CacheConst.cs +++ /dev/null @@ -1,87 +0,0 @@ -namespace Tiobon.Core.Common.Const; - -/// -/// 缓存相关常量 -/// -public class CacheConst -{ - /// - /// 用户缓存 - /// - public const string KeyUser = "user:"; - - /// - /// 用户部门缓存 - /// - public const string KeyUserDepart = "userDepart:"; - - /// - /// 菜单缓存 - /// - public const string KeyMenu = "menu:"; - - /// - /// 菜单 - /// - public const string KeyPermissions = "permissions"; - - /// - /// 权限缓存 - /// - public const string KeyPermission = "permission:"; - - /// - /// 接口路由 - /// - public const string KeyModules = "modules"; - - /// - /// 系统配置 - /// - public const string KeySystemConfig = "sysConfig"; - - /// - /// 查询过滤器缓存 - /// - public const string KeyQueryFilter = "queryFilter:"; - - /// - /// 机构Id集合缓存 - /// - public const string KeyOrgIdList = "org:"; - - /// - /// 最大角色数据范围缓存 - /// - public const string KeyMaxDataScopeType = "maxDataScopeType:"; - - /// - /// 验证码缓存 - /// - public const string KeyVerCode = "verCode:"; - - /// - /// 所有缓存关键字集合 - /// - public const string KeyAll = "keys"; - - /// - /// 定时任务缓存 - /// - public const string KeyTimer = "timer:"; - - /// - /// 在线用户缓存 - /// - public const string KeyOnlineUser = "onlineuser:"; - - /// - /// 常量下拉框 - /// - public const string KeyConstSelector = "selector:"; - - /// - /// swagger登录缓存 - /// - public const string SwaggerLogin = "swaggerLogin:"; -} \ No newline at end of file diff --git a/Tiobon.Core.Common/Const/SqlSugarConst.cs b/Tiobon.Core.Common/Const/SqlSugarConst.cs deleted file mode 100644 index 7475cfbd..00000000 --- a/Tiobon.Core.Common/Const/SqlSugarConst.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Tiobon.Core.Common.Const; - -public class SqlSugarConst -{ - /// - /// 默认Log数据库标识 - /// - public const string LogConfigId = "Log"; -} \ No newline at end of file diff --git a/Tiobon.Core.Common/DB/Propagation.cs b/Tiobon.Core.Common/DB/Propagation.cs deleted file mode 100644 index ce435571..00000000 --- a/Tiobon.Core.Common/DB/Propagation.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Tiobon.Core.Common.DB; - -public enum Propagation -{ - /// - /// 默认:如果当前没有事务,就新建一个事务,如果已存在一个事务中,加入到这个事务中。 - /// - Required = 0, - - /// - /// 使用当前事务,如果没有当前事务,就抛出异常 - /// - Mandatory = 1, - - /// - /// 以嵌套事务方式执行 - /// - Nested = 2, -} \ No newline at end of file diff --git a/Tiobon.Core.Common/Seed/DBSeed.cs b/Tiobon.Core.Common/Seed/DBSeed.cs index c6cc06d3..e01ac4be 100644 --- a/Tiobon.Core.Common/Seed/DBSeed.cs +++ b/Tiobon.Core.Common/Seed/DBSeed.cs @@ -8,7 +8,7 @@ using SqlSugar; using System.Diagnostics; using System.Reflection; using System.Text; -using Tiobon.Core.Common.Const; +using Tiobon.Core.Const; using Tiobon.Core.Helper; namespace Tiobon.Core.Common.Seed; diff --git a/Tiobon.Core.Extensions/AOP/BlogTranAOP.cs b/Tiobon.Core.Extensions/AOP/BlogTranAOP.cs index cf71db0d..aa682d01 100644 --- a/Tiobon.Core.Extensions/AOP/BlogTranAOP.cs +++ b/Tiobon.Core.Extensions/AOP/BlogTranAOP.cs @@ -1,8 +1,7 @@ using Castle.DynamicProxy; using Microsoft.Extensions.Logging; using System.Reflection; -using Tiobon.Core.Common; -using Tiobon.Core.Common.DB; +using Tiobon.Core.DB; using Tiobon.Core.Repository.UnitOfWorks; namespace Tiobon.Core.AOP; diff --git a/Tiobon.Core.Extensions/ServiceExtensions/SqlsugarSetup.cs b/Tiobon.Core.Extensions/ServiceExtensions/SqlsugarSetup.cs index edbfce14..2f99bc4b 100644 --- a/Tiobon.Core.Extensions/ServiceExtensions/SqlsugarSetup.cs +++ b/Tiobon.Core.Extensions/ServiceExtensions/SqlsugarSetup.cs @@ -2,11 +2,10 @@ using Microsoft.Extensions.DependencyInjection; using SqlSugar; using System.Text.RegularExpressions; -using Tiobon.Core.Common; using Tiobon.Core.Common.Caches; -using Tiobon.Core.Common.Const; using Tiobon.Core.Common.DB; using Tiobon.Core.Common.DB.Aop; +using Tiobon.Core.Const; namespace Tiobon.Core.Extensions; diff --git a/Tiobon.Core.Services/PasswordLibServices.cs b/Tiobon.Core.Services/PasswordLibServices.cs index 9715903e..cf860381 100644 --- a/Tiobon.Core.Services/PasswordLibServices.cs +++ b/Tiobon.Core.Services/PasswordLibServices.cs @@ -1,4 +1,4 @@ -using Tiobon.Core.Common.DB; +using Tiobon.Core.DB; namespace Tiobon.Core.Services;