diff --git a/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj b/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj index 245911c..f53e409 100644 --- a/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj +++ b/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj @@ -15,7 +15,7 @@ - + diff --git a/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Startup.cs b/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Startup.cs index 68875b3..0031cdc 100644 --- a/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Startup.cs +++ b/admin.net.pro/Admin.NET/Admin.NET.Web.Core/Startup.cs @@ -295,7 +295,7 @@ public class Startup : AppStartup { foreach (var groupInfo in SpecificationDocumentBuilder.GetOpenApiGroups()) { - groupInfo.Description += "
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!"; + groupInfo.Description += "
Manage数据集成系统!"; } }); diff --git a/admin.net.pro/Admin.NET/Admin.NET.Web.Entry/App_Data/PluginCore.Config.json b/admin.net.pro/Admin.NET/Admin.NET.Web.Entry/App_Data/PluginCore.Config.json new file mode 100644 index 0000000..cc4c80c --- /dev/null +++ b/admin.net.pro/Admin.NET/Admin.NET.Web.Entry/App_Data/PluginCore.Config.json @@ -0,0 +1 @@ +{"Admin":{"UserName":"admin","Password":"ABC12345"},"FrontendMode":"LocalEmbedded","RemoteFrontend":"https://cdn.jsdelivr.net/gh/yiyungent/plugincore-admin-frontend@0.3.1/dist-cdn","PluginWidgetDebug":false} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Admin.NET.Web.Entry/App_Data/plugin.config.json b/admin.net.pro/Admin.NET/Admin.NET.Web.Entry/App_Data/plugin.config.json new file mode 100644 index 0000000..7bfdc25 --- /dev/null +++ b/admin.net.pro/Admin.NET/Admin.NET.Web.Entry/App_Data/plugin.config.json @@ -0,0 +1 @@ +{"EnabledPlugins":[],"DisabledPlugins":[],"UninstalledPlugins":[]} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Admin.NET.sln b/admin.net.pro/Admin.NET/Admin.NET.sln index d1db7da..5523db2 100644 --- a/admin.net.pro/Admin.NET/Admin.NET.sln +++ b/admin.net.pro/Admin.NET/Admin.NET.sln @@ -28,6 +28,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Admin.NET.Plugin.ApprovalFl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Admin.NET.Plugin.K3Cloud", "Plugins\Admin.NET.Plugin.K3Cloud\Admin.NET.Plugin.K3Cloud.csproj", "{9EB9C39E-E14F-443E-9AA3-EE417ABCBC1D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vistar.Application", "Vistar.Application\Vistar.Application.csproj", "{9D980420-C364-47D5-9226-62E28DF315E7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -70,6 +72,10 @@ Global {9EB9C39E-E14F-443E-9AA3-EE417ABCBC1D}.Debug|Any CPU.Build.0 = Debug|Any CPU {9EB9C39E-E14F-443E-9AA3-EE417ABCBC1D}.Release|Any CPU.ActiveCfg = Release|Any CPU {9EB9C39E-E14F-443E-9AA3-EE417ABCBC1D}.Release|Any CPU.Build.0 = Release|Any CPU + {9D980420-C364-47D5-9226-62E28DF315E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D980420-C364-47D5-9226-62E28DF315E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D980420-C364-47D5-9226-62E28DF315E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D980420-C364-47D5-9226-62E28DF315E7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/APIJSON.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/APIJSON.json new file mode 100644 index 0000000..5baf231 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/APIJSON.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "APIJSON": { + "Roles": [ + { + "RoleName": "Role1", // 权限名称 唯一 + "Select": { // 查询 + "Table": [ "*" ], // 可操作的表 + "Column": [ "*" ], // 可操作的字段 + "Filter": [] + }, + "Insert": { // 添加 + "Table": [ "table1", "table2", "table3" ], + "Column": [ "*", "*", "tb.*" ] + }, + "Update": { // 修改 + "Table": [ "table1", "table2", "table3" ], + "Column": [ "*", "tb.*", "tb.*" ] + }, + "Delete": { // 删除 + "Table": [ "table1", "table2", "table3" ] + } + }, + { + "RoleName": "Role2", + "Select": { + "Table": [ "table1" ], + "Column": [ "tb.*" ] + } + } + ] + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/App.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/App.json new file mode 100644 index 0000000..5ea2926 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/App.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Urls": "http://*:5005", // 配置默认端口 + // "https_port": 44325, + + "AllowedHosts": "*", + + "AppSettings": { + "InjectSpecificationDocument": true, // 生产环境是否开启Swagger + "ExternalAssemblies": [ "plugins" ] // 插件目录 + }, + "DynamicApiControllerSettings": { + //"DefaultRoutePrefix": "api", // 默认路由前缀 + "CamelCaseSeparator": "", // 驼峰命名分隔符 + "SplitCamelCase": false, // 切割骆驼(驼峰)/帕斯卡命名 + "LowercaseRoute": false, // 小写路由格式 + "AsLowerCamelCase": true, // 小驼峰命名(首字母小写) + "KeepVerb": false, // 保留动作方法请求谓词 + "KeepName": false // 保持原有名称不处理 + }, + "FriendlyExceptionSettings": { + "DefaultErrorMessage": "系统异常,请联系管理员", + "ThrowBah": true, // 是否将 Oops.Oh 默认抛出为业务异常 + "LogError": false // 是否输出异常日志 + }, + "LocalizationSettings": { + "SupportedCultures": [ "zh-CN", "en" ], // 语言列表 + "DefaultCulture": "zh-CN", // 默认语言 + "DateTimeFormatCulture": "zh-CN" // 固定时间区域为特定时区(多语言) + }, + "CorsAccessorSettings": { + //"PolicyName": "App.Cors.Policy", + //"WithOrigins": [ "http://localhost:5005", "https://gitee.com" ], + "WithExposedHeaders": [ "Content-Disposition", "X-Pagination", "access-token", "x-access-token", "Access-Control-Expose-Headersx-access-token" ], // 如果前端不代理且是axios请求 + "SignalRSupport": true // 启用 SignalR 跨域支持 + }, + "SnowId": { + "WorkerId": 1, // 机器码 全局唯一 + "WorkerIdBitLength": 6, // 机器码位长 默认值6,取值范围 [1, 19] + "SeqBitLength": 6, // 序列数位长 默认值6,取值范围 [3, 21](建议不小于4,值越大性能越高、Id位数也更长) + "WorkerPrefix": "adminnet_" // 缓存前缀 + }, + "Cryptogram": { + "StrongPassword": false, // 是否开启密码强度验证 + "PasswordStrengthValidation": "(?=^.{6,16}$)(?=.*\\d)(?=.*\\W+)(?=.*[A-Z])(?=.*[a-z])(?!.*\\n).*$", // 密码强度验证正则表达式,必须须包含大小写字母、数字和特殊字符的组合,长度在6-16之间 + "PasswordStrengthValidationMsg": "密码必须包含大小写字母、数字和特殊字符的组合,长度在6-16之间", // 密码强度验证消息提示 + "CryptoType": "SM2", // 密码加密算法:MD5、SM2、SM4 + // 新业务系统记得改密匙,通过接口(http://localhost:5005/api/sysCommon/smKeyPair)获取。记得同步修改前端公钥配置:VITE_SM_PUBLIC_KEY + "PublicKey": "04851D329AA3E38C2E7670AFE70E6E70E92F8769CA27C8766B12209A0FFBA4493B603EF7A0B9B1E16F0E8930C0406EA0B179B68DF28E25334BDEC4AE76D907E9E9", // 公钥 + "PrivateKey": "3A61D1D30C6302DABFF36201D936D0143EEF0C850AF28C5CA6D5C045AF8C5C8A" // 私钥 + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Cache.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Cache.json new file mode 100644 index 0000000..47bf2a2 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Cache.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Cache": { + "Prefix": "adminnet_", // 全局缓存前缀 + "CacheType": "Memory", // Memory、Redis + "Redis": { + "Configuration": "server=127.0.0.1:6379;password=;db=5;", // Redis连接字符串 + "Prefix": "adminnet_", // Redis前缀(目前没用) + "MaxMessageSize": "1048576", // 最大消息大小 默认1024 * 1024 + "AutoDetect": false // 自动检测集群节点 阿里云的Redis分布式集群使用代理模式,需要设置为false关闭自动检测;如果不用代理地址,就配置多个节点地址并打开自动检测 + } + }, + "Cluster": { // 集群配置 + "Enabled": false, // 启用集群:前提开启Redis缓存模式 + "ServerId": "adminnet", // 服务器标识 + "ServerIp": "", // 服务器IP + "SignalR": { + "RedisConfiguration": "127.0.0.1:6379,ssl=false,password=,defaultDatabase=5", + "ChannelPrefix": "signalrPrefix_" + }, + "DataProtecteKey": "AdminNet:DataProtection-Keys", + "IsSentinel": false, // 是否哨兵模式 + "SentinelConfig": { + "DefaultDb": "4", + "EndPoints": [ // 哨兵端口 + // "10.10.0.124:26380" + ], + "MainPrefix": "adminNet:", + "Password": "123456", + "SentinelPassword": "adminNet", + "ServiceName": "adminNet", + "SignalRChannelPrefix": "signalR:" + } + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Captcha.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Captcha.json new file mode 100644 index 0000000..fcb1058 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Captcha.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // Lazy.Captcha.Core 组件详细文档(https://api.gitee.com/pojianbing/lazy-captcha/) + "CaptchaOptions": { + "CaptchaType": 10, // 验证码类型0、1、2、3、4、5、6、7、8、9、10、11 + "CodeLength": 1, // 验证码长度, 要放在CaptchaType设置后 当类型为算术表达式时,长度代表操作的个数, 例如2 + "ExpirySeconds": 60, // 验证码过期秒数 + "IgnoreCase": true, // 比较时是否忽略大小写 + "StoreageKeyPrefix": "", // 存储键前缀 + "ImageOption": { + "Animation": true, // 是否启用动画 + "FontSize": 36, // 字体大小 + "Width": 150, // 验证码宽度 + "Height": 50, // 验证码高度 + "BubbleMinRadius": 5, // 气泡最小半径 + "BubbleMaxRadius": 10, // 气泡最大半径 + "BubbleCount": 3, // 气泡数量 + "BubbleThickness": 1.0, // 气泡边沿厚度 + "InterferenceLineCount": 3, // 干扰线数量 + "FontFamily": "kaiti", // 包含actionj,epilog,fresnel,headache,lexo,prefix,progbot,ransom,robot,scandal,kaiti + "FrameDelay": 300, // 每帧延迟,Animation=true时有效, 默认300 + "BackgroundColor": "#ffffff", // 格式: rgb, rgba, rrggbb, or rrggbbaa format to match web syntax, 默认#fff + "ForegroundColors": "", // 颜色格式同BackgroundColor,多个颜色逗号分割,随机选取。不填,空值,则使用默认颜色集 + "Quality": 100, // 图片质量(质量越高图片越大,gif调整无效可能会更大) + "TextBold": true // 粗体 + } + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/CodeGen.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/CodeGen.json new file mode 100644 index 0000000..275087a --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/CodeGen.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 代码生成配置项-程序集名称集合 + "CodeGen": { + "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ], + "BaseEntityNames": [ "EntityTenantId", "EntityTenant", "EntityTenantBaseData", "EntityBaseData", "EntityBase", "EntityBaseId" ], + "EntityBaseColumn": { + "EntityTenantId": [ "Id", "TenantId" ], + "EntityTenant": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "TenantId" ], + "EntityTenantBaseData": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "CreateOrgId", "CreateOrgName", "TenantId" ], + "EntityBaseData": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete", "CreateOrgId", "CreateOrgName" ], + "EntityBase": [ "Id", "CreateTime", "UpdateTime", "CreateUserId", "UpdateUserId", "CreateUserName", "UpdateUserName", "IsDelete" ], + "EntityBaseId": [ "Id" ] + //"BaseId": [ "Id" ] + }, + "FrontRootPath": "Web", // 前端项目根目录 + "BackendApplicationNamespaces": [ "Admin.NET.Application", "Admin.NET.Application2" ] // 后端生成到的项目 + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Database.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Database.json new file mode 100644 index 0000000..987c53b --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Database.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 详细数据库配置见SqlSugar官网(第一个为默认库),极力推荐 PostgreSQL 数据库 + // 数据库连接字符串参考地址:https://www.connectionstrings.com/ + "DbConnection": { + "EnableConsoleSql": false, // 启用控制台打印SQL + "ConnectionConfigs": [ + { + //"ConfigId": "1300000000001", // 默认库标识-禁止修改 + "DbType": "SqlServer", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access、OpenGauss、QuestDB、HG、ClickHouse、GBase、Odbc、Custom + "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=VistarStarDataManage;User ID=sa;Password=123456", // Sqlite 库连接字符串 + //"ConnectionString": "PORT=5432;DATABASE=xxx;HOST=localhost;PASSWORD=xxx;USER ID=xxx", // PostgreSQL 库连接字符串 + //"ConnectionString": "Server=localhost;Database=xxx;Uid=xxx;Pwd=xxx;SslMode=None;", // MySql 库连接字符串", + //"ConnectionString": "User Id=xxx; Password=xxx; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))", // Oracle 库连接字符串 + //"ConnectionString": "Server=localhost;Database=xxx;User Id=xxx;Password=xxx;", // SqlServer 库连接字符串 + + //"SlaveConnectionConfigs": [ // 读写分离/主从 + // { + // "HitRate": 10, + // "ConnectionString": "DataSource=./Admin.NET1.db" + // }, + // { + // "HitRate": 10, + // "ConnectionString": "DataSource=./Admin.NET2.db" + // } + //], + "DbSettings": { + "EnableInitDb": false, // 启用库初始化 + "EnableDiffLog": false, // 启用库表差异日志 + "EnableUnderLine": false // 启用驼峰转下划线 + }, + "TableSettings": { + "EnableInitTable": false, // 启用表初始化 + "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + }, + "SeedSettings": { + "EnableInitSeed": false, // 启用种子初始化 + "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + } + }, + //// 日志独立数据库配置 + //{ + // "ConfigId": "1300000000002", // 日志库标识-禁止修改 + // "DbType": "Sqlite", + // "ConnectionString": "DataSource=./Admin.NET.Log.db", // 库连接字符串 + // "DbSettings": { + // "EnableInitDb": true, // 启用库初始化 + // "EnableDiffLog": false, // 启用库表差异日志 + // "EnableUnderLine": false // 启用驼峰转下划线 + // }, + // "TableSettings": { + // "EnableInitTable": true, // 启用表初始化 + // "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + // }, + // "SeedSettings": { + // "EnableInitSeed": false, // 启用种子初始化 + // "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + // } + //}, + //// 其他数据库配置(可以配置多个) + { + "ConfigId": "启威星 1.94.4.74", // 库标识 + "DbType": "SqlServer", // 库类型 + "ConnectionString": "Data Source=1.94.4.74;Initial Catalog=SWManage_Vistar;User ID=sa;Password=ASDzxc123.", // 库连接字符串 + "DbSettings": { + "EnableInitDb": false, // 启用库初始化 + "EnableDiffLog": false, // 启用库表差异日志 + "EnableUnderLine": false // 启用驼峰转下划线 + }, + "TableSettings": { + "EnableInitTable": false, // 启用表初始化 + "EnableIncreTable": false // 启用表增量更新-特性[IncreTable] + }, + "SeedSettings": { + "EnableInitSeed": false, // 启用种子初始化 + "EnableIncreSeed": false // 启用种子增量更新-特性[IncreSeed] + } + } + ] + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Email.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Email.json new file mode 100644 index 0000000..bc53ba9 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Email.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Email": { + "Host": "smtp.163.com", // 主机 + "Port": 465, // 端口 465、994、25 + "EnableSsl": true, // 启用SSL + "DefaultFromEmail": "xxx@163.com", // 默认发件者邮箱 + "DefaultToEmail": "xxx@qq.com", // 默认接收人邮箱 + "UserName": "xxx@163.com", // 邮箱账号 + "Password": "", // 邮箱授权码 + "DefaultFromName": "Admin.NET 通用权限开发平台" // 默认邮件标题 + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Enum.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Enum.json new file mode 100644 index 0000000..b526662 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Enum.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // 枚举实体所在程序集名称集合 + "Enum": { + "EntityAssemblyNames": [ "Admin." ] + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/EventBus.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/EventBus.json new file mode 100644 index 0000000..520123e --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/EventBus.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "EventBus": { + "RabbitMQ": { + "UserName": "adminnet", + "Password": "adminnet++123456", + "HostName": "127.0.0.1", + "Port": 5672 + } + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/JWT.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/JWT.json new file mode 100644 index 0000000..1864eaa --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/JWT.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "JWTSettings": { + "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true + "IssuerSigningKey": "3F025D682370B0126BBAE7A93D9B66CE3F025D682370B0126BBAE7A93D9B66CE", // 密钥,string 类型,必须是复杂密钥,长度大于16,.NET8+ 长度需大于 32,推荐MD5直接生成 + "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true + "ValidIssuer": "Admin.NET", // 签发方,string 类型 + "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true + "ValidAudience": "Admin.NET", // 签收方,string 类型 + "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true + //"ExpiredTime": 20, // 过期时间,long 类型,单位分钟,默认20分钟,最大支持 13 年 + "ClockSkew": 5, // 过期时间容错值,long 类型,单位秒,默认5秒 + "Algorithm": "HS256", // 加密算法,string 类型,默认 HS256 + "RequireExpirationTime": true // 验证过期时间,设置 false 将永不过期 + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Limit.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Limit.json new file mode 100644 index 0000000..8239c53 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Limit.json @@ -0,0 +1,107 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + // IP限流配置 + "IpRateLimiting": { + // 例如:设置每分钟5次访问限流 + // 当False时:每个接口都加入计数,不管你访问哪个接口,只要在一分钟内累计够5次,将禁止访问。 + // 当True 时:当一分钟请求了5次GetData接口,则该接口将在时间段内禁止访问,但是还可以访问PostData()5次,总得来说是每个接口都有5次在这一分钟,互不干扰。 + "EnableEndpointRateLimiting": true, + // 如果StackBlockedRequests设置为false,拒绝的API调用不会添加到调用次数计数器上。比如:如果客户端每秒发出3个请求并且您设置了每秒一个调用的限制, + // 则每分钟或每天计数器等其他限制将仅记录第一个调用,即成功的API调用。如果您希望被拒绝的API调用计入其他时间的显示(分钟,小时等),则必须设置 + "StackBlockedRequests": false, + // 在RealIpHeader使用时,你的Kestrel服务器背后是一个反向代理,如果你的代理服务器使用不同的页眉然后提取客户端IP X-Real-IP使用此选项来设置它。 + "RealIpHeader": "X-Real-IP", + // 将ClientIdHeader被用于提取白名单的客户端ID。如果此标头中存在客户端ID并且与ClientWhitelist中指定的值匹配,则不应用速率限制。 + "ClientIdHeader": "X-ClientId", + // IP白名单:支持Ipv4和Ipv6 + "IpWhitelist": [], + // 端点白名单 + "EndpointWhitelist": [], + // 客户端白名单 + "ClientWhitelist": [], + "QuotaExceededResponse": { + "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问过于频繁,请稍后重试!禁止违法行为否则110 👮\",\"result\":null,\"extras\":null}}", + "ContentType": "application/json", + "StatusCode": 429 + }, + // 返回状态码 + "HttpStatusCode": 429, + // API规则,结尾一定要带* + "GeneralRules": [ + // 1秒钟只能调用1000次 + { + "Endpoint": "*", + "Period": "1s", + "Limit": 1000 + }, + // 1分钟只能调用60000次 + { + "Endpoint": "*", + "Period": "1m", + "Limit": 60000 + } + //// 1小时只能调用3600000次 + //{ + // "Endpoint": "*", + // "Period": "1h", + // "Limit": 3600000 + //}, + //// 1天只能调用86400000次 + //{ + // "Endpoint": "*", + // "Period": "1d", + // "Limit": 86400000 + //} + ] + }, + // IP 黑名单 + "IpRateLimitPolicies": { + "IpRules": [ + { + "Ip": "0.0.0.0", // IP可用:"::1/10" + "Rules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 0 // 设置为0就是1次都不能请求,完全屏蔽 + } + ] + } + ] + }, + // 客户端限流配置 + "ClientRateLimiting": { + "EnableEndpointRateLimiting": true, + "ClientIdHeader": "X-ClientId", + "EndpointWhitelist": [], + "ClientWhitelist": [], + "QuotaExceededResponse": { + "Content": "{{\"code\":429,\"type\":\"error\",\"message\":\"访问人数过多,请稍后重试!\",\"result\":null,\"extras\":null}}", + "ContentType": "application/json", + "StatusCode": 429 + }, + "HttpStatusCode": 429, + "GeneralRules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 2000 + } + ] + }, + "ClientRateLimitPolicies": { + "ClientRules": [ + { + "ClientId": "", + "Rules": [ + { + "Endpoint": "*", + "Period": "1s", + "Limit": 2000 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Logging.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Logging.json new file mode 100644 index 0000000..f3a10bb --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Logging.json @@ -0,0 +1,48 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Microsoft.EntityFrameworkCore": "Information", + "AspNetCoreRateLimit": "None" + }, + "File": { + "Enabled": false, // 启用文件日志 + "FileName": "logs/{0:yyyyMMdd}_{1}.log", // 日志文件 + "Append": true, // 追加覆盖 + // "MinimumLevel": "Information", // 日志级别 + "FileSizeLimitBytes": 10485760, // 10M=10*1024*1024 + "MaxRollingFiles": 30 // 只保留30个文件 + }, + "Database": { + "Enabled": true, // 启用数据库日志 + "MinimumLevel": "Information" + }, + "ElasticSearch": { + "Enabled": false, // 启用ES日志 + "AuthType": "Basic", // ES认证类型,可选 Basic、ApiKey、Base64ApiKey + "User": "admin", // Basic认证的用户名,使用Basic认证类型时必填 + "Password": "123456", // Basic认证的密码,使用Basic认证类型时必填 + "ApiId": "", // 使用ApiKey认证类型时必填 + "ApiKey": "", // 使用ApiKey认证类型时必填 + "Base64ApiKey": "TmtrOEszNEJuQ0NyaWlydGtROFk6SG1RZ0w3YzBTc2lCanJTYlV3aXNzZw==", // 使用Base64ApiKey认证类型时必填 + "Fingerprint": "37:08:6A:C6:06:CC:9A:43:CF:ED:25:A2:1C:A4:69:57:90:31:2C:06:CA:61:56:39:6A:9C:46:11:BD:22:51:DA", // ES使用Https时的证书指纹 + "ServerUris": [ "http://192.168.1.100:9200" ], // 地址 + "DefaultIndex": "adminnet" // 索引 + }, + "Monitor": { + "GlobalEnabled": true, // 启用全局拦截日志 + "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效 + "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效 + "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别 + "WithReturnValue": true, // 是否包含返回值,默认true + "ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出 + "JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All) + "JsonIndented": false, // 是否格式化Json + "UseUtcTimestamp": false, // 时间格式UTC、LOCAL + "ConsoleLog": true // 是否显示控制台日志 + } + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/OAuth.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/OAuth.json new file mode 100644 index 0000000..f2f28aa --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/OAuth.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "OAuth": { + "Weixin": { + "ClientId": "xxx", + "ClientSecret": "xxx" + }, + "Gitee": { + "ClientId": "xxx", + "ClientSecret": "xxx" + } + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/SMS.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/SMS.json new file mode 100644 index 0000000..58a697d --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/SMS.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "SMS": { + "Aliyun": { + "AccessKeyId": "", + "AccessKeySecret": "", + "Templates": [ + { + "Id": "0", + "SignName": "AdminNET 平台", + "TemplateCode": "SMS_291005708", + "Content": "您的验证码为:${code},请勿泄露于他人!" + }, + { + "Id": "1", + "SignName": "AdminNET 平台", + "TemplateCode": "SMS_462801755", + "Content": "注册成功,感谢您的注册,请妥善保管您的账户信息" + } + ] + }, + "Tencentyun": { + "SdkAppId": "", + "AccessKeyId": "", + "AccessKeySecret": "", + "Templates": [ + { + "Id": "0", + "SignName": "AdminNET 平台", + "TemplateCode": "", + "Content": "" + } + ] + } + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Swagger.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Swagger.json new file mode 100644 index 0000000..c0dd766 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Swagger.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "SpecificationDocumentSettings": { + "DocumentTitle": "Manage数据集成平台", + "GroupOpenApiInfos": [ + { + "Group": "Default", + "Title": "基础框架", + "Description": "", + "Version": "1.0.0", + "Order": 1000 + }, + { + "Group": "All Groups", + "Title": "所有接口", + "Description": "", + "Version": "1.0.0", + "Order": 0 + } + ], + "DefaultGroupName": "Default", // 默认分组名 + "DocExpansionState": "List", // List、Full、None + "EnableAllGroups": true, + "LoginInfo": { + "Enabled": true, // 是否开启Swagger登录 + "CheckUrl": "/api/swagger/checkUrl", + "SubmitUrl": "/api/swagger/submitUrl" + }, + "EnumToNumber": true // 枚举类型生成值类型 + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Upload.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Upload.json new file mode 100644 index 0000000..1f86aea --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Upload.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Upload": { + "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录 + "MaxSize": 51200, // 文件最大限制KB:1024*50 + "ContentType": [ "image/jpg", "image/png", "image/jpeg", "image/gif", "image/bmp", "text/plain", "application/pdf", "application/msword", "application/vnd.ms-excel", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "video/mp4", "application/wps-office.docx", "application/wps-office.xlsx", "application/wps-office.pptx", "application/vnd.android.package-archive" ], + "EnableMd5": false // 启用文件MDF5验证-防止重复上传 + }, + "OSSProvider": { + "IsEnable": false, + "Provider": "Minio", // OSS提供者 Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud + "Endpoint": "xxx.xxx.xxx.xxx:8090", // 节点/API地址(在腾讯云OSS中表示AppId) + "Region": "xxx.xxx.xxx.xxx", // 地域 + "AccessKey": "", + "SecretKey": "", + "IsEnableHttps": false, // 是否启用HTTPS + "IsEnableCache": true, // 是否启用缓存 + "Bucket": "admin.net", + "CustomHost": "" // 自定义Host:拼接外链的Host,若空则使用Endpoint拼接 + }, + "SSHProvider": { + "IsEnable": false, + "Host": "127.0.0.1", + "Port": 8222, + "Username": "sshuser", + "Password": "Password.1" + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Wechat.json b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Wechat.json new file mode 100644 index 0000000..f591e84 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Configuration/Wechat.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", + + "Wechat": { + // 公众号 + "WechatAppId": "", + "WechatAppSecret": "", + "WechatToken": "", // 微信公众号服务器配置中的令牌(Token) + "WechatEncodingAESKey": "", // 微信公众号服务器配置中的消息加解密密钥(EncodingAESKey) + // 小程序 + "WxOpenAppId": "", + "WxOpenAppSecret": "", + "WxToken": "", // 小程序消息推送中的令牌(Token) + "WxEncodingAESKey": "", // 小程序消息推送中的消息加解密密钥(EncodingAESKey) + "QRImagePath": "" //小程序生成带参数二维码保存位置(绝对路径 eg: D:\\Web\\wwwroot\\upload\\QRImage) + }, + // 微信支付 + "WechatPay": { + "AppId": "", // 微信公众平台AppId、开放平台AppId、小程序AppId、企业微信CorpId + "MerchantId": "", // 商户平台的商户号 + "MerchantV3Secret": "", // 商户平台的APIv3密钥 + "MerchantCertificateSerialNumber": "", // 商户平台的证书序列号 + "MerchantCertificatePrivateKey": "\\WxPayCert\\apiclient_key.pem" // 商户平台的API证书私钥(apiclient_key.pem文件内容) + }, + // 支付回调 + "PayCallBack": { + "WechatPayUrl": "https://xxx/api/sysWechatPay/payCallBack", // 微信支付回调 + "WechatRefundUrl": "", // 微信退款回调 + "AlipayUrl": "", // 支付宝支付回调 + "AlipayRefundUrl": "" // 支付宝退款回调 + } +} \ No newline at end of file diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Const/AppClaimConst.cs b/admin.net.pro/Admin.NET/Vistar.Application/Const/AppClaimConst.cs new file mode 100644 index 0000000..ecf2555 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Const/AppClaimConst.cs @@ -0,0 +1,21 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Admin.NET.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Vistar.Application.Const; +/// +/// 移动端Claim相关常量 +/// +public class AppClaimConst : ClaimConst +{ + +} diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Const/ApplicationConst.cs b/admin.net.pro/Admin.NET/Vistar.Application/Const/ApplicationConst.cs new file mode 100644 index 0000000..6e4a328 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Const/ApplicationConst.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Vistar.Application.Const +{ + public class ApplicationConst + { + /// + /// API分组名称 + /// + public const string GroupName = "Manage数据集成平台"; + } +} diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Vistar.Application.csproj b/admin.net.pro/Admin.NET/Vistar.Application/Vistar.Application.csproj new file mode 100644 index 0000000..820f864 --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Vistar.Application.csproj @@ -0,0 +1,37 @@ + + + + net6.0;net8.0 + 1701;1702;1591;8632 + + enable + True + disable + Admin.NET + Admin.NET 通用权限开发平台 + + + + + true + PreserveNewest + PreserveNewest + + + true + PreserveNewest + PreserveNewest + + + + + + + + + + + + + +