Kaynağa Gözat

Merge branch 'next_upstream' into local_dev

# Conflicts:
#	Admin.NET/Admin.NET.Application/Configuration/Wechat.json
ALANE\Sevy.Jiang 3 yıl önce
ebeveyn
işleme
44bc215f58
100 değiştirilmiş dosya ile 1859 ekleme ve 1024 silme
  1. 41 2
      Admin.NET/Admin.NET.Application/Admin.NET.Application.csproj
  2. 29 0
      Admin.NET/Admin.NET.Application/Configuration/App.json
  3. 8 0
      Admin.NET/Admin.NET.Application/Configuration/Cache.json
  4. 10 0
      Admin.NET/Admin.NET.Application/Configuration/CodeGen.json
  5. 23 0
      Admin.NET/Admin.NET.Application/Configuration/Database.json
  6. 14 0
      Admin.NET/Admin.NET.Application/Configuration/Email.json
  7. 18 0
      Admin.NET/Admin.NET.Application/Configuration/JWT.json
  8. 0 0
      Admin.NET/Admin.NET.Application/Configuration/Limit.json
  9. 37 0
      Admin.NET/Admin.NET.Application/Configuration/Logging.json
  10. 10 0
      Admin.NET/Admin.NET.Application/Configuration/OAuth.json
  11. 20 0
      Admin.NET/Admin.NET.Application/Configuration/OSS.json
  12. 7 0
      Admin.NET/Admin.NET.Application/Configuration/SnowId.json
  13. 41 0
      Admin.NET/Admin.NET.Application/Configuration/Swagger.json
  14. 31 0
      Admin.NET/Admin.NET.Application/Configuration/Wechat.json
  15. 28 0
      Admin.NET/Admin.NET.Application/Entity/Business.cs
  16. 20 0
      Admin.NET/Admin.NET.Application/SeedData/SysMenuSeedData.cs
  17. 34 0
      Admin.NET/Admin.NET.Application/Service/TenantBusinessService.cs
  18. 10 21
      Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
  19. 77 23
      Admin.NET/Admin.NET.Core/Admin.NET.Core.xml
  20. 0 115
      Admin.NET/Admin.NET.Core/AdminNETConfig.json
  21. 10 0
      Admin.NET/Admin.NET.Core/Attribute/IgnoreUpdateAttribute.cs
  22. 10 0
      Admin.NET/Admin.NET.Core/Attribute/TenantBusinessAttribute.cs
  23. 1 1
      Admin.NET/Admin.NET.Core/Captcha/LazyCaptchaSetup.cs
  24. 0 5
      Admin.NET/Admin.NET.Core/Const/CommonConst.cs
  25. 6 0
      Admin.NET/Admin.NET.Core/Entity/SysTenant.cs
  26. 20 2
      Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs
  27. 1 1
      Admin.NET/Admin.NET.Core/SeedData/SysConfigSeedData.cs
  28. 1 0
      Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs
  29. 1 0
      Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs
  30. 127 126
      Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs
  31. 15 14
      Admin.NET/Admin.NET.Core/SeedData/SysOrgSeedData.cs
  32. 16 15
      Admin.NET/Admin.NET.Core/SeedData/SysPosSeedData.cs
  33. 101 106
      Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs
  34. 6 5
      Admin.NET/Admin.NET.Core/SeedData/SysRoleSeedData.cs
  35. 2 1
      Admin.NET/Admin.NET.Core/SeedData/SysTenantSeedData.cs
  36. 1 0
      Admin.NET/Admin.NET.Core/SeedData/SysUserExtOrgSeedData.cs
  37. 1 0
      Admin.NET/Admin.NET.Core/SeedData/SysUserRoleSeedData.cs
  38. 7 6
      Admin.NET/Admin.NET.Core/SeedData/SysUserSeedData.cs
  39. 0 5
      Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs
  40. 4 19
      Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs
  41. 20 5
      Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs
  42. 5 2
      Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs
  43. 1 1
      Admin.NET/Admin.NET.Core/Service/Pos/SysPosService.cs
  44. 1 1
      Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs
  45. 3 17
      Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs
  46. 4 0
      Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs
  47. 44 13
      Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs
  48. 2 2
      Admin.NET/Admin.NET.Core/Service/User/SysUserService.cs
  49. 4 15
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarRepository.cs
  50. 72 90
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs
  51. 28 0
      Admin.NET/Admin.NET.Core/Util/CommonUtil.cs
  52. 1 1
      Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj
  53. 1 2
      Admin.NET/Admin.NET.Web.Core/Startup.cs
  54. 1 36
      Admin.NET/Admin.NET.Web.Entry/appsettings.Development.json
  55. 1 36
      Admin.NET/Admin.NET.Web.Entry/appsettings.json
  56. 14 0
      Web/src/api-services/_business/api.ts
  57. 191 0
      Web/src/api-services/_business/apis/tenant-business-api.ts
  58. 16 0
      Web/src/api-services/_business/index.ts
  59. 13 14
      Web/src/api-services/_business/models/admin-result-boolean.ts
  60. 57 0
      Web/src/api-services/_business/models/admin-result-list-tenant-business.ts
  61. 3 0
      Web/src/api-services/_business/models/index.ts
  62. 74 0
      Web/src/api-services/_business/models/tenant-business.ts
  63. 0 69
      Web/src/api-services/apis/sys-auth-api.ts
  64. 112 18
      Web/src/api-services/apis/sys-tenant-api.ts
  65. 7 0
      Web/src/api-services/models/add-tenant-input.ts
  66. 0 1
      Web/src/api-services/models/index.ts
  67. 0 6
      Web/src/api-services/models/login-input.ts
  68. 7 0
      Web/src/api-services/models/sys-tenant.ts
  69. 7 0
      Web/src/api-services/models/tenant-input.ts
  70. 7 0
      Web/src/api-services/models/update-tenant-input.ts
  71. 2 2
      Web/src/components/dragVerify/dragVerifyImgRotate.vue
  72. 12 70
      Web/src/layout/navBars/breadcrumb/setings.vue
  73. 3 7
      Web/src/layout/navBars/breadcrumb/user.vue
  74. 8 0
      Web/src/router/backEnd.ts
  75. 1 1
      Web/src/stores/themeConfig.ts
  76. 27 0
      Web/src/theme/element.scss
  77. 8 5
      Web/src/utils/axios-utils.ts
  78. 6 0
      Web/src/utils/storage.ts
  79. 2 6
      Web/src/views/error/401.vue
  80. 36 58
      Web/src/views/login/component/account.vue
  81. 1 1
      Web/src/views/login/index.vue
  82. 2 2
      Web/src/views/system/config/component/editConfig.vue
  83. 1 1
      Web/src/views/system/database/component/editColumn.vue
  84. 1 1
      Web/src/views/system/database/component/editTable.vue
  85. 1 1
      Web/src/views/system/dict/component/editDictData.vue
  86. 1 1
      Web/src/views/system/dict/component/editDictType.vue
  87. 1 1
      Web/src/views/system/menu/component/editMenu.vue
  88. 1 1
      Web/src/views/system/notice/component/editNotice.vue
  89. 1 1
      Web/src/views/system/org/component/editOrg.vue
  90. 1 1
      Web/src/views/system/pos/component/editPos.vue
  91. 1 1
      Web/src/views/system/region/component/editRegion.vue
  92. 6 7
      Web/src/views/system/role/component/editRole.vue
  93. 8 11
      Web/src/views/system/tenant/component/editTenant.vue
  94. 6 7
      Web/src/views/system/tenant/component/grantMenu.vue
  95. 10 5
      Web/src/views/system/tenant/index.vue
  96. 1 1
      Web/src/views/system/timer/component/editTimer.vue
  97. 34 31
      Web/src/views/system/user/component/editUser.vue
  98. 2 5
      Web/src/views/system/user/component/userCenter.vue
  99. 78 0
      Web/src/views/test/tenant/component/editTenant.vue
  100. 113 0
      Web/src/views/test/tenant/index.vue

+ 41 - 2
Admin.NET/Admin.NET.Application/Admin.NET.Application.csproj

@@ -8,12 +8,18 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <None Remove="AppConfig.json" />
     <None Remove="Admin.NET.Application.xml" />
+    <None Remove="Configuration\Limit.json" />
+    <None Remove="Configuration\Logging.json" />
   </ItemGroup>
 
   <ItemGroup>
-    <Content Include="AppConfig.json">
+    <Content Include="Configuration\Logging.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+      <ExcludeFromSingleFile>true</ExcludeFromSingleFile>
+      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
+    </Content>
+    <Content Include="Configuration\Limit.json">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
   </ItemGroup>
@@ -23,6 +29,39 @@
   </ItemGroup>
 
   <ItemGroup>
+    <None Update="Configuration\App.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Cache.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\CodeGen.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Database.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Email.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\JWT.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\OAuth.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\OSS.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\SnowId.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Swagger.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Update="Configuration\Wechat.json">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Update="Temp\CovidReport.html">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>

+ 29 - 0
Admin.NET/Admin.NET.Application/Configuration/App.json

@@ -0,0 +1,29 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Urls": "https://*:5005",
+
+    "AllowedHosts": "*",
+
+    "AppSettings": {
+        "InjectSpecificationDocument": true // 生产环境是否开启Swagger
+    },
+    "DynamicApiControllerSettings": {
+        "LowercaseRoute": false,
+        "KeepName": true,
+        "AsLowerCamelCase": true // 小驼峰路由路径
+    },
+    "FriendlyExceptionSettings": {
+        "DefaultErrorMessage": "系统异常,请联系管理员",
+        "ThrowBah": true,
+        "LogError": false // 是否输出异常日志,默认true
+    },
+    "LocalizationSettings": {
+        "SupportedCultures": [ "zh-CN", "en-US" ], // 语言列表
+        "DefaultCulture": "zh-CN" // 默认语言
+    },
+    "CorsAccessorSettings": {
+        "WithExposedHeaders": [ "Content-Disposition" ], // 如果前端不代理且是axios请求
+        "SignalRSupport": true // 启用 SignalR 跨域支持
+    }
+}

+ 8 - 0
Admin.NET/Admin.NET.Application/Configuration/Cache.json

@@ -0,0 +1,8 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Cache": {
+        "CacheType": "Memory", // Memory、Redis
+        "RedisConnectionString": "server=127.0.0.1:6379;password=;db=5;"
+    }
+}

+ 10 - 0
Admin.NET/Admin.NET.Application/Configuration/CodeGen.json

@@ -0,0 +1,10 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    // 代码生成配置项-程序集名称集合
+    "CodeGen": {
+        "EntityAssemblyNames": [ "Admin.NET.Core", "Admin.NET.Application" ],
+        "FrontRootPath": "Vben2", //前端文件根目录
+        "BackendApplicationNamespace": "Admin.NET.Application" //后端生成到的项目
+    }
+}

+ 23 - 0
Admin.NET/Admin.NET.Application/Configuration/Database.json

@@ -0,0 +1,23 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "DbConnection": {
+        // 具体配置见SqlSugar官网
+        "ConnectionConfigs": [
+            {
+                "ConfigId": "default",
+                "DbType": "Sqlite", // MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access
+                "ConnectionString": "DataSource=./Admin.NET.db",
+                "EnableInitDb": true, // 启用库表初始化
+                "EnableDiffLog": false // 启用库表差异日志
+            }
+            //{
+            //    "ConfigId": "test",
+            //    "DbType": "Sqlite",
+            //    "ConnectionString": "DataSource=./Test.db",
+            //    "EnableInitDb": true, // 启用库表初始化
+            //    "EnableDiffLog": false // 启用库表差异日志
+            //}
+        ]
+    }
+}

+ 14 - 0
Admin.NET/Admin.NET.Application/Configuration/Email.json

@@ -0,0 +1,14 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Email": {
+        "Server": "smtp.163.com", // 主机
+        "Port": 465, // 端口 465/994 25
+        "SenderName": "系统邮件", // 发送者名称
+        "SenderEmail": "zuohuaijun@163.com", // 发件者邮箱
+        "ToEmail": "515096995@qq.com", // 接收人邮箱
+        "Account": "", // 发件邮箱账号
+        "Password": "", // 发件邮箱密码
+        "Security": true // 启用SSL和TLS
+    }
+}

+ 18 - 0
Admin.NET/Admin.NET.Application/Configuration/JWT.json

@@ -0,0 +1,18 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "JWTSettings": {
+        "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
+        "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
+        "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
+        "ValidIssuer": "Admin.NET", // 签发方,string 类型
+        "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
+        "ValidAudience": "Admin.NET", // 签收方,string 类型
+        "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
+        "ExpiredTime": 10080, // 过期时间,long 类型,单位分钟,默认20分钟
+        "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
+    },
+    "RefreshToken": {
+        "ExpiredTime": 20160 // 过期时间单位分钟(一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)
+    }
+}

+ 0 - 0
Admin.NET/Admin.NET.Core/RateLimitConfig.json → Admin.NET/Admin.NET.Application/Configuration/Limit.json


+ 37 - 0
Admin.NET/Admin.NET.Application/Configuration/Logging.json

@@ -0,0 +1,37 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Logging": {
+        "LogLevel": {
+            "Default": "Information",
+            "Microsoft.AspNetCore": "Warning"
+        },
+        "File": {
+            "Enabled": true, // 启用文件日志
+            "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日志
+            "ServerUris": [ "http://dilon:123456@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)
+            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
+        }
+    }
+}

+ 10 - 0
Admin.NET/Admin.NET.Application/Configuration/OAuth.json

@@ -0,0 +1,10 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "OAuth": {
+        "Weixin": {
+            "ClientId": "wxd77174ddc828b65b",
+            "ClientSecret": "6224502b24d31acf8b4e0dc8e482317c"
+        }
+    }
+}

+ 20 - 0
Admin.NET/Admin.NET.Application/Configuration/OSS.json

@@ -0,0 +1,20 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Upload": {
+        "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录
+        "MaxSize": 1048576,
+        "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.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ]
+    },
+    "OSSProvider": {
+        "IsEnable": false,
+        "Provider": "Aliyun", // Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud
+        "Endpoint": "",
+        "Region": "",
+        "AccessKey": "",
+        "SecretKey": "",
+        "IsEnableHttps": true,
+        "IsEnableCache": true,
+        "Bucket": ""
+    }
+}

+ 7 - 0
Admin.NET/Admin.NET.Application/Configuration/SnowId.json

@@ -0,0 +1,7 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "SnowId": {
+        "WorkerId": 5 // 取值范围0~63,默认1
+    }
+}

+ 41 - 0
Admin.NET/Admin.NET.Application/Configuration/Swagger.json

@@ -0,0 +1,41 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "SpecificationDocumentSettings": {
+        "DocumentTitle": "Admin.NET 框架",
+        "GroupOpenApiInfos": [
+            {
+                "Group": "Default",
+                "Title": "Admin.NET",
+                "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
+                "Version": "1.0.0",
+                "TermsOfService": "https://dotnetchina.gitee.io/furion/",
+                "Contact": {
+                    "Name": "zuohuaijun",
+                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
+                    "Email": "515096995@qq.com"
+                }
+            },
+            {
+                "Group": "All Groups",
+                "Title": "所有接口",
+                "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
+                "Version": "1.0.0",
+                "TermsOfService": "https://dotnetchina.gitee.io/furion/",
+                "Contact": {
+                    "Name": "zuohuaijun",
+                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
+                    "Email": "515096995@qq.com"
+                }
+            }
+        ],
+        "EnableAllGroups": true,
+        "LoginInfo": {
+            "Enabled": false, // 是否开启Swagger登录
+            "CheckUrl": "/Swagger/CheckUrl",
+            "SubmitUrl": "/Swagger/SubmitUrl",
+            "UserName": "admin",
+            "Password": "000000"
+        }
+    }
+}

+ 31 - 0
Admin.NET/Admin.NET.Application/Configuration/Wechat.json

@@ -0,0 +1,31 @@
+{
+    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
+
+    "Wechat": {
+        // 公众号
+        "WechatAppId": "",
+        "WechatAppSecret": "",
+        "EncodingAESKey": "",
+        "Token": "",
+        // 小程序
+        "WxOpenAppId": "",
+        "WxOpenAppSecret": "",
+        "WxOpenToken": "",
+        "WxOpenEncodingAESKey": ""
+    },
+    // 微信支付
+    "WechatPay": {
+        "AppId": "", // 微信公众平台AppId、开放平台AppId、小程序AppId、企业微信CorpId
+        "MerchantId": "", // 商户平台的商户号
+        "MerchantV3Secret": "", // 商户平台的APIv3密钥
+        "MerchantCertificateSerialNumber": "", // 商户平台的证书序列号
+        "MerchantCertificatePrivateKey": "\\WxPayCert\\apiclient_key.pem" // 商户平台的API证书私钥(apiclient_key.pem文件内容)
+    },
+    // 支付回调
+    "PayCallBack": {
+        "WechatPayUrl": "/notify/weChatPay/unifiedorder", // 微信支付回调
+        "WechatRefundUrl": "/notify/weChatPay/refund", // 微信退款回调
+        "AlipayUrl": "", // 支付宝支付回调
+        "AlipayRefundUrl": "" // 支付宝退款回调
+    }
+}

+ 28 - 0
Admin.NET/Admin.NET.Application/Entity/Business.cs

@@ -0,0 +1,28 @@
+namespace Admin.NET.Application.Entity;
+
+/// <summary>
+/// 租户业务分库表
+/// </summary>
+[SugarTable("d_tenant_business", "租户业务分库表")]
+[TenantBusiness]
+public class TenantBusiness : EntityTenant
+{
+    /// <summary>
+    /// 姓名
+    /// </summary>
+    [SugarColumn(ColumnDescription = "姓名", Length = 32)]
+    [Required, MaxLength(32)]
+    public virtual string Name { get; set; }
+
+    /// <summary>
+    /// 年龄
+    /// </summary>
+    [SugarColumn(ColumnDescription = "年龄")]
+    public int Age { get; set; }
+
+    /// <summary>
+    /// 出生日期
+    /// </summary>
+    [SugarColumn(ColumnDescription = "出生日期")]
+    public DateTime BirthDate { get; set; }
+}

+ 20 - 0
Admin.NET/Admin.NET.Application/SeedData/SysMenuSeedData.cs

@@ -0,0 +1,20 @@
+namespace Admin.NET.Application.SeedData;
+
+/// <summary>
+/// 系统菜单表种子数据
+/// </summary>
+public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
+{
+    /// <summary>
+    /// 种子数据
+    /// </summary>
+    /// <returns></returns>
+    public IEnumerable<SysMenu> HasData()
+    {
+        return new[]
+        {
+            new SysMenu{ Id=252885263002200, Pid=0, Title="业务测试", Path="/test", Name="test", Component="Layout", Redirect="/test/tenant", Icon="ele-Position", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=20 },
+            new SysMenu{ Id=252885263002201, Pid=252885263002200, Title="租户业务", Path="/test/tenant", Name="testTenant", Component="/test/tenant/index", Icon="ele-OfficeBuilding", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+        };
+    }
+}

+ 34 - 0
Admin.NET/Admin.NET.Application/Service/TenantBusinessService.cs

@@ -0,0 +1,34 @@
+namespace Admin.NET.Application.Service;
+
+/// <summary>
+/// 租户业务服务
+/// </summary>
+[ApiDescriptionSettings("租户业务服务", Order = 200)]
+public class TenantBusinessService : IDynamicApiController, ITransient
+{
+    private readonly SqlSugarRepository<TenantBusiness> _tenantBusinessRep;
+
+    public TenantBusinessService(SqlSugarRepository<TenantBusiness> businessRep)
+    {
+        _tenantBusinessRep = businessRep;
+    }
+
+    /// <summary>
+    /// 增加租户业务数据
+    /// </summary>
+    /// <returns></returns>
+    public async Task<bool> AddBusiness()
+    {
+        var tenantBusiness = new TenantBusiness() { Name = "zuohuaijun" };
+        return await _tenantBusinessRep.InsertAsync(tenantBusiness);
+    }
+
+    /// <summary>
+    /// 查询租户业务数据
+    /// </summary>
+    /// <returns></returns>
+    public async Task<List<TenantBusiness>> GetBusinessList()
+    {
+        return await _tenantBusinessRep.GetListAsync();
+    }
+}

+ 10 - 21
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -9,40 +9,29 @@
 
   <ItemGroup>
     <None Remove="Admin.NET.Core.xml" />
-    <None Remove="AdminNETConfig.json" />
-    <None Remove="RateLimitConfig.json" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <Content Include="AdminNETConfig.json">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
-    <Content Include="RateLimitConfig.json">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </Content>
   </ItemGroup>
 
   <ItemGroup>
     <PackageReference Include="AngleSharp" Version="0.17.1" />
     <PackageReference Include="AspNetCoreRateLimit" Version="4.0.2" />
-    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.7.3" />
-    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.7.3" />
-    <PackageReference Include="Furion.Pure" Version="4.7.3" />
+    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.7.9" />
+    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.7.9" />
+    <PackageReference Include="Furion.Pure" Version="4.7.9" />
     <PackageReference Include="Lazy.Captcha.Core" Version="1.1.6" />
-    <PackageReference Include="Magicodes.IE.Excel" Version="2.6.9" />
-    <PackageReference Include="Magicodes.IE.Pdf" Version="2.6.9" />
-    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.10" />
+    <PackageReference Include="Magicodes.IE.Excel" Version="2.7.0" />
+    <PackageReference Include="Magicodes.IE.Pdf" Version="2.7.0" />
+    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.11" />
     <PackageReference Include="NEST" Version="7.17.5" />
     <PackageReference Include="NETCore.MailKit" Version="2.1.0" />
     <PackageReference Include="NewLife.Redis" Version="5.0.2022.1101" />
     <PackageReference Include="OnceMi.AspNetCore.OSS" Version="1.1.9" />
-    <PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.20.0" />
+    <PackageReference Include="SKIT.FlurlHttpClient.Wechat.Api" Version="2.20.1" />
     <PackageReference Include="SKIT.FlurlHttpClient.Wechat.TenpayV3" Version="2.13.1" />
-    <PackageReference Include="SqlSugarCore" Version="5.1.3.30" />
-    <PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.21" />
+    <PackageReference Include="SqlSugarCore" Version="5.1.3.32" />
+    <PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.22" />
     <PackageReference Include="UAParser" Version="3.1.47" />
     <PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
-    <PackageReference Include="Masuit.Tools.Core" Version="2.5.7.1" />
+    <PackageReference Include="Masuit.Tools.Core" Version="2.5.7.5" />
   </ItemGroup>
 
   <ItemGroup>

+ 77 - 23
Admin.NET/Admin.NET.Core/Admin.NET.Core.xml

@@ -14,11 +14,21 @@
             自定义规范化结果特性
             </summary>
         </member>
+        <member name="T:Admin.NET.Core.IgnoreUpdateAttribute">
+            <summary>
+            忽略更新种子数据特性
+            </summary>
+        </member>
         <member name="T:Admin.NET.Core.NotTableAttribute">
             <summary>
             非实体表特性
             </summary>
         </member>
+        <member name="T:Admin.NET.Core.TenantBusinessAttribute">
+            <summary>
+            租户业务表特性
+            </summary>
+        </member>
         <member name="M:Admin.NET.Core.CacheSetup.AddCache(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
             <summary>
             缓存注册(新生命Redis组件)
@@ -202,11 +212,6 @@
             单用户登录
             </summary>
         </member>
-        <member name="F:Admin.NET.Core.CommonConst.SysTenantDb">
-            <summary>
-            开启多库租户
-            </summary>
-        </member>
         <member name="F:Admin.NET.Core.CommonConst.SysAdminRole">
             <summary>
             系统管理员角色编码
@@ -1392,6 +1397,11 @@
             备注
             </summary>
         </member>
+        <member name="P:Admin.NET.Core.SysTenant.Status">
+            <summary>
+            状态
+            </summary>
+        </member>
         <member name="T:Admin.NET.Core.SysTimer">
             <summary>
             定时任务
@@ -2485,7 +2495,12 @@
         </member>
         <member name="F:Admin.NET.Core.ErrorCodeEnum.D1300">
             <summary>
-            已存在同名或同管理员或同主机租户
+            已存在同名的租户
+            </summary>
+        </member>
+        <member name="F:Admin.NET.Core.ErrorCodeEnum.D1301">
+            <summary>
+            已存在同名的租户管理员
             </summary>
         </member>
         <member name="F:Admin.NET.Core.ErrorCodeEnum.D1400">
@@ -2578,6 +2593,16 @@
             已有相同编码或名称
             </summary>
         </member>
+        <member name="F:Admin.NET.Core.ErrorCodeEnum.Z1001">
+            <summary>
+            默认租户状态禁止修改
+            </summary>
+        </member>
+        <member name="F:Admin.NET.Core.ErrorCodeEnum.Z1002">
+            <summary>
+            禁止创建此类型的数据库
+            </summary>
+        </member>
         <member name="T:Admin.NET.Core.GenderEnum">
             <summary>
             性别枚举
@@ -3835,11 +3860,6 @@
             验证码
             </summary>
         </member>
-        <member name="P:Admin.NET.Core.Service.LoginInput.TenantId">
-            <summary>
-            租户Id
-            </summary>
-        </member>
         <member name="T:Admin.NET.Core.Service.LoginOutput">
             <summary>
             用户登录结果
@@ -3953,12 +3973,6 @@
             </summary>
             <returns></returns>
         </member>
-        <member name="M:Admin.NET.Core.Service.SysAuthService.GetTenantDbList">
-            <summary>
-            是否启用多库租户
-            </summary>
-            <returns></returns>
-        </member>
         <member name="M:Admin.NET.Core.Service.SysAuthService.SwaggerCheckUrl">
             <summary>
             Swagger登录检查
@@ -5359,6 +5373,11 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="M:Admin.NET.Core.Service.SysMenuService.DeleteBtnFromMenuTree(System.Collections.Generic.List{Admin.NET.Core.SysMenu})">
+            <summary>
+            删除登录菜单树里面的按钮
+            </summary>
+        </member>
         <member name="M:Admin.NET.Core.Service.SysMenuService.GetMenuList(Admin.NET.Core.Service.MenuInput)">
             <summary>
             获取菜单列表
@@ -6050,6 +6069,11 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="P:Admin.NET.Core.Service.TenantInput.Status">
+            <summary>
+            状态
+            </summary>
+        </member>
         <member name="P:Admin.NET.Core.Service.PageTenantInput.Name">
             <summary>
             名称
@@ -6095,6 +6119,13 @@
             <param name="input"></param>
             <returns></returns>
         </member>
+        <member name="M:Admin.NET.Core.Service.SysTenantService.SetTenantStatus(Admin.NET.Core.Service.TenantInput)">
+            <summary>
+            设置租户状态
+            </summary>
+            <param name="input"></param>
+            <returns></returns>
+        </member>
         <member name="M:Admin.NET.Core.Service.SysTenantService.InitNewTenant(Admin.NET.Core.SysTenant)">
             <summary>
             新增租户初始化(Id隔离)
@@ -6165,7 +6196,7 @@
         </member>
         <member name="M:Admin.NET.Core.Service.SysTenantService.CreateTenantDb(Admin.NET.Core.Service.TenantInput)">
             <summary>
-            创建租户数据库(根据默认库结构)
+            创建租户数据库
             </summary>
             <param name="input"></param>
             <returns></returns>
@@ -6854,22 +6885,32 @@
             </summary>
             <param name="config"></param>
         </member>
-        <member name="M:Admin.NET.Core.SqlSugarSetup.SetDbAop(SqlSugar.SqlSugarScopeProvider,Admin.NET.Core.DbConnectionConfig)">
+        <member name="M:Admin.NET.Core.SqlSugarSetup.SetDbAop(SqlSugar.SqlSugarScopeProvider)">
             <summary>
             配置Aop
             </summary>
             <param name="db"></param>
+        </member>
+        <member name="M:Admin.NET.Core.SqlSugarSetup.InitDatabase(SqlSugar.SqlSugarScope,Admin.NET.Core.DbConnectionConfig)">
+            <summary>
+            初始化数据库
+            </summary>
+            <param name="db"></param>
             <param name="config"></param>
         </member>
-        <member name="M:Admin.NET.Core.SqlSugarSetup.InitDataBase(SqlSugar.SqlSugarScope,Admin.NET.Core.DbConnectionOptions)">
+        <member name="M:Admin.NET.Core.SqlSugarSetup.InitTenantConnection(SqlSugar.ITenant,System.Int64)">
             <summary>
-            初始化数据库结构
+            初始化租户库连接
             </summary>
+            <param name="iTenant"></param>
+            <param name="tenantId"></param>
         </member>
-        <member name="M:Admin.NET.Core.SqlSugarSetup.CreateDataBase(SqlSugar.ISqlSugarClient,Admin.NET.Core.DbConnectionConfig,System.Int64)">
+        <member name="M:Admin.NET.Core.SqlSugarSetup.InitTenantDatabase(SqlSugar.ITenant,Admin.NET.Core.DbConnectionConfig)">
             <summary>
-            初始化数据库结构
+            初始化租户业务数据库
             </summary>
+            <param name="itenant"></param>
+            <param name="config"></param>
         </member>
         <member name="M:Admin.NET.Core.SqlSugarSetup.SetDeletedEntityFilter(SqlSugar.SqlSugarScopeProvider)">
             <summary>
@@ -7103,6 +7144,19 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="T:Admin.NET.Core.CommonUtil">
+            <summary>
+            通用工具类
+            </summary>
+        </member>
+        <member name="M:Admin.NET.Core.CommonUtil.ExecPercent(System.Decimal,System.Decimal)">
+            <summary>
+            生成百分数
+            </summary>
+            <param name="PassCount"></param>
+            <param name="allCount"></param>
+            <returns></returns>
+        </member>
         <member name="M:Admin.NET.Core.ComputerUtil.GetComputerInfo">
             <summary>
             内存信息

+ 0 - 115
Admin.NET/Admin.NET.Core/AdminNETConfig.json

@@ -1,115 +0,0 @@
-{
-    "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
-
-    "SpecificationDocumentSettings": {
-        "DocumentTitle": "Admin.NET 框架",
-        "GroupOpenApiInfos": [
-            {
-                "Group": "Default",
-                "Title": "Admin.NET",
-                "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
-                "Version": "1.0.0",
-                "TermsOfService": "https://dotnetchina.gitee.io/furion/",
-                "Contact": {
-                    "Name": "zuohuaijun",
-                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
-                    "Email": "515096995@qq.com"
-                }
-            },
-            {
-                "Group": "All Groups",
-                "Title": "所有接口",
-                "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>",
-                "Version": "1.0.0",
-                "TermsOfService": "https://dotnetchina.gitee.io/furion/",
-                "Contact": {
-                    "Name": "zuohuaijun",
-                    "Url": "https://gitee.com/zuohuaijun/Admin.NET",
-                    "Email": "515096995@qq.com"
-                }
-            }
-        ],
-        "EnableAllGroups": true,
-        "LoginInfo": {
-            "Enabled": false, // 是否开启Swagger登录
-            "CheckUrl": "/Swagger/CheckUrl",
-            "SubmitUrl": "/Swagger/SubmitUrl",
-            "UserName": "admin",
-            "Password": "000000"
-        }
-    },
-    "AppSettings": {
-        "InjectSpecificationDocument": true // 生产环境是否开启Swagger
-    },
-    "DynamicApiControllerSettings": {
-        "LowercaseRoute": false,
-        "KeepName": true,
-        "AsLowerCamelCase": true // 小驼峰路由路径
-    },
-    "FriendlyExceptionSettings": {
-        "DefaultErrorMessage": "系统异常,请联系管理员",
-        "ThrowBah": true,
-        "LogError": false // 是否输出异常日志,默认true
-    },
-    "LocalizationSettings": {
-        "SupportedCultures": [ "zh-CN", "en-US" ], // 语言列表
-        "DefaultCulture": "zh-CN" // 默认语言
-    },
-    "JWTSettings": {
-        "ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
-        "IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
-        "ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
-        "ValidIssuer": "Admin.NET", // 签发方,string 类型
-        "ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
-        "ValidAudience": "Admin.NET", // 签收方,string 类型
-        "ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
-        "ExpiredTime": 10080, // 过期时间,long 类型,单位分钟,默认20分钟
-        "ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
-    },
-    "RefreshToken": {
-        "ExpiredTime": 20160 // 过期时间单位分钟(一般 refresh_token 的有效时间 > 2 * access_token 的有效时间)
-    },
-    "CorsAccessorSettings": {
-        "WithExposedHeaders": [ "Content-Disposition" ], // 如果前端不代理且是axios请求
-        "SignalRSupport": true // 启用 SignalR 跨域支持
-    },
-    "Cache": {
-        "CacheType": "Memory", // Memory、Redis
-        "RedisConnectionString": "server=127.0.0.1:6379;password=;db=5;"
-    },
-    "SnowId": {
-        "WorkerId": 5 // 取值范围0~63,默认1
-    },
-    "Upload": {
-        "Path": "upload/{yyyy}/{MM}/{dd}", // 文件上传目录
-        "MaxSize": 1048576,
-        "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.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ]
-    },
-    "OSSProvider": {
-        "IsEnable": false,
-        "Provider": "Aliyun", // Invalid/Minio/Aliyun/QCloud/Qiniu/HuaweiCloud
-        "Endpoint": "",
-        "Region": "",
-        "AccessKey": "",
-        "SecretKey": "",
-        "IsEnableHttps": true,
-        "IsEnableCache": true,
-        "Bucket": ""
-    },
-    "Email": {
-        "Server": "smtp.163.com", // 主机
-        "Port": 465, // 端口 465/994 25
-        "SenderName": "系统邮件", // 发送者名称
-        "SenderEmail": "zuohuaijun@163.com", // 发件者邮箱
-        "ToEmail": "515096995@qq.com", // 接收人邮箱
-        "Account": "", // 发件邮箱账号
-        "Password": "", // 发件邮箱密码
-        "Security": true // 启用SSL和TLS
-    },
-    "OAuth": {
-        "Weixin": {
-            "ClientId": "wxd77174ddc828b65b",
-            "ClientSecret": "6224502b24d31acf8b4e0dc8e482317c"
-        }
-    }
-}

+ 10 - 0
Admin.NET/Admin.NET.Core/Attribute/IgnoreUpdateAttribute.cs

@@ -0,0 +1,10 @@
+namespace Admin.NET.Core;
+
+/// <summary>
+/// 忽略更新种子数据特性
+/// </summary>
+[SuppressSniffer]
+[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
+public class IgnoreUpdateAttribute : Attribute
+{
+}

+ 10 - 0
Admin.NET/Admin.NET.Core/Attribute/TenantBusinessAttribute.cs

@@ -0,0 +1,10 @@
+namespace Admin.NET.Core;
+
+/// <summary>
+/// 租户业务表特性
+/// </summary>
+[SuppressSniffer]
+[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
+public class TenantBusinessAttribute : Attribute
+{
+}

+ 1 - 1
Admin.NET/Admin.NET.Core/Captcha/LazyCaptchaSetup.cs

@@ -36,7 +36,7 @@ public class RandomCaptcha : DefaultCaptcha
     protected override void ChangeOptions(CaptchaOptions options)
     {
         // 随机验证码类型
-        options.CaptchaType = captchaTypes[random.Next(0, captchaTypes.Length)];
+        options.CaptchaType = captchaTypes[10]; // captchaTypes[random.Next(0, captchaTypes.Length)];
 
         // 当是算数运算时,CodeLength是指运算数个数
         if (options.CaptchaType.IsArithmetic())

+ 0 - 5
Admin.NET/Admin.NET.Core/Const/CommonConst.cs

@@ -35,11 +35,6 @@ public class CommonConst
     /// </summary>
     public const string SysSingleLogin = "sys_single_login";
 
-    /// <summary>
-    /// 开启多库租户
-    /// </summary>
-    public const string SysTenantDb = "sys_tenant_db";
-
     /// <summary>
     /// 系统管理员角色编码
     /// </summary>

+ 6 - 0
Admin.NET/Admin.NET.Core/Entity/SysTenant.cs

@@ -79,4 +79,10 @@ public class SysTenant : EntityBase
     [SugarColumn(ColumnDescription = "备注", Length = 128)]
     [MaxLength(128)]
     public string Remark { get; set; }
+
+    /// <summary>
+    /// 状态
+    /// </summary>
+    [SugarColumn(ColumnDescription = "状态")]
+    public StatusEnum Status { get; set; } = StatusEnum.Enable;
 }

+ 20 - 2
Admin.NET/Admin.NET.Core/Enum/ErrorCodeEnum.cs

@@ -397,11 +397,17 @@ public enum ErrorCodeEnum
     D1200,
 
     /// <summary>
-    /// 已存在同名或同管理员或同主机租户
+    /// 已存在同名租户
     /// </summary>
-    [ErrorCodeItemMetadata("已存在同名或同主机租户")]
+    [ErrorCodeItemMetadata("已存在同名租户")]
     D1300,
 
+    /// <summary>
+    /// 已存在同名的租户管理员
+    /// </summary>
+    [ErrorCodeItemMetadata("已存在同名的租户管理员")]
+    D1301,
+
     /// <summary>
     /// 该表代码模板已经生成过
     /// </summary>
@@ -509,4 +515,16 @@ public enum ErrorCodeEnum
     /// </summary>
     [ErrorCodeItemMetadata("已有相同编码或名称")]
     R2002,
+
+    /// <summary>
+    /// 默认租户状态禁止修改
+    /// </summary>
+    [ErrorCodeItemMetadata("默认租户状态禁止修改")]
+    Z1001,
+
+    /// <summary>
+    /// 禁止创建此类型的数据库
+    /// </summary>
+    [ErrorCodeItemMetadata("禁止创建此类型的数据库")]
+    Z1002,
 }

+ 1 - 1
Admin.NET/Admin.NET.Core/SeedData/SysConfigSeedData.cs

@@ -9,6 +9,7 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysConfig> HasData()
     {
         return new[]
@@ -19,7 +20,6 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
             new SysConfig{ Id=252885263003803, Name="操作日志", Code="sys_oplog", Value="True", SysFlag=YesNoEnum.Y, Remark="开启操作日志", Order=4, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysConfig{ Id=252885263003804, Name="单点登录", Code="sys_single_login", Value="True", SysFlag=YesNoEnum.Y, Remark="开启单点登录", Order=5, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
             new SysConfig{ Id=252885263003805, Name="验证码", Code="sys_captcha", Value="True", SysFlag=YesNoEnum.Y, Remark="开启验证码", Order=6, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
-            new SysConfig{ Id=252885263003806, Name="多库租户", Code="sys_tenant_db", Value="True", SysFlag=YesNoEnum.Y, Remark="开启多库租户", Order=7, GroupCode="Default", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
         };
     }
 }

+ 1 - 0
Admin.NET/Admin.NET.Core/SeedData/SysDictDataSeedData.cs

@@ -9,6 +9,7 @@ public class SysDictDataSeedData : ISqlSugarEntitySeedData<SysDictData>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysDictData> HasData()
     {
         return new[]

+ 1 - 0
Admin.NET/Admin.NET.Core/SeedData/SysDictTypeSeedData.cs

@@ -9,6 +9,7 @@ public class SysDictTypeSeedData : ISqlSugarEntitySeedData<SysDictType>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysDictType> HasData()
     {
         return new[]

+ 127 - 126
Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs

@@ -9,6 +9,7 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysMenu> HasData()
     {
         return new[]
@@ -17,132 +18,132 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
             new SysMenu{ Id=252885263002110, Pid=252885263002100, Title="工作台", Path="/dashboard/home", Name="home", Component="/home/index", IsAffix=true, Icon="ele-HomeFilled", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
             new SysMenu{ Id=252885263002111, Pid=252885263002100, 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"), Order=101 },
 
-            new SysMenu{ Id=252885263002200, Pid=0, Title="系统管理", Path="/system", Name="system", Component="Layout", Redirect="/system/user", Icon="ele-Setting", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002210, Pid=252885263002200, Title="账号管理", Path="/system/user", Name="sysUser", Component="/system/user/index", Icon="ele-User", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002211, Pid=252885263002210, Title="查询", Permission="sysUser:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002212, Pid=252885263002210, Title="编辑", Permission="sysUser:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002213, Pid=252885263002210, Title="增加", Permission="sysUser:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002214, Pid=252885263002210, Title="删除", Permission="sysUser:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002215, Pid=252885263002210, Title="详情", Permission="sysUser:detail", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002216, Pid=252885263002210, Title="授权角色", Permission="sysUser:grantRole", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002217, Pid=252885263002210, Title="重置密码", Permission="sysUser:resetPwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002218, Pid=252885263002210, Title="设置状态", Permission="sysUser:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002219, Pid=252885263002210, Title="修改密码", Permission="sysUser:changePwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263012220, Pid=252885263002210, Title="强制下线", Permission="sysUser:forceOffline", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002220, Pid=252885263002200, Title="角色管理", Path="/system/role", Name="sysRole", Component="/system/role/index", Icon="ele-UserFilled", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=110 },
-            new SysMenu{ Id=252885263002221, Pid=252885263002220, Title="查询", Permission="sysRole:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002222, Pid=252885263002220, Title="编辑", Permission="sysRole:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002223, Pid=252885263002220, Title="增加", Permission="sysRole:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002224, Pid=252885263002220, Title="删除", Permission="sysRole:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002225, Pid=252885263002220, Title="授权菜单", Permission="sysRole:grantMenu", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002226, Pid=252885263002220, Title="授权数据", Permission="sysRole:grantData", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002227, Pid=252885263002220, Title="设置状态", Permission="sysRole:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002230, Pid=252885263002200, Title="菜单管理", Path="/system/menu", Name="sysMenu", Component="/system/menu/index", Icon="ele-Menu", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=120 },
-            new SysMenu{ Id=252885263002231, Pid=252885263002230, Title="查询", Permission="sysMenu:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002232, Pid=252885263002230, Title="编辑", Permission="sysMenu:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002233, Pid=252885263002230, Title="增加", Permission="sysMenu:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002234, Pid=252885263002230, Title="删除", Permission="sysMenu:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002240, Pid=252885263002200, Title="机构管理", Path="/system/org", Name="sysOrg", Component="/system/org/index", Icon="ele-OfficeBuilding", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
-            new SysMenu{ Id=252885263002241, Pid=252885263002240, Title="查询", Permission="sysOrg:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002242, Pid=252885263002240, Title="编辑", Permission="sysOrg:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002243, Pid=252885263002240, Title="增加", Permission="sysOrg:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002244, Pid=252885263002240, Title="删除", Permission="sysOrg:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002250, Pid=252885263002200, Title="职位管理", Path="/system/pos", Name="sysPos", Component="/system/pos/index",Icon="ele-Mug", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=140 },
-            new SysMenu{ Id=252885263002251, Pid=252885263002250, Title="查询", Permission="sysPos:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002252, Pid=252885263002250, Title="编辑", Permission="sysPos:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002253, Pid=252885263002250, Title="增加", Permission="sysPos:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002254, Pid=252885263002250, Title="删除", Permission="sysPos:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002260, Pid=252885263002200, Title="个人中心", Path="/system/userCenter", Name="sysUserCenter", Component="/system/user/component/userCenter",Icon="ele-Medal", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=150 },
-            new SysMenu{ Id=252885263002261, Pid=252885263002260, Title="修改密码", Permission="sysUser:changePwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002262, Pid=252885263002260, Title="更新信息", Permission="sysUser:updateBase", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002263, Pid=252885263002260, Title="电子签名", Permission="sysUser:signature", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002270, Pid=252885263002200, Title="通知公告", Path="/system/notice", Name="sysNotice", Component="/system/notice/index",Icon="ele-Bell", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=160 },
-            new SysMenu{ Id=252885263002271, Pid=252885263002270, Title="查询", Permission="sysNotice:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002272, Pid=252885263002270, Title="编辑", Permission="sysNotice:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002273, Pid=252885263002270, Title="增加", Permission="sysNotice:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002274, Pid=252885263002270, Title="删除", Permission="sysNotice:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002275, Pid=252885263002270, Title="发布", Permission="sysNotice:public", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002276, Pid=252885263002270, Title="撤回", Permission="sysNotice:cancel", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002300, Pid=0, Title="平台管理", Path="/platform", Name="platform", Component="Layout", Redirect="/platform/tenant", Icon="ele-Menu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=200 },
-
-            new SysMenu{ Id=252885263002310, Pid=252885263002300, 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"), Order=100 },
-            new SysMenu{ Id=252885263002311, Pid=252885263002310, Title="查询", Permission="sysTenant:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002312, Pid=252885263002310, Title="编辑", Permission="sysTenant:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002313, Pid=252885263002310, Title="增加", Permission="sysTenant:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002314, Pid=252885263002310, Title="删除", Permission="sysTenant:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002315, Pid=252885263002310, Title="授权菜单", Permission="sysTenant:grantMenu", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002316, Pid=252885263002310, Title="重置密码", Permission="sysTenant:resetPwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002317, Pid=252885263002310, Title="生成库", Permission="sysTenant:createDb", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002320, Pid=252885263002300, Title="参数配置", Path="/platform/config", Name="sysConfig", Component="/system/config/index", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=110 },
-            new SysMenu{ Id=252885263002321, Pid=252885263002320, Title="查询", Permission="sysConfig:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002322, Pid=252885263002320, Title="编辑", Permission="sysConfig:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002323, Pid=252885263002320, Title="增加", Permission="sysConfig:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002324, Pid=252885263002320, Title="删除", Permission="sysConfig:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002330, Pid=252885263002300, Title="字典管理", Path="/platform/dict", Name="sysDict", Component="/system/dict/index", Icon="ele-Collection", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=120 },
-            new SysMenu{ Id=252885263002331, Pid=252885263002330, Title="查询", Permission="sysDictType:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002332, Pid=252885263002330, Title="编辑", Permission="sysDictType:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002333, Pid=252885263002330, Title="增加", Permission="sysDictType:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002334, Pid=252885263002330, Title="删除", Permission="sysDictType:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002340, Pid=252885263002300, Title="任务调度", Path="/platform/timer", Name="sysTimer", Component="/system/timer/index", Icon="ele-AlarmClock", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
-            new SysMenu{ Id=252885263002341, Pid=252885263002340, Title="查询", Permission="sysTimer:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002342, Pid=252885263002340, Title="编辑", Permission="sysTimer:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002343, Pid=252885263002340, Title="增加", Permission="sysTimer:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002344, Pid=252885263002340, Title="删除", Permission="sysTimer:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002345, Pid=252885263002340, Title="状态", Permission="sysTimer:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002360, Pid=252885263002300, Title="系统监控", Path="/platform/server", Name="sysServer", Component="/system/server/index", Icon="ele-Monitor", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=140 },
-
-            new SysMenu{ Id=252885263002370, Pid=252885263002300, Title="缓存管理", Path="/platform/cache", Name="sysCache", Component="/system/cache/index", Icon="ele-Loading", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=150 },
-            new SysMenu{ Id=252885263002371, Pid=252885263002370, Title="查询", Permission="sysCache:keyList", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002372, Pid=252885263002370, Title="删除", Permission="sysCache:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002380, Pid=252885263002300, Title="行政区域", Path="/platform/region", Name="sysRegion", Component="/system/region/index", Icon="ele-LocationInformation", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=160 },
-            new SysMenu{ Id=252885263002381, Pid=252885263002380, Title="查询", Permission="sysRegion:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002382, Pid=252885263002380, Title="编辑", Permission="sysRegion:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002383, Pid=252885263002380, Title="增加", Permission="sysRegion:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002384, Pid=252885263002380, Title="删除", Permission="sysRegion:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002385, Pid=252885263002380, Title="同步", Permission="sysRegion:sync", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002390, Pid=252885263002300, Title="文件管理", Path="/platform/file", Name="sysFile", Component="/system/file/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=170 },
-            new SysMenu{ Id=252885263002391, Pid=252885263002390, Title="查询", Permission="sysFile:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002392, Pid=252885263002390, Title="上传", Permission="sysFile:upload", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002393, Pid=252885263002390, Title="下载", Permission="sysFile:download", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002394, Pid=252885263002390, Title="删除", Permission="sysFile:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002500, Pid=0, Title="日志管理", Path="/log", Name="log", Component="Layout", Redirect="/log/vislog", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=300 },
-            new SysMenu{ Id=252885263002510, Pid=252885263002500, Title="访问日志", Path="/log/vislog", Name="sysVislog", Component="/system/log/vislog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002511, Pid=252885263002510, Title="查询", Permission="sysVislog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002512, Pid=252885263002510, Title="清空", Permission="sysVislog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002520, Pid=252885263002500, Title="操作日志", Path="/log/oplog", Name="sysOplog", Component="/system/log/oplog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=110 },
-            new SysMenu{ Id=252885263002521, Pid=252885263002520, Title="查询", Permission="sysOplog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002522, Pid=252885263002520, Title="清空", Permission="sysOplog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002530, Pid=252885263002500, Title="异常日志", Path="/log/exlog", Name="sysExlog", Component="/system/log/exlog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=120 },
-            new SysMenu{ Id=252885263002531, Pid=252885263002530, Title="查询", Permission="sysExlog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002532, Pid=252885263002530, Title="清空", Permission="sysExlog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002540, Pid=252885263002500, Title="差异日志", Path="/log/difflog", Name="sysDifflog", Component="/system/log/difflog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
-            new SysMenu{ Id=252885263002541, Pid=252885263002540, Title="查询", Permission="sysDifflog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002542, Pid=252885263002540, Title="清空", Permission="sysDifflog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-
-            new SysMenu{ Id=252885263002600, Pid=0, Title="开发工具", Path="/develop", Name="develop", Component="Layout", Redirect="/develop/api", Icon="ele-Cpu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=400 },
-            new SysMenu{ Id=252885263002610, Pid=252885263002600, Title="系统接口", Path="/develop/api", Name="sysApi", Component="layout/routerView/iframe", IsIframe=true, OutLink="https://localhost:44326/api/", Icon="ele-Help", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002620, Pid=252885263002600, Title="表单设计", Path="/develop/formDes", Name="sysFormDes", Component="/system/formDes/index", Icon="ele-Edit", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=101 },
-            new SysMenu{ Id=252885263002630, Pid=252885263002600, Title="代码生成", Path="/develop/codeGen", Name="sysCodeGen", Component="/system/codeGen/index", Icon="ele-Crop", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=102 },
-            new SysMenu{ Id=252885263002640, Pid=252885263002600, Title="库表管理", Path="/develop/database", Name="sysDatabase", Component="/system/database/index",Icon="ele-Coin", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=103 },
-
-            new SysMenu{ Id=252885263002700, Pid=0, Title="帮助文档", Path="/doc", Name="doc", Component="Layout", Redirect="/doc/furion", Icon="ele-Notebook", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=500 },
-            new SysMenu{ Id=252885263002710, Pid=252885263002700, Title="后台教程", Path="/doc/furion", Name="sysFurion", Component="IFrame", IsIframe=false, IsKeepAlive=false, OutLink="https://furion.baiqian.ltd/", Icon="ele-Promotion", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263002711, Pid=252885263002700, Title="前端教程", Path="/doc/element", Name="sysElement", Component="IFrame", IsIframe=false, IsKeepAlive=false, OutLink="https://element-plus.gitee.io/zh-CN/", Icon="ele-Position", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=101 },
+            new SysMenu{ Id=252885263005200, Pid=0, Title="系统管理", Path="/system", Name="system", Component="Layout", Redirect="/system/user", Icon="ele-Setting", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005210, Pid=252885263005200, Title="账号管理", Path="/system/user", Name="sysUser", Component="/system/user/index", Icon="ele-User", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005211, Pid=252885263005210, Title="查询", Permission="sysUser:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005212, Pid=252885263005210, Title="编辑", Permission="sysUser:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005213, Pid=252885263005210, Title="增加", Permission="sysUser:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005214, Pid=252885263005210, Title="删除", Permission="sysUser:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005215, Pid=252885263005210, Title="详情", Permission="sysUser:detail", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005216, Pid=252885263005210, Title="授权角色", Permission="sysUser:grantRole", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005217, Pid=252885263005210, Title="重置密码", Permission="sysUser:resetPwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005218, Pid=252885263005210, Title="设置状态", Permission="sysUser:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005219, Pid=252885263005210, Title="修改密码", Permission="sysUser:changePwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005220, Pid=252885263005210, Title="强制下线", Permission="sysUser:forceOffline", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005230, Pid=252885263005200, Title="角色管理", Path="/system/role", Name="sysRole", Component="/system/role/index", Icon="ele-UserFilled", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=110 },
+            new SysMenu{ Id=252885263005231, Pid=252885263005230, Title="查询", Permission="sysRole:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005232, Pid=252885263005230, Title="编辑", Permission="sysRole:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005233, Pid=252885263005230, Title="增加", Permission="sysRole:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005234, Pid=252885263005230, Title="删除", Permission="sysRole:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005235, Pid=252885263005230, Title="授权菜单", Permission="sysRole:grantMenu", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005236, Pid=252885263005230, Title="授权数据", Permission="sysRole:grantData", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005237, Pid=252885263005230, Title="设置状态", Permission="sysRole:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005240, Pid=252885263005200, Title="机构管理", Path="/system/org", Name="sysOrg", Component="/system/org/index", Icon="ele-OfficeBuilding", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
+            new SysMenu{ Id=252885263005241, Pid=252885263005240, Title="查询", Permission="sysOrg:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005242, Pid=252885263005240, Title="编辑", Permission="sysOrg:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005243, Pid=252885263005240, Title="增加", Permission="sysOrg:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005244, Pid=252885263005240, Title="删除", Permission="sysOrg:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005250, Pid=252885263005200, Title="职位管理", Path="/system/pos", Name="sysPos", Component="/system/pos/index",Icon="ele-Mug", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=140 },
+            new SysMenu{ Id=252885263005251, Pid=252885263005250, Title="查询", Permission="sysPos:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005252, Pid=252885263005250, Title="编辑", Permission="sysPos:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005253, Pid=252885263005250, Title="增加", Permission="sysPos:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005254, Pid=252885263005250, Title="删除", Permission="sysPos:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005260, Pid=252885263005200, Title="个人中心", Path="/system/userCenter", Name="sysUserCenter", Component="/system/user/component/userCenter",Icon="ele-Medal", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=150 },
+            new SysMenu{ Id=252885263005261, Pid=252885263005260, Title="修改密码", Permission="sysUser:changePwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005262, Pid=252885263005260, Title="更新信息", Permission="sysUser:updateBase", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005263, Pid=252885263005260, Title="电子签名", Permission="sysUser:signature", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005270, Pid=252885263005200, Title="通知公告", Path="/system/notice", Name="sysNotice", Component="/system/notice/index",Icon="ele-Bell", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=160 },
+            new SysMenu{ Id=252885263005271, Pid=252885263005270, Title="查询", Permission="sysNotice:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005272, Pid=252885263005270, Title="编辑", Permission="sysNotice:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005273, Pid=252885263005270, Title="增加", Permission="sysNotice:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005274, Pid=252885263005270, Title="删除", Permission="sysNotice:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005275, Pid=252885263005270, Title="发布", Permission="sysNotice:public", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005276, Pid=252885263005270, Title="撤回", Permission="sysNotice:cancel", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005300, Pid=0, Title="平台管理", Path="/platform", Name="platform", Component="Layout", Redirect="/platform/tenant", Icon="ele-Menu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=200 },
+
+            new SysMenu{ Id=252885263005310, Pid=252885263005300, 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"), Order=100 },
+            new SysMenu{ Id=252885263005311, Pid=252885263005310, Title="查询", Permission="sysTenant:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005312, Pid=252885263005310, Title="编辑", Permission="sysTenant:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005313, Pid=252885263005310, Title="增加", Permission="sysTenant:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005314, Pid=252885263005310, Title="删除", Permission="sysTenant:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005315, Pid=252885263005310, Title="授权菜单", Permission="sysTenant:grantMenu", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005316, Pid=252885263005310, Title="重置密码", Permission="sysTenant:resetPwd", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005317, Pid=252885263005310, Title="生成库", Permission="sysTenant:createDb", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005320, Pid=252885263005300, Title="菜单管理", Path="/platform/menu", Name="sysMenu", Component="/system/menu/index", Icon="ele-Menu", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=120 },
+            new SysMenu{ Id=252885263005321, Pid=252885263005320, Title="查询", Permission="sysMenu:list", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005322, Pid=252885263005320, Title="编辑", Permission="sysMenu:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005323, Pid=252885263005320, Title="增加", Permission="sysMenu:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005324, Pid=252885263005320, Title="删除", Permission="sysMenu:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005330, Pid=252885263005300, Title="参数配置", Path="/platform/config", Name="sysConfig", Component="/system/config/index", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=110 },
+            new SysMenu{ Id=252885263005331, Pid=252885263005330, Title="查询", Permission="sysConfig:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005332, Pid=252885263005330, Title="编辑", Permission="sysConfig:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005333, Pid=252885263005330, Title="增加", Permission="sysConfig:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005334, Pid=252885263005330, Title="删除", Permission="sysConfig:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005340, Pid=252885263005300, Title="字典管理", Path="/platform/dict", Name="sysDict", Component="/system/dict/index", Icon="ele-Collection", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=120 },
+            new SysMenu{ Id=252885263005341, Pid=252885263005340, Title="查询", Permission="sysDictType:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005342, Pid=252885263005340, Title="编辑", Permission="sysDictType:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005343, Pid=252885263005340, Title="增加", Permission="sysDictType:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005344, Pid=252885263005340, Title="删除", Permission="sysDictType:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005350, Pid=252885263005300, Title="任务调度", Path="/platform/timer", Name="sysTimer", Component="/system/timer/index", Icon="ele-AlarmClock", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
+            new SysMenu{ Id=252885263005351, Pid=252885263005350, Title="查询", Permission="sysTimer:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005352, Pid=252885263005350, Title="编辑", Permission="sysTimer:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005353, Pid=252885263005350, Title="增加", Permission="sysTimer:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005354, Pid=252885263005350, Title="删除", Permission="sysTimer:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005355, Pid=252885263005350, Title="状态", Permission="sysTimer:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005360, Pid=252885263005300, Title="系统监控", Path="/platform/server", Name="sysServer", Component="/system/server/index", Icon="ele-Monitor", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=140 },
+
+            new SysMenu{ Id=252885263005370, Pid=252885263005300, Title="缓存管理", Path="/platform/cache", Name="sysCache", Component="/system/cache/index", Icon="ele-Loading", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=150 },
+            new SysMenu{ Id=252885263005371, Pid=252885263005370, Title="查询", Permission="sysCache:keyList", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005372, Pid=252885263005370, Title="删除", Permission="sysCache:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005380, Pid=252885263005300, Title="行政区域", Path="/platform/region", Name="sysRegion", Component="/system/region/index", Icon="ele-LocationInformation", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=160 },
+            new SysMenu{ Id=252885263005381, Pid=252885263005380, Title="查询", Permission="sysRegion:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005382, Pid=252885263005380, Title="编辑", Permission="sysRegion:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005383, Pid=252885263005380, Title="增加", Permission="sysRegion:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005384, Pid=252885263005380, Title="删除", Permission="sysRegion:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005385, Pid=252885263005380, Title="同步", Permission="sysRegion:sync", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005390, Pid=252885263005300, Title="文件管理", Path="/platform/file", Name="sysFile", Component="/system/file/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=170 },
+            new SysMenu{ Id=252885263005391, Pid=252885263005390, Title="查询", Permission="sysFile:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005392, Pid=252885263005390, Title="上传", Permission="sysFile:upload", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005393, Pid=252885263005390, Title="下载", Permission="sysFile:download", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005394, Pid=252885263005390, Title="删除", Permission="sysFile:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005500, Pid=0, Title="日志管理", Path="/log", Name="log", Component="Layout", Redirect="/log/vislog", Icon="ele-DocumentCopy", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=300 },
+            new SysMenu{ Id=252885263005510, Pid=252885263005500, Title="访问日志", Path="/log/vislog", Name="sysVislog", Component="/system/log/vislog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005511, Pid=252885263005510, Title="查询", Permission="sysVislog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005512, Pid=252885263005510, Title="清空", Permission="sysVislog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005520, Pid=252885263005500, Title="操作日志", Path="/log/oplog", Name="sysOplog", Component="/system/log/oplog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=110 },
+            new SysMenu{ Id=252885263005521, Pid=252885263005520, Title="查询", Permission="sysOplog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005522, Pid=252885263005520, Title="清空", Permission="sysOplog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005530, Pid=252885263005500, Title="异常日志", Path="/log/exlog", Name="sysExlog", Component="/system/log/exlog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=120 },
+            new SysMenu{ Id=252885263005531, Pid=252885263005530, Title="查询", Permission="sysExlog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005532, Pid=252885263005530, Title="清空", Permission="sysExlog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005540, Pid=252885263005500, Title="差异日志", Path="/log/difflog", Name="sysDifflog", Component="/system/log/difflog/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
+            new SysMenu{ Id=252885263005541, Pid=252885263005540, Title="查询", Permission="sysDifflog:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005542, Pid=252885263005540, Title="清空", Permission="sysDifflog:clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+
+            new SysMenu{ Id=252885263005600, Pid=0, Title="开发工具", Path="/develop", Name="develop", Component="Layout", Redirect="/develop/api", Icon="ele-Cpu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=400 },
+            new SysMenu{ Id=252885263005610, Pid=252885263005600, Title="系统接口", Path="/develop/api", Name="sysApi", Component="layout/routerView/iframe", IsIframe=true, OutLink="https://localhost:44326/api/", Icon="ele-Help", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005620, Pid=252885263005600, Title="表单设计", Path="/develop/formDes", Name="sysFormDes", Component="/system/formDes/index", Icon="ele-Edit", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=101 },
+            new SysMenu{ Id=252885263005630, Pid=252885263005600, Title="代码生成", Path="/develop/codeGen", Name="sysCodeGen", Component="/system/codeGen/index", Icon="ele-Crop", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=102 },
+            new SysMenu{ Id=252885263005640, Pid=252885263005600, Title="库表管理", Path="/develop/database", Name="sysDatabase", Component="/system/database/index",Icon="ele-Coin", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=103 },
+
+            new SysMenu{ Id=252885263005700, Pid=0, Title="帮助文档", Path="/doc", Name="doc", Component="Layout", Redirect="/doc/furion", Icon="ele-Notebook", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=500 },
+            new SysMenu{ Id=252885263005710, Pid=252885263005700, Title="后台教程", Path="/doc/furion", Name="sysFurion", Component="IFrame", IsIframe=false, IsKeepAlive=false, OutLink="https://furion.baiqian.ltd/", Icon="ele-Promotion", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005711, Pid=252885263005700, Title="前端教程", Path="/doc/element", Name="sysElement", Component="IFrame", IsIframe=false, IsKeepAlive=false, OutLink="https://element-plus.gitee.io/zh-CN/", Icon="ele-Position", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=101 },
         };
     }
 }

+ 15 - 14
Admin.NET/Admin.NET.Core/SeedData/SysOrgSeedData.cs

@@ -9,26 +9,27 @@ public class SysOrgSeedData : ISqlSugarEntitySeedData<SysOrg>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysOrg> HasData()
     {
         return new[]
         {
-            new SysOrg{ Id=252885263003720, Pid=0, Name="大名科技", Code="1001", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="大名科技", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003721, Pid=252885263003720, Name="市场部", Code="100101", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003722, Pid=252885263003720, Name="研发部", Code="100102", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003723, Pid=252885263003720, Name="财务部", Code="100103", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003724, Pid=252885263003723, Name="财务部1", Code="10010301", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部1", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003725, Pid=252885263003723, Name="财务部2", Code="10010302", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部2", TenantId=142307070918780 },
+            new SysOrg{ Id=252885263003720, Pid=0, Name="大名科技", Code="1001", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="大名科技", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003721, Pid=252885263003720, Name="市场部", Code="100101", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003722, Pid=252885263003720, Name="研发部", Code="100102", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003723, Pid=252885263003720, Name="财务部", Code="100103", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003724, Pid=252885263003723, Name="财务部1", Code="10010301", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部1", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003725, Pid=252885263003723, Name="财务部2", Code="10010302", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部2", TenantId=123456780000000 },
 
-            new SysOrg{ Id=252885263003730, Pid=0, Name="分公司1", Code="1002", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司1", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003731, Pid=252885263003730, Name="市场部", Code="100201", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003732, Pid=252885263003730, Name="研发部", Code="100202", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003733, Pid=252885263003730, Name="财务部", Code="100203", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=142307070918780 },
+            new SysOrg{ Id=252885263003730, Pid=0, Name="分公司1", Code="1002", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司1", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003731, Pid=252885263003730, Name="市场部", Code="100201", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003732, Pid=252885263003730, Name="研发部", Code="100202", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="研发部", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003733, Pid=252885263003730, Name="财务部", Code="100203", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="财务部", TenantId=123456780000000 },
 
-            new SysOrg{ Id=252885263003740, Pid=0, Name="分公司2", Code="1003", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司2", TenantId=142307070918780  },
-            new SysOrg{ Id=252885263003741, Pid=252885263003740, Name="市场部", Code="100301", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003742, Pid=252885263003740, Name="研发部", Code="100302", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=142307070918780 },
-            new SysOrg{ Id=252885263003743, Pid=252885263003740, Name="财务部", Code="100303", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=142307070918780 },
+            new SysOrg{ Id=252885263003740, Pid=0, Name="分公司2", Code="1003", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="分公司2", TenantId=123456780000000  },
+            new SysOrg{ Id=252885263003741, Pid=252885263003740, Name="市场部", Code="100301", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003742, Pid=252885263003740, Name="研发部", Code="100302", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=123456780000000 },
+            new SysOrg{ Id=252885263003743, Pid=252885263003740, Name="财务部", Code="100303", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="市场部", TenantId=123456780000000 },
         };
     }
 }

+ 16 - 15
Admin.NET/Admin.NET.Core/SeedData/SysPosSeedData.cs

@@ -9,25 +9,26 @@ public class SysPosSeedData : ISqlSugarEntitySeedData<SysPos>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysPos> HasData()
     {
         return new[]
         {
-            new SysPos{ Id=252885263003720, Name="党委书记", Code="dwsj", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="党委书记", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003721, Name="董事长", Code="dsz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="董事长", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003722, Name="副董事长", Code="fdsz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副董事长", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003723, Name="总经理", Code="zjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="总经理", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003724, Name="副总经理", Code="fzjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副总经理", Status=StatusEnum.Disable, TenantId=142307070918780 },
-            new SysPos{ Id=252885263003725, Name="部门经理", Code="bmjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="部门经理", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003726, Name="部门副经理", Code="bmfjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="部门副经理", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003727, Name="主任", Code="zr", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="主任", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003728, Name="副主任", Code="fzr", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副主任", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003729, Name="局长", Code="jz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="局长", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003730, Name="副局长", Code="fjz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副局长", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003731, Name="科长", Code="kz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="科长", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003732, Name="副科长", Code="fkz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副科长", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003733, Name="职员", Code="zy", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="职员", TenantId=142307070918780 },
-            new SysPos{ Id=252885263003734, Name="其他", Code="qt", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="其他", TenantId=142307070918780 },
+            new SysPos{ Id=252885263003720, Name="党委书记", Code="dwsj", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="党委书记", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003721, Name="董事长", Code="dsz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="董事长", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003722, Name="副董事长", Code="fdsz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副董事长", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003723, Name="总经理", Code="zjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="总经理", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003724, Name="副总经理", Code="fzjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副总经理", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003725, Name="部门经理", Code="bmjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="部门经理", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003726, Name="部门副经理", Code="bmfjl", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="部门副经理", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003727, Name="主任", Code="zr", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="主任", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003728, Name="副主任", Code="fzr", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副主任", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003729, Name="局长", Code="jz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="局长", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003730, Name="副局长", Code="fjz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副局长", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003731, Name="科长", Code="kz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="科长", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003732, Name="副科长", Code="fkz", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="副科长", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003733, Name="职员", Code="zy", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="职员", TenantId=123456780000000 },
+            new SysPos{ Id=252885263003734, Name="其他", Code="qt", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="其他", TenantId=123456780000000 },
         };
     }
 }

+ 101 - 106
Admin.NET/Admin.NET.Core/SeedData/SysRoleMenuSeedData.cs

@@ -9,143 +9,138 @@ public class SysRoleMenuSeedData : ISqlSugarEntitySeedData<SysRoleMenu>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysRoleMenu> HasData()
     {
         return new[]
         {
             // 数据面板【admin/252885263003721】
-            new SysRoleMenu{ Id=252885263003000, RoleId=252885263003721, MenuId=252885263002100 },
-            new SysRoleMenu{ Id=252885263003001, RoleId=252885263003721, MenuId=252885263002110 },
-            new SysRoleMenu{ Id=252885263003002, RoleId=252885263003721, MenuId=252885263002111 },
+            new SysRoleMenu{ Id=252885263003000, RoleId=252885263003721, MenuId=252885263005100 },
+            new SysRoleMenu{ Id=252885263003001, RoleId=252885263003721, MenuId=252885263005110 },
+            new SysRoleMenu{ Id=252885263003002, RoleId=252885263003721, MenuId=252885263005111 },
 
             // 系统管理
-            new SysRoleMenu{ Id=252885263003100, RoleId=252885263003721, MenuId=252885263002200 },
+            new SysRoleMenu{ Id=252885263003100, RoleId=252885263003721, MenuId=252885263005200 },
             // 账号管理
-            new SysRoleMenu{ Id=252885263003101, RoleId=252885263003721, MenuId=252885263002210 },
-            new SysRoleMenu{ Id=252885263003102, RoleId=252885263003721, MenuId=252885263002211 },
-            new SysRoleMenu{ Id=252885263003103, RoleId=252885263003721, MenuId=252885263002212 },
-            new SysRoleMenu{ Id=252885263003104, RoleId=252885263003721, MenuId=252885263002213 },
-            new SysRoleMenu{ Id=252885263003105, RoleId=252885263003721, MenuId=252885263002214 },
-            new SysRoleMenu{ Id=252885263003106, RoleId=252885263003721, MenuId=252885263002215 },
-            new SysRoleMenu{ Id=252885263003107, RoleId=252885263003721, MenuId=252885263002216 },
-            new SysRoleMenu{ Id=252885263003108, RoleId=252885263003721, MenuId=252885263002217 },
-            new SysRoleMenu{ Id=252885263003109, RoleId=252885263003721, MenuId=252885263002218 },
-            new SysRoleMenu{ Id=252885263003110, RoleId=252885263003721, MenuId=252885263002219 },
-            new SysRoleMenu{ Id=252885263013111, RoleId=252885263003721, MenuId=252885263012220 },
+            new SysRoleMenu{ Id=252885263003101, RoleId=252885263003721, MenuId=252885263005210 },
+            new SysRoleMenu{ Id=252885263003102, RoleId=252885263003721, MenuId=252885263005211 },
+            new SysRoleMenu{ Id=252885263003103, RoleId=252885263003721, MenuId=252885263005212 },
+            new SysRoleMenu{ Id=252885263003104, RoleId=252885263003721, MenuId=252885263005213 },
+            new SysRoleMenu{ Id=252885263003105, RoleId=252885263003721, MenuId=252885263005214 },
+            new SysRoleMenu{ Id=252885263003106, RoleId=252885263003721, MenuId=252885263005215 },
+            new SysRoleMenu{ Id=252885263003107, RoleId=252885263003721, MenuId=252885263005216 },
+            new SysRoleMenu{ Id=252885263003108, RoleId=252885263003721, MenuId=252885263005217 },
+            new SysRoleMenu{ Id=252885263003109, RoleId=252885263003721, MenuId=252885263005218 },
+            new SysRoleMenu{ Id=252885263003110, RoleId=252885263003721, MenuId=252885263005219 },
+            new SysRoleMenu{ Id=252885263013111, RoleId=252885263003721, MenuId=252885263005220 },
             // 角色管理
-            new SysRoleMenu{ Id=252885263003111, RoleId=252885263003721, MenuId=252885263002220 },
-            new SysRoleMenu{ Id=252885263003112, RoleId=252885263003721, MenuId=252885263002221 },
-            new SysRoleMenu{ Id=252885263003113, RoleId=252885263003721, MenuId=252885263002222 },
-            new SysRoleMenu{ Id=252885263003114, RoleId=252885263003721, MenuId=252885263002223 },
-            new SysRoleMenu{ Id=252885263003115, RoleId=252885263003721, MenuId=252885263002224 },
-            new SysRoleMenu{ Id=252885263003116, RoleId=252885263003721, MenuId=252885263002225 },
-            new SysRoleMenu{ Id=252885263003117, RoleId=252885263003721, MenuId=252885263002226 },
-            new SysRoleMenu{ Id=252885263003118, RoleId=252885263003721, MenuId=252885263002227 },
-            // 菜单管理
-            new SysRoleMenu{ Id=252885263003121, RoleId=252885263003721, MenuId=252885263002230 },
-            new SysRoleMenu{ Id=252885263003122, RoleId=252885263003721, MenuId=252885263002231 },
-            new SysRoleMenu{ Id=252885263003123, RoleId=252885263003721, MenuId=252885263002232 },
-            new SysRoleMenu{ Id=252885263003124, RoleId=252885263003721, MenuId=252885263002233 },
-            new SysRoleMenu{ Id=252885263003125, RoleId=252885263003721, MenuId=252885263002234 },
+            new SysRoleMenu{ Id=252885263003111, RoleId=252885263003721, MenuId=252885263005230 },
+            new SysRoleMenu{ Id=252885263003112, RoleId=252885263003721, MenuId=252885263005231 },
+            new SysRoleMenu{ Id=252885263003113, RoleId=252885263003721, MenuId=252885263005232 },
+            new SysRoleMenu{ Id=252885263003114, RoleId=252885263003721, MenuId=252885263005233 },
+            new SysRoleMenu{ Id=252885263003115, RoleId=252885263003721, MenuId=252885263005234 },
+            new SysRoleMenu{ Id=252885263003116, RoleId=252885263003721, MenuId=252885263005235 },
+            new SysRoleMenu{ Id=252885263003117, RoleId=252885263003721, MenuId=252885263005236 },
+            new SysRoleMenu{ Id=252885263003118, RoleId=252885263003721, MenuId=252885263005237 },
             // 机构管理
-            new SysRoleMenu{ Id=252885263003131, RoleId=252885263003721, MenuId=252885263002240 },
-            new SysRoleMenu{ Id=252885263003132, RoleId=252885263003721, MenuId=252885263002241 },
-            new SysRoleMenu{ Id=252885263003133, RoleId=252885263003721, MenuId=252885263002242 },
-            new SysRoleMenu{ Id=252885263003134, RoleId=252885263003721, MenuId=252885263002243 },
-            new SysRoleMenu{ Id=252885263003135, RoleId=252885263003721, MenuId=252885263002244 },
+            new SysRoleMenu{ Id=252885263003131, RoleId=252885263003721, MenuId=252885263005240 },
+            new SysRoleMenu{ Id=252885263003132, RoleId=252885263003721, MenuId=252885263005241 },
+            new SysRoleMenu{ Id=252885263003133, RoleId=252885263003721, MenuId=252885263005242 },
+            new SysRoleMenu{ Id=252885263003134, RoleId=252885263003721, MenuId=252885263005243 },
+            new SysRoleMenu{ Id=252885263003135, RoleId=252885263003721, MenuId=252885263005244 },
             // 职位管理
-            new SysRoleMenu{ Id=252885263003141, RoleId=252885263003721, MenuId=252885263002250 },
-            new SysRoleMenu{ Id=252885263003142, RoleId=252885263003721, MenuId=252885263002251 },
-            new SysRoleMenu{ Id=252885263003143, RoleId=252885263003721, MenuId=252885263002252 },
-            new SysRoleMenu{ Id=252885263003144, RoleId=252885263003721, MenuId=252885263002253 },
-            new SysRoleMenu{ Id=252885263003145, RoleId=252885263003721, MenuId=252885263002254 },
+            new SysRoleMenu{ Id=252885263003141, RoleId=252885263003721, MenuId=252885263005250 },
+            new SysRoleMenu{ Id=252885263003142, RoleId=252885263003721, MenuId=252885263005251 },
+            new SysRoleMenu{ Id=252885263003143, RoleId=252885263003721, MenuId=252885263005252 },
+            new SysRoleMenu{ Id=252885263003144, RoleId=252885263003721, MenuId=252885263005253 },
+            new SysRoleMenu{ Id=252885263003145, RoleId=252885263003721, MenuId=252885263005254 },
             // 个人中心
-            new SysRoleMenu{ Id=252885263003151, RoleId=252885263003721, MenuId=252885263002260 },
-            new SysRoleMenu{ Id=252885263003152, RoleId=252885263003721, MenuId=252885263002261 },
-            new SysRoleMenu{ Id=252885263003153, RoleId=252885263003721, MenuId=252885263002262 },
-            new SysRoleMenu{ Id=252885263003154, RoleId=252885263003721, MenuId=252885263002263 },
+            new SysRoleMenu{ Id=252885263003151, RoleId=252885263003721, MenuId=252885263005260 },
+            new SysRoleMenu{ Id=252885263003152, RoleId=252885263003721, MenuId=252885263005261 },
+            new SysRoleMenu{ Id=252885263003153, RoleId=252885263003721, MenuId=252885263005262 },
+            new SysRoleMenu{ Id=252885263003154, RoleId=252885263003721, MenuId=252885263005263 },
             // 通知公告
-            new SysRoleMenu{ Id=252885263003161, RoleId=252885263003721, MenuId=252885263002270 },
-            new SysRoleMenu{ Id=252885263003162, RoleId=252885263003721, MenuId=252885263002271 },
-            new SysRoleMenu{ Id=252885263003163, RoleId=252885263003721, MenuId=252885263002272 },
-            new SysRoleMenu{ Id=252885263003164, RoleId=252885263003721, MenuId=252885263002273 },
-            new SysRoleMenu{ Id=252885263003165, RoleId=252885263003721, MenuId=252885263002274 },
-            new SysRoleMenu{ Id=252885263003166, RoleId=252885263003721, MenuId=252885263002275 },
-            new SysRoleMenu{ Id=252885263003167, RoleId=252885263003721, MenuId=252885263002276 },
+            new SysRoleMenu{ Id=252885263003161, RoleId=252885263003721, MenuId=252885263005270 },
+            new SysRoleMenu{ Id=252885263003162, RoleId=252885263003721, MenuId=252885263005271 },
+            new SysRoleMenu{ Id=252885263003163, RoleId=252885263003721, MenuId=252885263005272 },
+            new SysRoleMenu{ Id=252885263003164, RoleId=252885263003721, MenuId=252885263005273 },
+            new SysRoleMenu{ Id=252885263003165, RoleId=252885263003721, MenuId=252885263005274 },
+            new SysRoleMenu{ Id=252885263003166, RoleId=252885263003721, MenuId=252885263005275 },
+            new SysRoleMenu{ Id=252885263003167, RoleId=252885263003721, MenuId=252885263005276 },
 
             // 平台管理
-            new SysRoleMenu{ Id=252885263003200, RoleId=252885263003721, MenuId=252885263002300 },
-            // 参数配置
-            new SysRoleMenu{ Id=252885263003201, RoleId=252885263003721, MenuId=252885263002320 },
-            new SysRoleMenu{ Id=252885263003202, RoleId=252885263003721, MenuId=252885263002321 },
-            new SysRoleMenu{ Id=252885263003203, RoleId=252885263003721, MenuId=252885263002322 },
-            new SysRoleMenu{ Id=252885263003204, RoleId=252885263003721, MenuId=252885263002323 },
-            new SysRoleMenu{ Id=252885263003205, RoleId=252885263003721, MenuId=252885263002324 },
-            // 字典管理
-            new SysRoleMenu{ Id=252885263003211, RoleId=252885263003721, MenuId=252885263002330 },
-            new SysRoleMenu{ Id=252885263003212, RoleId=252885263003721, MenuId=252885263002331 },
-            new SysRoleMenu{ Id=252885263003213, RoleId=252885263003721, MenuId=252885263002332 },
-            new SysRoleMenu{ Id=252885263003214, RoleId=252885263003721, MenuId=252885263002333 },
-            new SysRoleMenu{ Id=252885263003215, RoleId=252885263003721, MenuId=252885263002334 },
+            new SysRoleMenu{ Id=252885263003200, RoleId=252885263003721, MenuId=252885263005300 },
+            //// 参数配置
+            //new SysRoleMenu{ Id=252885263003201, RoleId=252885263003721, MenuId=252885263005320 },
+            //new SysRoleMenu{ Id=252885263003202, RoleId=252885263003721, MenuId=252885263005321 },
+            //new SysRoleMenu{ Id=252885263003203, RoleId=252885263003721, MenuId=252885263005322 },
+            //new SysRoleMenu{ Id=252885263003204, RoleId=252885263003721, MenuId=252885263005323 },
+            //new SysRoleMenu{ Id=252885263003205, RoleId=252885263003721, MenuId=252885263005324 },
+            //// 字典管理
+            //new SysRoleMenu{ Id=252885263003211, RoleId=252885263003721, MenuId=252885263005330 },
+            //new SysRoleMenu{ Id=252885263003212, RoleId=252885263003721, MenuId=252885263005331 },
+            //new SysRoleMenu{ Id=252885263003213, RoleId=252885263003721, MenuId=252885263005332 },
+            //new SysRoleMenu{ Id=252885263003214, RoleId=252885263003721, MenuId=252885263005333 },
+            //new SysRoleMenu{ Id=252885263003215, RoleId=252885263003721, MenuId=252885263005334 },
             // 系统监控
-            new SysRoleMenu{ Id=252885263003231, RoleId=252885263003721, MenuId=252885263002360 },
+            new SysRoleMenu{ Id=252885263003231, RoleId=252885263003721, MenuId=252885263005360 },
             // 缓存管理
-            new SysRoleMenu{ Id=252885263003241, RoleId=252885263003721, MenuId=252885263002370 },
-            new SysRoleMenu{ Id=252885263003242, RoleId=252885263003721, MenuId=252885263002371 },
-            new SysRoleMenu{ Id=252885263003243, RoleId=252885263003721, MenuId=252885263002372 },
+            new SysRoleMenu{ Id=252885263003241, RoleId=252885263003721, MenuId=252885263005370 },
+            new SysRoleMenu{ Id=252885263003242, RoleId=252885263003721, MenuId=252885263005371 },
+            new SysRoleMenu{ Id=252885263003243, RoleId=252885263003721, MenuId=252885263005372 },
             // 行政区域
-            new SysRoleMenu{ Id=252885263003251, RoleId=252885263003721, MenuId=252885263002380 },
-            new SysRoleMenu{ Id=252885263003252, RoleId=252885263003721, MenuId=252885263002381 },
-            new SysRoleMenu{ Id=252885263003253, RoleId=252885263003721, MenuId=252885263002382 },
-            new SysRoleMenu{ Id=252885263003254, RoleId=252885263003721, MenuId=252885263002383 },
-            new SysRoleMenu{ Id=252885263003255, RoleId=252885263003721, MenuId=252885263002384 },
-            new SysRoleMenu{ Id=252885263003256, RoleId=252885263003721, MenuId=252885263002385 },
+            new SysRoleMenu{ Id=252885263003251, RoleId=252885263003721, MenuId=252885263005380 },
+            new SysRoleMenu{ Id=252885263003252, RoleId=252885263003721, MenuId=252885263005381 },
+            new SysRoleMenu{ Id=252885263003253, RoleId=252885263003721, MenuId=252885263005382 },
+            new SysRoleMenu{ Id=252885263003254, RoleId=252885263003721, MenuId=252885263005383 },
+            new SysRoleMenu{ Id=252885263003255, RoleId=252885263003721, MenuId=252885263005384 },
+            new SysRoleMenu{ Id=252885263003256, RoleId=252885263003721, MenuId=252885263005385 },
             // 文件管理
-            new SysRoleMenu{ Id=252885263003261, RoleId=252885263003721, MenuId=252885263002390 },
-            new SysRoleMenu{ Id=252885263003262, RoleId=252885263003721, MenuId=252885263002391 },
-            new SysRoleMenu{ Id=252885263003263, RoleId=252885263003721, MenuId=252885263002392 },
-            new SysRoleMenu{ Id=252885263003264, RoleId=252885263003721, MenuId=252885263002393 },
-            new SysRoleMenu{ Id=252885263003265, RoleId=252885263003721, MenuId=252885263002394 },
+            new SysRoleMenu{ Id=252885263003261, RoleId=252885263003721, MenuId=252885263005390 },
+            new SysRoleMenu{ Id=252885263003262, RoleId=252885263003721, MenuId=252885263005391 },
+            new SysRoleMenu{ Id=252885263003263, RoleId=252885263003721, MenuId=252885263005392 },
+            new SysRoleMenu{ Id=252885263003264, RoleId=252885263003721, MenuId=252885263005393 },
+            new SysRoleMenu{ Id=252885263003265, RoleId=252885263003721, MenuId=252885263005394 },
 
             // 日志管理
-            new SysRoleMenu{ Id=252885263003300, RoleId=252885263003721, MenuId=252885263002500 },
-            new SysRoleMenu{ Id=252885263003301, RoleId=252885263003721, MenuId=252885263002510 },
-            new SysRoleMenu{ Id=252885263003302, RoleId=252885263003721, MenuId=252885263002511 },
-            new SysRoleMenu{ Id=252885263003311, RoleId=252885263003721, MenuId=252885263002520 },
-            new SysRoleMenu{ Id=252885263003312, RoleId=252885263003721, MenuId=252885263002521 },
-            new SysRoleMenu{ Id=252885263003321, RoleId=252885263003721, MenuId=252885263002530 },
-            new SysRoleMenu{ Id=252885263003322, RoleId=252885263003721, MenuId=252885263002531 },
-            new SysRoleMenu{ Id=252885263003331, RoleId=252885263003721, MenuId=252885263002540 },
-            new SysRoleMenu{ Id=252885263003332, RoleId=252885263003721, MenuId=252885263002541 },
+            new SysRoleMenu{ Id=252885263003300, RoleId=252885263003721, MenuId=252885263005500 },
+            new SysRoleMenu{ Id=252885263003301, RoleId=252885263003721, MenuId=252885263005510 },
+            new SysRoleMenu{ Id=252885263003302, RoleId=252885263003721, MenuId=252885263005511 },
+            new SysRoleMenu{ Id=252885263003311, RoleId=252885263003721, MenuId=252885263005520 },
+            new SysRoleMenu{ Id=252885263003312, RoleId=252885263003721, MenuId=252885263005521 },
+            new SysRoleMenu{ Id=252885263003321, RoleId=252885263003721, MenuId=252885263005530 },
+            new SysRoleMenu{ Id=252885263003322, RoleId=252885263003721, MenuId=252885263005531 },
+            new SysRoleMenu{ Id=252885263003331, RoleId=252885263003721, MenuId=252885263005540 },
+            new SysRoleMenu{ Id=252885263003332, RoleId=252885263003721, MenuId=252885263005541 },
 
             // 帮助文档
-            new SysRoleMenu{ Id=252885263003500, RoleId=252885263003721, MenuId=252885263002700 },
-            new SysRoleMenu{ Id=252885263003501, RoleId=252885263003721, MenuId=252885263002710 },
-            new SysRoleMenu{ Id=252885263003502, RoleId=252885263003721, MenuId=252885263002711 },
+            new SysRoleMenu{ Id=252885263003500, RoleId=252885263003721, MenuId=252885263005700 },
+            new SysRoleMenu{ Id=252885263003501, RoleId=252885263003721, MenuId=252885263005710 },
+            new SysRoleMenu{ Id=252885263003502, RoleId=252885263003721, MenuId=252885263005711 },
 
             // 数据面板【user1/252885263003722】
-            new SysRoleMenu{ Id=252885263004000, RoleId=252885263003722, MenuId=252885263002100 },
-            new SysRoleMenu{ Id=252885263004001, RoleId=252885263003722, MenuId=252885263002110 },
-            new SysRoleMenu{ Id=252885263004002, RoleId=252885263003722, MenuId=252885263002111 },
+            new SysRoleMenu{ Id=252885263004000, RoleId=252885263003722, MenuId=252885263005100 },
+            new SysRoleMenu{ Id=252885263004001, RoleId=252885263003722, MenuId=252885263005110 },
+            new SysRoleMenu{ Id=252885263004002, RoleId=252885263003722, MenuId=252885263005111 },
             // 系统管理
-            new SysRoleMenu{ Id=252885263004100, RoleId=252885263003722, MenuId=252885263002200 },
+            new SysRoleMenu{ Id=252885263004100, RoleId=252885263003722, MenuId=252885263005200 },
             // 个人中心
-            new SysRoleMenu{ Id=252885263004151, RoleId=252885263003722, MenuId=252885263002260 },
-            new SysRoleMenu{ Id=252885263004152, RoleId=252885263003722, MenuId=252885263002261 },
-            new SysRoleMenu{ Id=252885263004153, RoleId=252885263003722, MenuId=252885263002262 },
-            new SysRoleMenu{ Id=252885263004154, RoleId=252885263003722, MenuId=252885263002263 },
+            new SysRoleMenu{ Id=252885263004151, RoleId=252885263003722, MenuId=252885263005260 },
+            new SysRoleMenu{ Id=252885263004152, RoleId=252885263003722, MenuId=252885263005261 },
+            new SysRoleMenu{ Id=252885263004153, RoleId=252885263003722, MenuId=252885263005262 },
+            new SysRoleMenu{ Id=252885263004154, RoleId=252885263003722, MenuId=252885263005263 },
 
             // 数据面板【user3/252885263003724】
-            new SysRoleMenu{ Id=252885263005000, RoleId=252885263003724, MenuId=252885263002100 },
-            new SysRoleMenu{ Id=252885263005001, RoleId=252885263003724, MenuId=252885263002110 },
-            new SysRoleMenu{ Id=252885263005002, RoleId=252885263003724, MenuId=252885263002111 },
+            new SysRoleMenu{ Id=252885263005000, RoleId=252885263003724, MenuId=252885263005100 },
+            new SysRoleMenu{ Id=252885263005001, RoleId=252885263003724, MenuId=252885263005110 },
+            new SysRoleMenu{ Id=252885263005002, RoleId=252885263003724, MenuId=252885263005111 },
             // 系统管理
-            new SysRoleMenu{ Id=252885263005100, RoleId=252885263003724, MenuId=252885263002200 },
+            new SysRoleMenu{ Id=252885263005100, RoleId=252885263003724, MenuId=252885263005200 },
             // 个人中心
-            new SysRoleMenu{ Id=252885263005151, RoleId=252885263003724, MenuId=252885263002260},
-            new SysRoleMenu{ Id=252885263005152, RoleId=252885263003724, MenuId=252885263002261 },
-            new SysRoleMenu{ Id=252885263005153, RoleId=252885263003724, MenuId=252885263002262 },
-            new SysRoleMenu{ Id=252885263005154, RoleId=252885263003724, MenuId=252885263002263 },
+            new SysRoleMenu{ Id=252885263005151, RoleId=252885263003724, MenuId=252885263005260},
+            new SysRoleMenu{ Id=252885263005152, RoleId=252885263003724, MenuId=252885263005261 },
+            new SysRoleMenu{ Id=252885263005153, RoleId=252885263003724, MenuId=252885263005262 },
+            new SysRoleMenu{ Id=252885263005154, RoleId=252885263003724, MenuId=252885263005263 },
         };
     }
 }

+ 6 - 5
Admin.NET/Admin.NET.Core/SeedData/SysRoleSeedData.cs

@@ -9,15 +9,16 @@ public class SysRoleSeedData : ISqlSugarEntitySeedData<SysRole>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysRole> HasData()
     {
         return new[]
         {
-            new SysRole{ Id=252885263003721, Name="系统管理员", DataScope=DataScopeEnum.All, Code="sys_admin", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="系统管理员", TenantId=142307070918780 },
-            new SysRole{ Id=252885263003722, Name="本部门及以下数据", DataScope=DataScopeEnum.DeptChild, Code="sys_deptChild", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="本部门及以下数据", TenantId=142307070918780 },
-            new SysRole{ Id=252885263003723, Name="本部门数据", DataScope=DataScopeEnum.Dept, Code="sys_dept", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="本部门数据", TenantId=142307070918780 },
-            new SysRole{ Id=252885263003724, Name="仅本人数据", DataScope=DataScopeEnum.Self, Code="sys_self", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="仅本人数据", TenantId=142307070918780 },
-            new SysRole{ Id=252885263003725, Name="自定义数据", DataScope=DataScopeEnum.Define, Code="sys_define", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="自定义数据", TenantId=142307070918780 },
+            new SysRole{ Id=252885263003721, Name="系统管理员", DataScope=DataScopeEnum.All, Code="sys_admin", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="系统管理员", TenantId=123456780000000 },
+            new SysRole{ Id=252885263003722, Name="本部门及以下数据", DataScope=DataScopeEnum.DeptChild, Code="sys_deptChild", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="本部门及以下数据", TenantId=123456780000000 },
+            new SysRole{ Id=252885263003723, Name="本部门数据", DataScope=DataScopeEnum.Dept, Code="sys_dept", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="本部门数据", TenantId=123456780000000 },
+            new SysRole{ Id=252885263003724, Name="仅本人数据", DataScope=DataScopeEnum.Self, Code="sys_self", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="仅本人数据", TenantId=123456780000000 },
+            new SysRole{ Id=252885263003725, Name="自定义数据", DataScope=DataScopeEnum.Define, Code="sys_define", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Remark="自定义数据", TenantId=123456780000000 },
         };
     }
 }

+ 2 - 1
Admin.NET/Admin.NET.Core/SeedData/SysTenantSeedData.cs

@@ -9,11 +9,12 @@ public class SysTenantSeedData : ISqlSugarEntitySeedData<SysTenant>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysTenant> HasData()
     {
         return new[]
         {
-            new SysTenant{ Id=142307070918780, Name="系统默认", AdminName="Administrator", Host="www.dilon.vip", Email="zuohuaijun@163.com", Phone="18020030720", TenantType=TenantTypeEnum.Db, DbType=SqlSugar.DbType.Sqlite, Connection="DataSource=./Admin.NET.db", ConfigId=SqlSugarConst.ConfigId, Remark="系统默认", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
+            new SysTenant{ Id=123456780000000, Name="系统默认", AdminName="Administrator", Host="www.dilon.vip", Email="zuohuaijun@163.com", Phone="18020030720", TenantType=TenantTypeEnum.Db, DbType=SqlSugar.DbType.Sqlite, Connection="DataSource=./Admin.NET.db", ConfigId=SqlSugarConst.ConfigId, Remark="系统默认", CreateTime=DateTime.Parse("2022-02-10 00:00:00") },
         };
     }
 }

+ 1 - 0
Admin.NET/Admin.NET.Core/SeedData/SysUserExtOrgSeedData.cs

@@ -9,6 +9,7 @@ public class SysUserExtOrgSeedData : ISqlSugarEntitySeedData<SysUserExtOrg>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysUserExtOrg> HasData()
     {
         return new[]

+ 1 - 0
Admin.NET/Admin.NET.Core/SeedData/SysUserRoleSeedData.cs

@@ -9,6 +9,7 @@ public class SysUserRoleSeedData : ISqlSugarEntitySeedData<SysUserRole>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysUserRole> HasData()
     {
         return new[]

+ 7 - 6
Admin.NET/Admin.NET.Core/SeedData/SysUserSeedData.cs

@@ -9,16 +9,17 @@ public class SysUserSeedData : ISqlSugarEntitySeedData<SysUser>
     /// 种子数据
     /// </summary>
     /// <returns></returns>
+    [IgnoreUpdate]
     public IEnumerable<SysUser> HasData()
     {
         return new[]
         {
-            new SysUser{ Id=252885263000000, Account="superadmin", Password="e10adc3949ba59abbe56e057f20f883e", NickName="超级管理员", RealName="超级管理员", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Male, AccountType=AccountTypeEnum.SuperAdmin, Remark="超级管理员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), TenantId=142307070918780 },
-            new SysUser{ Id=252885263003721, Account="admin", Password="e10adc3949ba59abbe56e057f20f883e", NickName="系统管理员", RealName="系统管理员", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Male, AccountType=AccountTypeEnum.Admin, Remark="系统管理员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003720, PosId=252885263003721, TenantId=142307070918780 },
-            new SysUser{ Id=252885263003722, Account="user1", Password="e10adc3949ba59abbe56e057f20f883e", NickName="部门主管", RealName="部门主管", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.User, Remark="部门主管", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003721, PosId=252885263003727, TenantId=142307070918780 },
-            new SysUser{ Id=252885263003723, Account="user2", Password="e10adc3949ba59abbe56e057f20f883e", NickName="部门职员", RealName="部门职员", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.User, Remark="部门职员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003722, PosId=252885263003729, TenantId=142307070918780 },
-            new SysUser{ Id=252885263003724, Account="user3", Password="e10adc3949ba59abbe56e057f20f883e", NickName="普通用户", RealName="普通用户", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.User, Remark="普通用户", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003723, PosId=252885263003729, TenantId=142307070918780 },
-            new SysUser{ Id=252885263003725, Account="user4", Password="e10adc3949ba59abbe56e057f20f883e", NickName="其他", RealName="其他", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.None, Remark="普通用户", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003724, PosId=252885263003729, TenantId=142307070918780 },
+            new SysUser{ Id=252885263000000, Account="superadmin", Password="e10adc3949ba59abbe56e057f20f883e", NickName="超级管理员", RealName="超级管理员", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Male, AccountType=AccountTypeEnum.SuperAdmin, Remark="超级管理员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), TenantId=123456780000000 },
+            new SysUser{ Id=252885263003721, Account="admin", Password="e10adc3949ba59abbe56e057f20f883e", NickName="系统管理员", RealName="系统管理员", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Male, AccountType=AccountTypeEnum.Admin, Remark="系统管理员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003720, PosId=252885263003721, TenantId=123456780000000 },
+            new SysUser{ Id=252885263003722, Account="user1", Password="e10adc3949ba59abbe56e057f20f883e", NickName="部门主管", RealName="部门主管", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.User, Remark="部门主管", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003721, PosId=252885263003727, TenantId=123456780000000 },
+            new SysUser{ Id=252885263003723, Account="user2", Password="e10adc3949ba59abbe56e057f20f883e", NickName="部门职员", RealName="部门职员", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.User, Remark="部门职员", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003722, PosId=252885263003729, TenantId=123456780000000 },
+            new SysUser{ Id=252885263003724, Account="user3", Password="e10adc3949ba59abbe56e057f20f883e", NickName="普通用户", RealName="普通用户", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.User, Remark="普通用户", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003723, PosId=252885263003729, TenantId=123456780000000 },
+            new SysUser{ Id=252885263003725, Account="user4", Password="e10adc3949ba59abbe56e057f20f883e", NickName="其他", RealName="其他", Phone="18020030720", Birthday=DateTime.Parse("1986-06-28"), Sex=GenderEnum.Female, AccountType=AccountTypeEnum.None, Remark="普通用户", CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrgId=252885263003724, PosId=252885263003729, TenantId=123456780000000 },
         };
     }
 }

+ 0 - 5
Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginInput.cs

@@ -28,9 +28,4 @@ public class LoginInput
     /// 验证码
     /// </summary>
     public string Code { get; set; }
-
-    /// <summary>
-    /// 租户Id
-    /// </summary>
-    public long TenantId { get; set; }
 }

+ 4 - 19
Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs

@@ -16,7 +16,6 @@ public class SysAuthService : IDynamicApiController, ITransient
     private readonly IHttpContextAccessor _httpContextAccessor;
     private readonly IEventPublisher _eventPublisher;
     private readonly SysMenuService _sysMenuService;
-    private readonly SysTenantService _sysTenantService;
     private readonly SysOnlineUserService _sysOnlineUserService;
     private readonly SysConfigService _sysConfigService;
     private readonly IMemoryCache _cache;
@@ -28,7 +27,6 @@ public class SysAuthService : IDynamicApiController, ITransient
         IHttpContextAccessor httpContextAccessor,
         IEventPublisher eventPublisher,
         SysMenuService sysMenuService,
-        SysTenantService sysTenantService,
         SysOnlineUserService sysOnlineUserService,
         SysConfigService sysConfigService,
         IMemoryCache cache,
@@ -40,7 +38,6 @@ public class SysAuthService : IDynamicApiController, ITransient
         _refreshTokenOptions = refreshTokenOptions.Value;
         _eventPublisher = eventPublisher;
         _sysMenuService = sysMenuService;
-        _sysTenantService = sysTenantService;
         _sysOnlineUserService = sysOnlineUserService;
         _sysConfigService = sysConfigService;
         _cache = cache;
@@ -58,8 +55,8 @@ public class SysAuthService : IDynamicApiController, ITransient
     [SuppressMonitor]
     public async Task<LoginOutput> Login([Required] LoginInput input)
     {
-        // 记录当前租户
-        _userManager.TenantId = input.TenantId;
+        //// 可以根据域名获取具体租户
+        //var host = _httpContextAccessor.HttpContext.Request.Host;
 
         // 判断验证码
         var captchaEnabled = await GetCaptchaFlag();
@@ -69,7 +66,8 @@ public class SysAuthService : IDynamicApiController, ITransient
         var encryptPasswod = MD5Encryption.Encrypt(input.Password);
 
         // 判断用户名密码
-        var user = await _sysUserRep.GetFirstAsync(u => u.Account.Equals(input.Account) && u.Password.Equals(encryptPasswod));
+        var user = await _sysUserRep.AsQueryable().Filter(null, true)
+            .FirstAsync(u => u.Account.Equals(input.Account) && u.Password.Equals(encryptPasswod));
         _ = user ?? throw Oops.Oh(ErrorCodeEnum.D1000);
 
         // 账号是否被冻结
@@ -216,19 +214,6 @@ public class SysAuthService : IDynamicApiController, ITransient
         return new { Id = codeId, Img = captcha.Base64 };
     }
 
-    /// <summary>
-    /// 是否启用多库租户
-    /// </summary>
-    /// <returns></returns>
-    [HttpGet("/tenantDbList")]
-    [AllowAnonymous]
-    [SuppressMonitor]
-    public async Task<List<SysTenant>> GetTenantDbList()
-    {
-        var tenantDbEnabled = await _sysConfigService.GetConfigValue<bool>(CommonConst.SysTenantDb);
-        return tenantDbEnabled ? await _sysTenantService.GetTenantDbList() : new List<SysTenant>();
-    }
-
     /// <summary>
     /// Swagger登录检查
     /// </summary>

+ 20 - 5
Admin.NET/Admin.NET.Core/Service/Menu/SysMenuService.cs

@@ -1,5 +1,3 @@
-using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinUserInfoBatchGetResponse.Types;
-
 namespace Admin.NET.Core.Service;
 
 /// <summary>
@@ -45,18 +43,35 @@ public class SysMenuService : IDynamicApiController, ITransient
         {
             var menuIdList = await GetMenuIdList();
             var menuList = await _sysMenuRep.AsQueryable()
-                .Where(u => u.Type != MenuTypeEnum.Btn)
-                .Where(u => menuIdList.Contains(u.Id))
-                .OrderBy(u => u.Order).ToTreeAsync(u => u.Children, u => u.Pid, 0);
+                //.Where(u => u.Type != MenuTypeEnum.Btn)
+                //.Where(u => menuIdList.Contains(u.Id))
+                .OrderBy(u => u.Order).ToTreeAsync(u => u.Children, u => u.Pid, 0, menuIdList.Select(d => (object)d).ToArray());
+            DeleteBtnFromMenuTree(menuList);
             return menuList.Adapt<List<MenuOutput>>();
         }
     }
 
+    /// <summary>
+    /// 删除登录菜单树里面的按钮
+    /// </summary>
+    private void DeleteBtnFromMenuTree(List<SysMenu> menuList)
+    {
+        for (var i = menuList.Count - 1; i >= 0; i--)
+        {
+            var menu = menuList[i];
+            if (menu.Type == MenuTypeEnum.Btn)
+                menuList.Remove(menu);
+            else if (menu.Children.Count > 0)
+                DeleteBtnFromMenuTree(menu.Children);
+        }
+    }
+
     /// <summary>
     /// 获取菜单列表
     /// </summary>
     /// <returns></returns>
     [HttpGet("/sysMenu/list")]
+    [AllowAnonymous]
     public async Task<List<SysMenu>> GetMenuList([FromQuery] MenuInput input)
     {
         var menuIdList = new List<long>();

+ 5 - 2
Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs

@@ -68,7 +68,7 @@ public class SysOrgService : IDynamicApiController, ITransient
     [HttpPost("/sysOrg/add")]
     public async Task<long> AddOrg(AddOrgInput input)
     {
-        var isExist = await _sysOrgRep.IsAnyAsync(u => u.Code == input.Code && u.Name == input.Name);
+        var isExist = await _sysOrgRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code);
         if (isExist)
             throw Oops.Oh(ErrorCodeEnum.D2002);
 
@@ -108,7 +108,7 @@ public class SysOrgService : IDynamicApiController, ITransient
             throw Oops.Oh(ErrorCodeEnum.D2001);
 
         var sysOrg = await _sysOrgRep.GetFirstAsync(u => u.Id == input.Id);
-        var isExist = await _sysOrgRep.IsAnyAsync(u => (u.Name == input.Name && u.Code == input.Code) && u.Id != sysOrg.Id);
+        var isExist = await _sysOrgRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code && u.Id != sysOrg.Id);
         if (isExist)
             throw Oops.Oh(ErrorCodeEnum.D2002);
 
@@ -183,6 +183,9 @@ public class SysOrgService : IDynamicApiController, ITransient
             var orgList2 = await GetUserRoleOrgIdList(userId);
             // 机构并集
             orgIdList = orgList1.Select(u => u.OrgId).Union(orgList2).ToList();
+            // 当前所属机构
+            if (!orgIdList.Contains(_userManager.OrgId))
+                orgIdList.Add(_userManager.OrgId);
             _sysCacheService.Set(CacheConst.KeyOrgIdList + userId, orgIdList); // 存缓存
         }
         return orgIdList;

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/Pos/SysPosService.cs

@@ -53,7 +53,7 @@ public class SysPosService : IDynamicApiController, ITransient
     [HttpPost("/sysPos/update")]
     public async Task UpdatePos(UpdatePosInput input)
     {
-        var isExist = await _sysPosRep.IsAnyAsync(u => (u.Name == input.Name || u.Code == input.Code) && u.Id != input.Id);
+        var isExist = await _sysPosRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code && u.Id != input.Id);
         if (isExist)
             throw Oops.Oh(ErrorCodeEnum.D6000);
 

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/Region/SysRegionService.cs

@@ -50,7 +50,7 @@ public class SysRegionService : IDynamicApiController, ITransient
     [HttpPost("/sysRegion/add")]
     public async Task<long> AddRegion(AddRegionInput input)
     {
-        var isExist = await _sysRegionRep.IsAnyAsync(u => u.Code == input.Code && u.Name == input.Name);
+        var isExist = await _sysRegionRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code);
         if (isExist)
             throw Oops.Oh(ErrorCodeEnum.R2002);
 

+ 3 - 17
Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs

@@ -53,13 +53,7 @@ public class SysRoleService : IDynamicApiController, ITransient
     [HttpGet("/sysRole/list")]
     public async Task<List<RoleOutput>> GetRoleList()
     {
-        //// 若非超级管理员则只取拥有角色Id集合
-        //var roleIdList = _userManager.SuperAdmin ? new List<long>() :
-        //    await _sysUserRoleService.GetUserRoleIdList(_userManager.UserId);
-
-        return await _sysRoleRep.AsQueryable()
-            //.WhereIF(roleIdList.Count > 0, u => roleIdList.Contains(u.Id))
-            .OrderBy(u => u.Order).Select<RoleOutput>().ToListAsync();
+        return await _sysRoleRep.AsQueryable().OrderBy(u => u.Order).Select<RoleOutput>().ToListAsync();
     }
 
     /// <summary>
@@ -70,7 +64,7 @@ public class SysRoleService : IDynamicApiController, ITransient
     [HttpPost("/sysRole/add")]
     public async Task AddRole(AddRoleInput input)
     {
-        var isExist = await _sysRoleRep.IsAnyAsync(u => u.Code == input.Code || u.Name == input.Name);
+        var isExist = await _sysRoleRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code);
         if (isExist)
             throw Oops.Oh(ErrorCodeEnum.D1006);
 
@@ -103,11 +97,7 @@ public class SysRoleService : IDynamicApiController, ITransient
     [HttpPost("/sysRole/update")]
     public async Task UpdateRole(UpdateRoleInput input)
     {
-        var adminRole = await _sysRoleRep.GetFirstAsync(u => u.Id == input.Id);
-        if (adminRole.Code == CommonConst.SysAdminRole)
-            throw Oops.Oh(ErrorCodeEnum.D1020);
-
-        var isExist = await _sysRoleRep.IsAnyAsync(u => (u.Name == input.Name || u.Code == input.Code) && u.Id != input.Id);
+        var isExist = await _sysRoleRep.IsAnyAsync(u => u.Name == input.Name && u.Code == input.Code && u.Id != input.Id);
         if (isExist)
             throw Oops.Oh(ErrorCodeEnum.D1006);
 
@@ -150,10 +140,6 @@ public class SysRoleService : IDynamicApiController, ITransient
     [HttpPost("/sysRole/grantMenu")]
     public async Task GrantRoleMenu(RoleMenuInput input)
     {
-        var role = await _sysRoleRep.GetFirstAsync(u => u.Id == input.Id);
-        if (!_userManager.SuperAdmin && role.Code == CommonConst.SysAdminRole)
-            throw Oops.Oh(ErrorCodeEnum.D1021);
-
         await _sysRoleMenuService.GrantRoleMenu(input);
     }
 

+ 4 - 0
Admin.NET/Admin.NET.Core/Service/Tenant/Dto/TenantInput.cs

@@ -2,6 +2,10 @@
 
 public class TenantInput : BaseIdInput
 {
+    /// <summary>
+    /// 状态
+    /// </summary>
+    public StatusEnum Status { get; set; }
 }
 
 public class PageTenantInput : BasePageInput

+ 44 - 13
Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs

@@ -18,7 +18,6 @@ public class SysTenantService : IDynamicApiController, ITransient
     private readonly SysRoleMenuService _sysRoleMenuService;
     private readonly SysConfigService _sysConfigService;
     private readonly SysCacheService _sysCacheService;
-    private readonly ISqlSugarClient _db;
 
     public SysTenantService(SqlSugarRepository<SysTenant> tenantRep,
         SqlSugarRepository<SysOrg> orgRep,
@@ -31,8 +30,7 @@ public class SysTenantService : IDynamicApiController, ITransient
         SysUserRoleService sysUserRoleService,
         SysRoleMenuService sysRoleMenuService,
         SysConfigService sysConfigService,
-        SysCacheService sysCacheService,
-        ISqlSugarClient db)
+        SysCacheService sysCacheService)
     {
         _tenantRep = tenantRep;
         _orgRep = orgRep;
@@ -46,7 +44,6 @@ public class SysTenantService : IDynamicApiController, ITransient
         _sysRoleMenuService = sysRoleMenuService;
         _sysConfigService = sysConfigService;
         _sysCacheService = sysCacheService;
-        _db = db;
     }
 
     /// <summary>
@@ -70,7 +67,7 @@ public class SysTenantService : IDynamicApiController, ITransient
     [NonAction]
     public async Task<List<SysTenant>> GetTenantDbList()
     {
-        return await _tenantRep.GetListAsync(u => u.TenantType == TenantTypeEnum.Db);
+        return await _tenantRep.GetListAsync(u => u.TenantType == TenantTypeEnum.Db && u.Status == StatusEnum.Enable);
     }
 
     /// <summary>
@@ -81,18 +78,38 @@ public class SysTenantService : IDynamicApiController, ITransient
     [HttpPost("/sysTenant/add")]
     public async Task AddTenant(AddTenantInput input)
     {
-        var isExist = await _tenantRep.IsAnyAsync(u => u.Name == input.Name ||
-            (u.AdminName == input.AdminName && input.TenantType == TenantTypeEnum.Id));
+        var isExist = await _tenantRep.IsAnyAsync(u => u.Name == input.Name);
         if (isExist) throw Oops.Oh(ErrorCodeEnum.D1300);
 
+        isExist = await _userRep.AsQueryable().Filter(null, true).AnyAsync(u => u.Account == input.AdminName);
+        if (isExist) throw Oops.Oh(ErrorCodeEnum.D1301);
+
         var tenant = input.Adapt<SysTenant>();
         await _tenantRep.InsertAsync(tenant);
         await UpdateTenantCache();
 
-        if (tenant.TenantType == TenantTypeEnum.Db) return;
         await InitNewTenant(tenant);
     }
 
+    /// <summary>
+    /// 设置租户状态
+    /// </summary>
+    /// <param name="input"></param>
+    /// <returns></returns>
+    [HttpPost("/sysTenant/setStatus")]
+    public async Task<int> SetTenantStatus(TenantInput input)
+    {
+        var tenant = await _tenantRep.GetFirstAsync(u => u.Id == input.Id);
+        if (tenant.ConfigId == SqlSugarConst.ConfigId)
+            throw Oops.Oh(ErrorCodeEnum.Z1001);
+
+        if (!Enum.IsDefined(typeof(StatusEnum), input.Status))
+            throw Oops.Oh(ErrorCodeEnum.D3005);
+
+        tenant.Status = input.Status;
+        return await _tenantRep.AsUpdateable(tenant).UpdateColumns(u => new { u.Status }).ExecuteCommandAsync();
+    }
+
     /// <summary>
     /// 新增租户初始化(Id隔离)
     /// </summary>
@@ -158,6 +175,17 @@ public class SysTenantService : IDynamicApiController, ITransient
             UserId = newUser.Id
         };
         await _userRoleRep.InsertAsync(newUserRole);
+
+        // 默认租户管理员角色菜单集合
+        var menuIdList = new List<long> { 252885263002100,252885263002110,252885263002111,
+            252885263005200,252885263005210,252885263005211,252885263005212,252885263005213,252885263005214,252885263005215,252885263005216,252885263005217,252885263005218,252885263005219,252885263005220,
+            252885263005230,252885263005231,252885263005232,252885263005233,252885263005234,252885263005235,252885263005236,252885263005237,
+            252885263005240,252885263005241,252885263005242,252885263005243,252885263005244,
+            252885263005250,252885263005251,252885263005252,252885263005253,252885263005254,
+            252885263005260,252885263005261,252885263005262,252885263005263,
+            252885263005270,252885263005271,252885263005272,252885263005273,252885263005274,252885263005275,252885263005276
+        };
+        await _sysRoleMenuService.GrantRoleMenu(new RoleMenuInput() { Id = newRole.Id, MenuIdList = menuIdList });
     }
 
     /// <summary>
@@ -306,7 +334,7 @@ public class SysTenantService : IDynamicApiController, ITransient
     }
 
     /// <summary>
-    /// 创建租户数据库(根据默认库结构)
+    /// 创建租户数据库
     /// </summary>
     /// <param name="input"></param>
     /// <returns></returns>
@@ -316,15 +344,18 @@ public class SysTenantService : IDynamicApiController, ITransient
         var tenant = await _tenantRep.GetFirstAsync(u => u.Id == input.Id);
         if (tenant == null) return;
 
-        var dbConnection = new DbConnectionConfig
+        if (tenant.DbType == SqlSugar.DbType.Oracle)
+            throw Oops.Oh(ErrorCodeEnum.Z1002);
+
+        var config = new DbConnectionConfig
         {
             EnableInitDb = true,
+            EnableDiffLog = false,
             DbType = tenant.DbType,
-            ConfigId = tenant.ConfigId,
+            ConfigId = tenant.Id.ToString(),
             ConnectionString = tenant.Connection,
             IsAutoCloseConnection = true,
         };
-
-        SqlSugarSetup.CreateDataBase(_db, dbConnection, tenant.Id);
+        SqlSugarSetup.InitTenantDatabase(App.GetRequiredService<ISqlSugarClient>().AsTenant(), config);
     }
 }

+ 2 - 2
Admin.NET/Admin.NET.Core/Service/User/SysUserService.cs

@@ -58,7 +58,7 @@ public class SysUserService : IDynamicApiController, ITransient
     [UnitOfWork]
     public async Task AddUser(AddUserInput input)
     {
-        var isExist = await _sysUserRep.IsAnyAsync(u => u.Account == input.Account);
+        var isExist = await _sysUserRep.AsQueryable().Filter(null, true).AnyAsync(u => u.Account == input.Account);
         if (isExist) throw Oops.Oh(ErrorCodeEnum.D1003);
 
         var password = await _sysConfigService.GetConfigValue<string>(CommonConst.SysPassword);
@@ -91,7 +91,7 @@ public class SysUserService : IDynamicApiController, ITransient
     [UnitOfWork]
     public async Task UpdateUser(UpdateUserInput input)
     {
-        var isExist = await _sysUserRep.IsAnyAsync(u => u.Account == input.Account && u.Id != input.Id);
+        var isExist = await _sysUserRep.AsQueryable().Filter(null, true).AnyAsync(u => u.Account == input.Account && u.Id != input.Id);
         if (isExist) throw Oops.Oh(ErrorCodeEnum.D1003);
 
         await _sysUserRep.AsUpdateable(input.Adapt<SysUser>()).IgnoreColumns(true)

+ 4 - 15
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarRepository.cs

@@ -12,22 +12,11 @@ public class SqlSugarRepository<T> : SimpleClient<T> where T : class, new()
     {
         iTenant = App.GetRequiredService<ISqlSugarClient>().AsTenant();
 
-        // 根据当前租户Id切换数据库
-        var tenantId = App.GetRequiredService<UserManager>().TenantId;
-        if (tenantId > 1)
+        // 根据租户业务实体是否切库
+        if (typeof(T).IsDefined(typeof(TenantBusinessAttribute), false))
         {
-            var tenant = App.GetRequiredService<SysCacheService>().Get<List<SysTenant>>(CacheConst.KeyTenant).FirstOrDefault(u => u.Id == tenantId);
-            if (!iTenant.IsAnyConnection(tenant.ConfigId))
-            {
-                iTenant.AddConnection(new ConnectionConfig()
-                {
-                    ConfigId = tenant.ConfigId,
-                    ConnectionString = tenant.Connection,
-                    DbType = tenant.DbType,
-                    IsAutoCloseConnection = true
-                });
-            }
-            base.Context = iTenant.GetConnectionScope(tenant.ConfigId);
+            var tenantId = App.GetRequiredService<UserManager>().TenantId; // 根据租户Id切库
+            base.Context = SqlSugarSetup.InitTenantConnection(iTenant, tenantId);
         }
         else
         {

+ 72 - 90
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

@@ -1,5 +1,3 @@
-using Masuit.Tools;
-
 namespace Admin.NET.Core;
 
 public static class SqlSugarSetup
@@ -16,21 +14,23 @@ public static class SqlSugarSetup
             SetDbConfig(config);
         });
 
-        SqlSugarScope sqlSugar = new(dbOptions.ConnectionConfigs.Adapt<List<ConnectionConfig>>(), client =>
+        SqlSugarScope sqlSugar = new(dbOptions.ConnectionConfigs.Adapt<List<ConnectionConfig>>(), db =>
         {
             dbOptions.ConnectionConfigs.ForEach(config =>
             {
-                var db = client.GetConnectionScope((string)config.ConfigId);
-                SetDbAop(db, config);
+                SetDbAop(db.GetConnectionScope(config.ConfigId));
             });
         });
 
         // 初始化数据库表结构及种子数据
-        InitDataBase(sqlSugar, dbOptions);
+        dbOptions.ConnectionConfigs.ForEach(config =>
+        {
+            InitDatabase(sqlSugar, config);
+        });
 
         services.AddSingleton<ISqlSugarClient>(sqlSugar); // 单例注册
         services.AddScoped(typeof(SqlSugarRepository<>)); // 仓储注册
-        services.AddUnitOfWork<SqlSugarUnitOfWork>(); // 注册事务与工作单元
+        services.AddUnitOfWork<SqlSugarUnitOfWork>(); // 事务与工作单元注册
     }
 
     /// <summary>
@@ -62,9 +62,10 @@ public static class SqlSugarSetup
     /// 配置Aop
     /// </summary>
     /// <param name="db"></param>
-    /// <param name="config"></param>
-    public static void SetDbAop(this SqlSugarScopeProvider db, DbConnectionConfig config)
+    public static void SetDbAop(SqlSugarScopeProvider db)
     {
+        var config = db.CurrentConnectionConfig;
+
         // 设置超时时间
         db.Ado.CommandTimeOut = 30;
 
@@ -147,11 +148,15 @@ public static class SqlSugarSetup
         //        Parameters = JsonConvert.SerializeObject(u.Parameters),
         //        Duration = u.Time == null ? 0 : (long)u.Time.Value.TotalMilliseconds
         //    };
-        //    await client.GetConnectionScope(SqlSugarConst.ConfigId).Insertable(LogDiff).ExecuteCommandAsync();
+        //    await db.AsTenant().GetConnectionScope(SqlSugarConst.ConfigId).Insertable(LogDiff).ExecuteCommandAsync();
         //    Console.ForegroundColor = ConsoleColor.Red;
         //    Console.WriteLine(DateTime.Now + $"\r\n**********差异日志开始**********\r\n{Environment.NewLine}{JsonConvert.SerializeObject(LogDiff)}{Environment.NewLine}**********差异日志结束**********\r\n");
         //};
 
+        // 超管时排除各种过滤器
+        if (App.User?.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SuperAdmin).ToString())
+            return;
+
         // 配置实体假删除过滤器
         SetDeletedEntityFilter(db);
         // 配置租户过滤器
@@ -163,29 +168,29 @@ public static class SqlSugarSetup
     }
 
     /// <summary>
-    /// 初始化数据库结构
+    /// 初始化数据库
     /// </summary>
-    private static void InitDataBase(SqlSugarScope db, DbConnectionOptions dbOptions)
+    /// <param name="db"></param>
+    /// <param name="config"></param>
+    public static void InitDatabase(SqlSugarScope db, DbConnectionConfig config)
     {
+        if (!config.EnableInitDb || config.DbType == SqlSugar.DbType.Oracle) return;
+
         // 创建数据库
-        dbOptions.ConnectionConfigs.ForEach(config =>
-        {
-            if (!config.EnableInitDb || config.DbType == SqlSugar.DbType.Oracle) return;
-            db.GetConnectionScope(config.ConfigId).DbMaintenance.CreateDatabase();
-        });
+        db.DbMaintenance.CreateDatabase();
 
         // 获取所有实体表-初始化表结构
         var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass
             && u.IsDefined(typeof(SugarTable), false) && !u.IsDefined(typeof(NotTableAttribute), false));
         if (!entityTypes.Any()) return;
+        var db2 = db.GetConnectionScope(config.ConfigId);
         foreach (var entityType in entityTypes)
         {
-            var tAtt = entityType.GetCustomAttribute<TenantAttribute>(); // 多数据库
-            var configId = tAtt == null ? SqlSugarConst.ConfigId : tAtt.configId.ToString();
-            if (!dbOptions.ConnectionConfigs.FirstOrDefault(u => u.ConfigId == configId).EnableInitDb)
-                continue;
-            var db2 = db.GetConnectionScope(configId);
-            var splitTable = entityType.GetCustomAttribute<SplitTableAttribute>(); // 分表
+            var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
+            if (tAtt != null && tAtt.configId.ToString() != config.ConfigId) continue;
+            if (tAtt == null && config.ConfigId != SqlSugarConst.ConfigId) continue;
+
+            var splitTable = entityType.GetCustomAttribute<SplitTableAttribute>();
             if (splitTable == null)
                 db2.CodeFirst.InitTables(entityType);
             else
@@ -206,92 +211,73 @@ public static class SqlSugarSetup
 
             var entityType = seedType.GetInterfaces().First().GetGenericArguments().First();
             var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
-            var configId = tAtt == null ? SqlSugarConst.ConfigId : tAtt.configId.ToString();
-            if (!dbOptions.ConnectionConfigs.FirstOrDefault(u => u.ConfigId == configId).EnableInitDb)
-                continue;
-            var db2 = db.GetConnectionScope(configId);
+            if (tAtt != null && tAtt.configId.ToString() != config.ConfigId) continue;
+            if (tAtt == null && config.ConfigId != SqlSugarConst.ConfigId) continue;
+
             var seedDataTable = seedData.ToList().ToDataTable();
-            seedDataTable.TableName = db.EntityMaintenance.GetEntityInfo(entityType).DbTableName;
+            seedDataTable.TableName = db2.EntityMaintenance.GetEntityInfo(entityType).DbTableName;
             if (seedDataTable.Columns.Contains(SqlSugarConst.PrimaryKey))
             {
-                var storage = db2.Storageable(seedDataTable).WhereColumns(SqlSugarConst.PrimaryKey).ToStorage();
+                var storage = db2.CopyNew().Storageable(seedDataTable).WhereColumns(SqlSugarConst.PrimaryKey).ToStorage();
                 storage.AsInsertable.ExecuteCommand();
-                storage.AsUpdateable.ExecuteCommand();
+                var ignoreUpdate = hasDataMethod.GetCustomAttribute<IgnoreUpdateAttribute>();
+                if (ignoreUpdate == null) storage.AsUpdateable.ExecuteCommand();
             }
-            else // 没有主键或者不是预定义的主键(没主键有重复的可能)
+            else // 没有主键或者不是预定义的主键(有重复的可能)
             {
-                var storage = db2.Storageable(seedDataTable).ToStorage();
+                var storage = db2.CopyNew().Storageable(seedDataTable).ToStorage();
                 storage.AsInsertable.ExecuteCommand();
             }
         }
     }
 
     /// <summary>
-    /// 初始化数据库结构
+    /// 初始化租户库连接
     /// </summary>
-    public static void CreateDataBase(ISqlSugarClient db, DbConnectionConfig config, long tenantId)
+    /// <param name="iTenant"></param>
+    /// <param name="tenantId"></param>
+    public static SqlSugarScopeProvider InitTenantConnection(ITenant iTenant, long tenantId)
+    {
+        var tenant = App.GetRequiredService<SysCacheService>().Get<List<SysTenant>>(CacheConst.KeyTenant).FirstOrDefault(u => u.Id == tenantId);
+        if (!iTenant.IsAnyConnection(tenantId.ToString()))
+        {
+            iTenant.AddConnection(new ConnectionConfig()
+            {
+                ConfigId = tenantId.ToString(),
+                ConnectionString = tenant.Connection,
+                DbType = tenant.DbType,
+                IsAutoCloseConnection = true
+            });
+            SetDbAop(iTenant.GetConnectionScope(tenantId.ToString()));
+        }
+        return iTenant.GetConnectionScope(tenantId.ToString());
+    }
+
+    /// <summary>
+    /// 初始化租户业务数据库
+    /// </summary>
+    /// <param name="itenant"></param>
+    /// <param name="config"></param>
+    public static void InitTenantDatabase(ITenant itenant, DbConnectionConfig config)
     {
         SetDbConfig(config);
 
-        var itenant = db.AsTenant();
-        // 创建数据库
-        if (!config.EnableInitDb || config.DbType == SqlSugar.DbType.Oracle) return;
         itenant.AddConnection(config);
-        var dbProvider = itenant.GetConnectionScope(config.ConfigId);
-        SetDbAop(dbProvider, config);
-        dbProvider.DbMaintenance.CreateDatabase();
+        var db = itenant.GetConnectionScope(config.ConfigId);
+        db.DbMaintenance.CreateDatabase();
 
-        // 获取所有实体表-初始化表结构
+        // 获取所有实体表-初始化租户业务
         var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass
-            && u.IsDefined(typeof(SugarTable), false) && !u.IsDefined(typeof(NotTableAttribute), false));
+            && u.IsDefined(typeof(SugarTable), false) && !u.IsDefined(typeof(NotTableAttribute), false)
+            && u.IsDefined(typeof(TenantBusinessAttribute), false));
         if (!entityTypes.Any()) return;
         foreach (var entityType in entityTypes)
         {
-            var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
-            if (tAtt != null) continue;
-            var db2 = itenant.GetConnectionScope(config.ConfigId);
             var splitTable = entityType.GetCustomAttribute<SplitTableAttribute>();
             if (splitTable == null)
-                db2.CodeFirst.InitTables(entityType);
+                db.CodeFirst.InitTables(entityType);
             else
-                db2.CodeFirst.SplitTables().InitTables(entityType);
-        }
-
-        // 获取所有种子配置-初始化数据
-        var seedDataTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass
-            && u.GetInterfaces().Any(i => i.HasImplementedRawGeneric(typeof(ISqlSugarEntitySeedData<>))));
-        if (!seedDataTypes.Any()) return;
-        foreach (var seedType in seedDataTypes)
-        {
-            var instance = Activator.CreateInstance(seedType);
-
-            var hasDataMethod = seedType.GetMethod("HasData");
-            var seedData = ((IEnumerable)hasDataMethod?.Invoke(instance, null))?.Cast<object>();
-            if (seedData == null) continue;
-
-            var entityType = seedType.GetInterfaces().First().GetGenericArguments().First();
-            var tAtt = entityType.GetCustomAttribute<TenantAttribute>();
-            if (tAtt != null) continue;
-            var db2 = itenant.GetConnectionScope(config.ConfigId);
-            var seedDataTable = seedData.ToList().ToDataTable();
-            seedDataTable.TableName = db.EntityMaintenance.GetEntityInfo(entityType).DbTableName;
-            // 设置租户Id
-            if (seedDataTable.Columns.Contains(SqlSugarConst.TenantId))
-            {
-                foreach (DataRow dr in seedDataTable.Rows)                
-                    dr[SqlSugarConst.TenantId] = tenantId;                
-            }
-            if (seedDataTable.Columns.Contains(SqlSugarConst.PrimaryKey))
-            {
-                var storage = db2.Storageable(seedDataTable).WhereColumns(SqlSugarConst.PrimaryKey).ToStorage();
-                storage.AsInsertable.ExecuteCommand();
-                storage.AsUpdateable.ExecuteCommand();
-            }
-            else // 没有主键或者不是预定义的主键(没主键有重复的可能)
-            {
-                var storage = db2.Storageable(seedDataTable).ToStorage();
-                storage.AsInsertable.ExecuteCommand();
-            }
+                db.CodeFirst.SplitTables().InitTables(entityType);
         }
     }
 
@@ -430,10 +416,6 @@ public static class SqlSugarSetup
     /// </summary>
     private static void SetCustomEntityFilter(SqlSugarScopeProvider db)
     {
-        // 排除超管过滤
-        if (App.User?.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SuperAdmin).ToString())
-            return;
-
         // 配置用户机构范围缓存
         var cacheKey = $"db:{db.CurrentConnectionConfig.ConfigId}:Custom";
         var tableFilterItemList = db.DataCache.Get<List<TableFilterItem<object>>>(cacheKey);
@@ -452,7 +434,7 @@ public static class SqlSugarSetup
                 var entityFilters = ((IList)entityFilterMethod?.Invoke(instance, null))?.Cast<object>();
                 if (entityFilters == null) continue;
 
-                entityFilters.ForEach(u =>
+                foreach (var u in entityFilters)
                 {
                     var tableFilterItem = (TableFilterItem<object>)u;
                     var entityType = tableFilterItem.GetType().GetProperty("type", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(tableFilterItem, null) as Type;
@@ -464,7 +446,7 @@ public static class SqlSugarSetup
 
                     tableFilterItems.Add(tableFilterItem);
                     db.QueryFilter.Add(tableFilterItem);
-                });
+                }
             }
             db.DataCache.Add(cacheKey, tableFilterItems);
         }

+ 28 - 0
Admin.NET/Admin.NET.Core/Util/CommonUtil.cs

@@ -0,0 +1,28 @@
+namespace Admin.NET.Core;
+
+/// <summary>
+/// 通用工具类
+/// </summary>
+public static class CommonUtil
+{
+    /// <summary>
+    /// 生成百分数
+    /// </summary>
+    /// <param name="PassCount"></param>
+    /// <param name="allCount"></param>
+    /// <returns></returns>
+    public static string ExecPercent(decimal PassCount, decimal allCount)
+    {
+        string res = "";
+        if (allCount > 0)
+        {
+            var value = (double)Math.Round(PassCount / allCount * 100, 1);
+            if (value < 0)
+                res = Math.Round(value + 5 / Math.Pow(10, 0 + 1), 0, MidpointRounding.AwayFromZero).ToString();
+            else
+                res = Math.Round(value, 0, MidpointRounding.AwayFromZero).ToString();
+        }
+        if (res == "") res = "0";
+        return res + "%";
+    }
+}

+ 1 - 1
Admin.NET/Admin.NET.Web.Core/Admin.NET.Web.Core.csproj

@@ -12,7 +12,7 @@
 
   <ItemGroup>
     <PackageReference Include="AspNet.Security.OAuth.Weixin" Version="6.0.14" />
-    <PackageReference Include="IGeekFan.AspNetCore.Knife4jUI" Version="0.0.12" />
+    <PackageReference Include="IGeekFan.AspNetCore.Knife4jUI" Version="0.0.13" />
   </ItemGroup>
 
   <ItemGroup>

+ 1 - 2
Admin.NET/Admin.NET.Web.Core/Startup.cs

@@ -1,5 +1,4 @@
 using Admin.NET.Core;
-using Admin.NET.Core.Service;
 using AspNetCoreRateLimit;
 using Furion;
 using Furion.SpecificationDocument;
@@ -22,7 +21,7 @@ namespace Admin.NET.Web.Core;
 
 public class Startup : AppStartup
 {
-    public async void ConfigureServices(IServiceCollection services)
+    public void ConfigureServices(IServiceCollection services)
     {
         // 配置选项
         services.AddProjectOptions();

+ 1 - 36
Admin.NET/Admin.NET.Web.Entry/appsettings.Development.json

@@ -1,40 +1,5 @@
 {
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
 
-    "Urls": "https://*:5005",
-
-    "Logging": {
-        "LogLevel": {
-            "Default": "Information",
-            "Microsoft.AspNetCore": "Warning"
-        },
-        "File": {
-            "Enabled": true, // 启用文件日志
-            "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日志
-            "ServerUris": [ "http://dilon:123456@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)
-            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
-        }
-    },
-    "AllowedHosts": "*"
+    "ConfigurationScanDirectories": [ "Configuration", "" ]
 }

+ 1 - 36
Admin.NET/Admin.NET.Web.Entry/appsettings.json

@@ -1,40 +1,5 @@
 {
     "$schema": "https://gitee.com/dotnetchina/Furion/raw/net6/schemas/v3/furion-schema.json",
 
-    "Urls": "https://*:5005",
-
-    "Logging": {
-        "LogLevel": {
-            "Default": "Information",
-            "Microsoft.AspNetCore": "Warning"
-        },
-        "File": {
-            "Enabled": true, // 启用文件日志
-            "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日志
-            "ServerUris": [ "http://dilon:123456@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)
-            "UseUtcTimestamp": false // 时间格式UTC、LOCAL
-        }
-    },
-    "AllowedHosts": "*"
+    "ConfigurationScanDirectories": [ "Configuration", "" ]
 }

+ 14 - 0
Web/src/api-services/_business/api.ts

@@ -0,0 +1,14 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * 租户业务服务
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */export * from './apis/tenant-business-api';
+

+ 191 - 0
Web/src/api-services/_business/apis/tenant-business-api.ts

@@ -0,0 +1,191 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * 租户业务服务
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
+import { Configuration } from '../../configuration';
+// Some imports not used depending on template conditions
+// @ts-ignore
+import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../../base';
+import { AdminResultBoolean } from '../models';
+import { AdminResultListTenantBusiness } from '../models';
+/**
+ * TenantBusinessApi - axios parameter creator
+ * @export
+ */
+export const TenantBusinessApiAxiosParamCreator = function (configuration?: Configuration) {
+    return {
+        /**
+         * 
+         * @summary 增加租户业务数据
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        apiTenantBusinessAddBusinessPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/api/tenantBusiness/addBusiness`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 查询租户业务数据
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        apiTenantBusinessGetBusinessListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/api/tenantBusiness/getBusinessList`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+    }
+};
+
+/**
+ * TenantBusinessApi - functional programming interface
+ * @export
+ */
+export const TenantBusinessApiFp = function(configuration?: Configuration) {
+    return {
+        /**
+         * 
+         * @summary 增加租户业务数据
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiTenantBusinessAddBusinessPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultBoolean>>> {
+            const localVarAxiosArgs = await TenantBusinessApiAxiosParamCreator(configuration).apiTenantBusinessAddBusinessPost(options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+        /**
+         * 
+         * @summary 查询租户业务数据
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiTenantBusinessGetBusinessListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListTenantBusiness>>> {
+            const localVarAxiosArgs = await TenantBusinessApiAxiosParamCreator(configuration).apiTenantBusinessGetBusinessListGet(options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+    }
+};
+
+/**
+ * TenantBusinessApi - factory interface
+ * @export
+ */
+export const TenantBusinessApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
+    return {
+        /**
+         * 
+         * @summary 增加租户业务数据
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiTenantBusinessAddBusinessPost(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultBoolean>> {
+            return TenantBusinessApiFp(configuration).apiTenantBusinessAddBusinessPost(options).then((request) => request(axios, basePath));
+        },
+        /**
+         * 
+         * @summary 查询租户业务数据
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async apiTenantBusinessGetBusinessListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListTenantBusiness>> {
+            return TenantBusinessApiFp(configuration).apiTenantBusinessGetBusinessListGet(options).then((request) => request(axios, basePath));
+        },
+    };
+};
+
+/**
+ * TenantBusinessApi - object-oriented interface
+ * @export
+ * @class TenantBusinessApi
+ * @extends {BaseAPI}
+ */
+export class TenantBusinessApi extends BaseAPI {
+    /**
+     * 
+     * @summary 增加租户业务数据
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof TenantBusinessApi
+     */
+    public async apiTenantBusinessAddBusinessPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultBoolean>> {
+        return TenantBusinessApiFp(this.configuration).apiTenantBusinessAddBusinessPost(options).then((request) => request(this.axios, this.basePath));
+    }
+    /**
+     * 
+     * @summary 查询租户业务数据
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof TenantBusinessApi
+     */
+    public async apiTenantBusinessGetBusinessListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListTenantBusiness>> {
+        return TenantBusinessApiFp(this.configuration).apiTenantBusinessGetBusinessListGet(options).then((request) => request(this.axios, this.basePath));
+    }
+}

+ 16 - 0
Web/src/api-services/_business/index.ts

@@ -0,0 +1,16 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * 租户业务服务
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+export * from "./api";
+export * from "./models";
+

+ 13 - 14
Web/src/api-services/models/admin-result-list-sys-tenant.ts → Web/src/api-services/_business/models/admin-result-boolean.ts

@@ -1,57 +1,56 @@
 /* tslint:disable */
 /* eslint-disable */
 /**
- * Admin.NET
- * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ * 租户业务服务
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
  *
  * OpenAPI spec version: 1.0.0
- * Contact: 515096995@qq.com
+ * 
  *
  * NOTE: This class is auto generated by the swagger code generator program.
  * https://github.com/swagger-api/swagger-codegen.git
  * Do not edit the class manually.
  */
-import { SysTenant } from './sys-tenant';
 /**
  * 全局返回结果
  * @export
- * @interface AdminResultListSysTenant
+ * @interface AdminResultBoolean
  */
-export interface AdminResultListSysTenant {
+export interface AdminResultBoolean {
     /**
      * 状态码
      * @type {number}
-     * @memberof AdminResultListSysTenant
+     * @memberof AdminResultBoolean
      */
     code?: number;
     /**
      * 类型success、warning、error
      * @type {string}
-     * @memberof AdminResultListSysTenant
+     * @memberof AdminResultBoolean
      */
     type?: string | null;
     /**
      * 错误信息
      * @type {string}
-     * @memberof AdminResultListSysTenant
+     * @memberof AdminResultBoolean
      */
     message?: string | null;
     /**
      * 数据
-     * @type {Array<SysTenant>}
-     * @memberof AdminResultListSysTenant
+     * @type {boolean}
+     * @memberof AdminResultBoolean
      */
-    result?: Array<SysTenant> | null;
+    result?: boolean;
     /**
      * 附加数据
      * @type {any}
-     * @memberof AdminResultListSysTenant
+     * @memberof AdminResultBoolean
      */
     extras?: any | null;
     /**
      * 时间
      * @type {Date}
-     * @memberof AdminResultListSysTenant
+     * @memberof AdminResultBoolean
      */
     time?: Date;
 }

+ 57 - 0
Web/src/api-services/_business/models/admin-result-list-tenant-business.ts

@@ -0,0 +1,57 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * 租户业务服务
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import { TenantBusiness } from './tenant-business';
+/**
+ * 全局返回结果
+ * @export
+ * @interface AdminResultListTenantBusiness
+ */
+export interface AdminResultListTenantBusiness {
+    /**
+     * 状态码
+     * @type {number}
+     * @memberof AdminResultListTenantBusiness
+     */
+    code?: number;
+    /**
+     * 类型success、warning、error
+     * @type {string}
+     * @memberof AdminResultListTenantBusiness
+     */
+    type?: string | null;
+    /**
+     * 错误信息
+     * @type {string}
+     * @memberof AdminResultListTenantBusiness
+     */
+    message?: string | null;
+    /**
+     * 数据
+     * @type {Array<TenantBusiness>}
+     * @memberof AdminResultListTenantBusiness
+     */
+    result?: Array<TenantBusiness> | null;
+    /**
+     * 附加数据
+     * @type {any}
+     * @memberof AdminResultListTenantBusiness
+     */
+    extras?: any | null;
+    /**
+     * 时间
+     * @type {Date}
+     * @memberof AdminResultListTenantBusiness
+     */
+    time?: Date;
+}

+ 3 - 0
Web/src/api-services/_business/models/index.ts

@@ -0,0 +1,3 @@
+export * from './admin-result-boolean';
+export * from './admin-result-list-tenant-business';
+export * from './tenant-business';

+ 74 - 0
Web/src/api-services/_business/models/tenant-business.ts

@@ -0,0 +1,74 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * 租户业务服务
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 1.0.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+/**
+ * 租户业务分库表
+ * @export
+ * @interface TenantBusiness
+ */
+export interface TenantBusiness {
+    /**
+     * 雪花Id
+     * @type {number}
+     * @memberof TenantBusiness
+     */
+    id?: number;
+    /**
+     * 创建时间
+     * @type {Date}
+     * @memberof TenantBusiness
+     */
+    createTime?: Date | null;
+    /**
+     * 更新时间
+     * @type {Date}
+     * @memberof TenantBusiness
+     */
+    updateTime?: Date | null;
+    /**
+     * 创建者Id
+     * @type {number}
+     * @memberof TenantBusiness
+     */
+    createUserId?: number | null;
+    /**
+     * 修改者Id
+     * @type {number}
+     * @memberof TenantBusiness
+     */
+    updateUserId?: number | null;
+    /**
+     * 软删除
+     * @type {boolean}
+     * @memberof TenantBusiness
+     */
+    isDelete?: boolean;
+    /**
+     * 姓名
+     * @type {string}
+     * @memberof TenantBusiness
+     */
+    name: string;
+    /**
+     * 年龄
+     * @type {number}
+     * @memberof TenantBusiness
+     */
+    age?: number;
+    /**
+     * 出生日期
+     * @type {Date}
+     * @memberof TenantBusiness
+     */
+    birthDate?: Date;
+}

+ 0 - 69
Web/src/api-services/apis/sys-auth-api.ts

@@ -17,7 +17,6 @@ import { Configuration } from '../configuration';
 // @ts-ignore
 import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
 import { AdminResultBoolean } from '../models';
-import { AdminResultListSysTenant } from '../models';
 import { AdminResultLoginOutput } from '../models';
 import { AdminResultLoginUserOutput } from '../models';
 import { AdminResultObject } from '../models';
@@ -313,42 +312,6 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
                 options: localVarRequestOptions,
             };
         },
-        /**
-         * 
-         * @summary 是否启用多库租户
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        tenantDbListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/tenantDbList`;
-            // use dummy base URL string because the URL constructor only accepts absolute URLs.
-            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
-            let baseOptions;
-            if (configuration) {
-                baseOptions = configuration.baseOptions;
-            }
-            const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
-            const localVarHeaderParameter = {} as any;
-            const localVarQueryParameter = {} as any;
-
-            // authentication Bearer required
-
-            const query = new URLSearchParams(localVarUrlObj.search);
-            for (const key in localVarQueryParameter) {
-                query.set(key, localVarQueryParameter[key]);
-            }
-            for (const key in options.params) {
-                query.set(key, options.params[key]);
-            }
-            localVarUrlObj.search = (new URLSearchParams(query)).toString();
-            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
-            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
-
-            return {
-                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
-                options: localVarRequestOptions,
-            };
-        },
         /**
          * 
          * @summary 获取用户信息
@@ -489,19 +452,6 @@ export const SysAuthApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
-        /**
-         * 
-         * @summary 是否启用多库租户
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async tenantDbListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysTenant>>> {
-            const localVarAxiosArgs = await SysAuthApiAxiosParamCreator(configuration).tenantDbListGet(options);
-            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
-                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
-                return axios.request(axiosRequestArgs);
-            };
-        },
         /**
          * 
          * @summary 获取用户信息
@@ -591,15 +541,6 @@ export const SysAuthApiFactory = function (configuration?: Configuration, basePa
         async swaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<number>> {
             return SysAuthApiFp(configuration).swaggerSubmitUrlPostForm(userName, password, options).then((request) => request(axios, basePath));
         },
-        /**
-         * 
-         * @summary 是否启用多库租户
-         * @param {*} [options] Override http request option.
-         * @throws {RequiredError}
-         */
-        async tenantDbListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysTenant>> {
-            return SysAuthApiFp(configuration).tenantDbListGet(options).then((request) => request(axios, basePath));
-        },
         /**
          * 
          * @summary 获取用户信息
@@ -693,16 +634,6 @@ export class SysAuthApi extends BaseAPI {
     public async swaggerSubmitUrlPostForm(userName?: string, password?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<number>> {
         return SysAuthApiFp(this.configuration).swaggerSubmitUrlPostForm(userName, password, options).then((request) => request(this.axios, this.basePath));
     }
-    /**
-     * 
-     * @summary 是否启用多库租户
-     * @param {*} [options] Override http request option.
-     * @throws {RequiredError}
-     * @memberof SysAuthApi
-     */
-    public async tenantDbListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysTenant>> {
-        return SysAuthApiFp(this.configuration).tenantDbListGet(options).then((request) => request(this.axios, this.basePath));
-    }
     /**
      * 
      * @summary 获取用户信息

+ 112 - 18
Web/src/api-services/apis/sys-tenant-api.ts

@@ -17,11 +17,13 @@ import { Configuration } from '../configuration';
 // @ts-ignore
 import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
 import { AddTenantInput } from '../models';
+import { AdminResultInt32 } from '../models';
 import { AdminResultListInt64 } from '../models';
 import { AdminResultListSysMenu } from '../models';
 import { AdminResultSqlSugarPagedListSysTenant } from '../models';
 import { DeleteTenantInput } from '../models';
 import { RoleMenuInput } from '../models';
+import { StatusEnum } from '../models';
 import { TenantInput } from '../models';
 import { UpdateTenantInput } from '../models';
 /**
@@ -73,7 +75,7 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
         },
         /**
          * 
-         * @summary 创建租户数据库(根据默认库结构)
+         * @summary 创建租户数据库
          * @param {TenantInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
@@ -198,10 +200,11 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
          * 
          * @summary 获取租户管理员角色拥有菜单树
          * @param {number} id 主键Id
+         * @param {StatusEnum} [status] 状态
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        sysTenantOwnMenuListGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+        sysTenantOwnMenuListGet: async (id: number, status?: StatusEnum, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
             // verify required parameter 'id' is not null or undefined
             if (id === null || id === undefined) {
                 throw new RequiredError('id','Required parameter id was null or undefined when calling sysTenantOwnMenuListGet.');
@@ -219,6 +222,10 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
 
             // authentication Bearer required
 
+            if (status !== undefined) {
+                localVarQueryParameter['Status'] = status;
+            }
+
             if (id !== undefined) {
                 localVarQueryParameter['Id'] = id;
             }
@@ -243,10 +250,11 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
          * 
          * @summary 获取租户管理员角色拥有菜单树
          * @param {number} id 主键Id
+         * @param {StatusEnum} [status] 状态
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        sysTenantOwnMenuTreeGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+        sysTenantOwnMenuTreeGet: async (id: number, status?: StatusEnum, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
             // verify required parameter 'id' is not null or undefined
             if (id === null || id === undefined) {
                 throw new RequiredError('id','Required parameter id was null or undefined when calling sysTenantOwnMenuTreeGet.');
@@ -264,6 +272,10 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
 
             // authentication Bearer required
 
+            if (status !== undefined) {
+                localVarQueryParameter['Status'] = status;
+            }
+
             if (id !== undefined) {
                 localVarQueryParameter['Id'] = id;
             }
@@ -396,6 +408,47 @@ export const SysTenantApiAxiosParamCreator = function (configuration?: Configura
                 options: localVarRequestOptions,
             };
         },
+        /**
+         * 
+         * @summary 设置租户状态
+         * @param {TenantInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysTenantSetStatusPost: async (body?: TenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysTenant/setStatus`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
         /**
          * 
          * @summary 更新租户
@@ -462,7 +515,7 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 创建租户数据库(根据默认库结构)
+         * @summary 创建租户数据库
          * @param {TenantInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
@@ -506,11 +559,12 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
          * 
          * @summary 获取租户管理员角色拥有菜单树
          * @param {number} id 主键Id
+         * @param {StatusEnum} [status] 状态
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysTenantOwnMenuListGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListInt64>>> {
-            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantOwnMenuListGet(id, options);
+        async sysTenantOwnMenuListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListInt64>>> {
+            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantOwnMenuListGet(id, status, options);
             return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                 const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                 return axios.request(axiosRequestArgs);
@@ -520,11 +574,12 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
          * 
          * @summary 获取租户管理员角色拥有菜单树
          * @param {number} id 主键Id
+         * @param {StatusEnum} [status] 状态
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysTenantOwnMenuTreeGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysMenu>>> {
-            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantOwnMenuTreeGet(id, options);
+        async sysTenantOwnMenuTreeGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysMenu>>> {
+            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantOwnMenuTreeGet(id, status, options);
             return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                 const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                 return axios.request(axiosRequestArgs);
@@ -564,6 +619,20 @@ export const SysTenantApiFp = function(configuration?: Configuration) {
                 return axios.request(axiosRequestArgs);
             };
         },
+        /**
+         * 
+         * @summary 设置租户状态
+         * @param {TenantInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysTenantSetStatusPost(body?: TenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultInt32>>> {
+            const localVarAxiosArgs = await SysTenantApiAxiosParamCreator(configuration).sysTenantSetStatusPost(body, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
         /**
          * 
          * @summary 更新租户
@@ -599,7 +668,7 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
         },
         /**
          * 
-         * @summary 创建租户数据库(根据默认库结构)
+         * @summary 创建租户数据库
          * @param {TenantInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
@@ -631,21 +700,23 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
          * 
          * @summary 获取租户管理员角色拥有菜单树
          * @param {number} id 主键Id
+         * @param {StatusEnum} [status] 状态
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysTenantOwnMenuListGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListInt64>> {
-            return SysTenantApiFp(configuration).sysTenantOwnMenuListGet(id, options).then((request) => request(axios, basePath));
+        async sysTenantOwnMenuListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListInt64>> {
+            return SysTenantApiFp(configuration).sysTenantOwnMenuListGet(id, status, options).then((request) => request(axios, basePath));
         },
         /**
          * 
          * @summary 获取租户管理员角色拥有菜单树
          * @param {number} id 主键Id
+         * @param {StatusEnum} [status] 状态
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysTenantOwnMenuTreeGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysMenu>> {
-            return SysTenantApiFp(configuration).sysTenantOwnMenuTreeGet(id, options).then((request) => request(axios, basePath));
+        async sysTenantOwnMenuTreeGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysMenu>> {
+            return SysTenantApiFp(configuration).sysTenantOwnMenuTreeGet(id, status, options).then((request) => request(axios, basePath));
         },
         /**
          * 
@@ -673,6 +744,16 @@ export const SysTenantApiFactory = function (configuration?: Configuration, base
         async sysTenantResetPwdPost(body?: TenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
             return SysTenantApiFp(configuration).sysTenantResetPwdPost(body, options).then((request) => request(axios, basePath));
         },
+        /**
+         * 
+         * @summary 设置租户状态
+         * @param {TenantInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysTenantSetStatusPost(body?: TenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultInt32>> {
+            return SysTenantApiFp(configuration).sysTenantSetStatusPost(body, options).then((request) => request(axios, basePath));
+        },
         /**
          * 
          * @summary 更新租户
@@ -706,7 +787,7 @@ export class SysTenantApi extends BaseAPI {
     }
     /**
      * 
-     * @summary 创建租户数据库(根据默认库结构)
+     * @summary 创建租户数据库
      * @param {TenantInput} [body] 
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
@@ -741,23 +822,25 @@ export class SysTenantApi extends BaseAPI {
      * 
      * @summary 获取租户管理员角色拥有菜单树
      * @param {number} id 主键Id
+     * @param {StatusEnum} [status] 状态
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysTenantApi
      */
-    public async sysTenantOwnMenuListGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListInt64>> {
-        return SysTenantApiFp(this.configuration).sysTenantOwnMenuListGet(id, options).then((request) => request(this.axios, this.basePath));
+    public async sysTenantOwnMenuListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListInt64>> {
+        return SysTenantApiFp(this.configuration).sysTenantOwnMenuListGet(id, status, options).then((request) => request(this.axios, this.basePath));
     }
     /**
      * 
      * @summary 获取租户管理员角色拥有菜单树
      * @param {number} id 主键Id
+     * @param {StatusEnum} [status] 状态
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysTenantApi
      */
-    public async sysTenantOwnMenuTreeGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysMenu>> {
-        return SysTenantApiFp(this.configuration).sysTenantOwnMenuTreeGet(id, options).then((request) => request(this.axios, this.basePath));
+    public async sysTenantOwnMenuTreeGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysMenu>> {
+        return SysTenantApiFp(this.configuration).sysTenantOwnMenuTreeGet(id, status, options).then((request) => request(this.axios, this.basePath));
     }
     /**
      * 
@@ -787,6 +870,17 @@ export class SysTenantApi extends BaseAPI {
     public async sysTenantResetPwdPost(body?: TenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
         return SysTenantApiFp(this.configuration).sysTenantResetPwdPost(body, options).then((request) => request(this.axios, this.basePath));
     }
+    /**
+     * 
+     * @summary 设置租户状态
+     * @param {TenantInput} [body] 
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysTenantApi
+     */
+    public async sysTenantSetStatusPost(body?: TenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultInt32>> {
+        return SysTenantApiFp(this.configuration).sysTenantSetStatusPost(body, options).then((request) => request(this.axios, this.basePath));
+    }
     /**
      * 
      * @summary 更新租户

+ 7 - 0
Web/src/api-services/models/add-tenant-input.ts

@@ -12,6 +12,7 @@
  * Do not edit the class manually.
  */
 import { DbType } from './db-type';
+import { StatusEnum } from './status-enum';
 import { TenantTypeEnum } from './tenant-type-enum';
 /**
  * 
@@ -109,6 +110,12 @@ export interface AddTenantInput {
      * @memberof AddTenantInput
      */
     remark?: string | null;
+    /**
+     * 
+     * @type {StatusEnum}
+     * @memberof AddTenantInput
+     */
+    status?: StatusEnum;
     /**
      * 租户名称
      * @type {string}

+ 0 - 1
Web/src/api-services/models/index.ts

@@ -36,7 +36,6 @@ export * from './admin-result-list-sys-notice';
 export * from './admin-result-list-sys-org';
 export * from './admin-result-list-sys-pos';
 export * from './admin-result-list-sys-region';
-export * from './admin-result-list-sys-tenant';
 export * from './admin-result-list-sys-user-ext-org';
 export * from './admin-result-list-table-column-ouput';
 export * from './admin-result-list-table-output';

+ 0 - 6
Web/src/api-services/models/login-input.ts

@@ -41,10 +41,4 @@ export interface LoginInput {
      * @memberof LoginInput
      */
     code?: string | null;
-    /**
-     * 租户Id
-     * @type {number}
-     * @memberof LoginInput
-     */
-    tenantId?: number;
 }

+ 7 - 0
Web/src/api-services/models/sys-tenant.ts

@@ -12,6 +12,7 @@
  * Do not edit the class manually.
  */
 import { DbType } from './db-type';
+import { StatusEnum } from './status-enum';
 import { TenantTypeEnum } from './tenant-type-enum';
 /**
  * 系统租户表
@@ -121,4 +122,10 @@ export interface SysTenant {
      * @memberof SysTenant
      */
     remark?: string | null;
+    /**
+     * 
+     * @type {StatusEnum}
+     * @memberof SysTenant
+     */
+    status?: StatusEnum;
 }

+ 7 - 0
Web/src/api-services/models/tenant-input.ts

@@ -11,6 +11,7 @@
  * https://github.com/swagger-api/swagger-codegen.git
  * Do not edit the class manually.
  */
+import { StatusEnum } from './status-enum';
 /**
  * 
  * @export
@@ -23,4 +24,10 @@ export interface TenantInput {
      * @memberof TenantInput
      */
     id: number;
+    /**
+     * 
+     * @type {StatusEnum}
+     * @memberof TenantInput
+     */
+    status?: StatusEnum;
 }

+ 7 - 0
Web/src/api-services/models/update-tenant-input.ts

@@ -12,6 +12,7 @@
  * Do not edit the class manually.
  */
 import { DbType } from './db-type';
+import { StatusEnum } from './status-enum';
 import { TenantTypeEnum } from './tenant-type-enum';
 /**
  * 
@@ -109,6 +110,12 @@ export interface UpdateTenantInput {
      * @memberof UpdateTenantInput
      */
     remark?: string | null;
+    /**
+     * 
+     * @type {StatusEnum}
+     * @memberof UpdateTenantInput
+     */
+    status?: StatusEnum;
     /**
      * 租户名称
      * @type {string}

+ 2 - 2
Web/src/components/dragVerify/dragVerifyImgRotate.vue

@@ -16,8 +16,8 @@
 			</div>
 
 			<div class="dv_handler dv_handler_bg" :class="{goFirst:isOk}" @mousedown="dragStart" @touchstart="dragStart"
-				ref="handler" :style="handlerStyle" style="background-color: var(--el-color-primary)">
-				<i :class="handlerIcon"></i>
+				ref="handler" :style="handlerStyle" style="background-color: var(--el-color-primary);">
+				<i :class="handlerIcon" style="color: #FFF;"></i>
 			</div>
 		</div>
 	</div>

+ 12 - 70
Web/src/layout/navBars/breadcrumb/setings.vue

@@ -1,13 +1,6 @@
 <template>
 	<div class="layout-breadcrumb-seting">
-		<el-drawer
-			:title="$t('message.layout.configTitle')"
-			v-model="getThemeConfig.isDrawer"
-			direction="rtl"
-			destroy-on-close
-			size="260px"
-			@close="onDrawerClose"
-		>
+		<el-drawer :title="$t('message.layout.configTitle')" v-model="getThemeConfig.isDrawer" direction="rtl" destroy-on-close size="260px" @close="onDrawerClose">
 			<el-scrollbar class="layout-breadcrumb-seting-bar">
 				<!-- 全局主题 -->
 				<el-divider content-position="left">{{ $t('message.layout.oneTitle') }}</el-divider>
@@ -67,42 +60,25 @@
 				</div>
 
 				<!-- 分栏设置 -->
-				<el-divider content-position="left" :style="{ opacity: getThemeConfig.layout !== 'columns' ? 0.5 : 1 }">{{
-					$t('message.layout.twoColumnsTitle')
-				}}</el-divider>
+				<el-divider content-position="left" :style="{ opacity: getThemeConfig.layout !== 'columns' ? 0.5 : 1 }">{{ $t('message.layout.twoColumnsTitle') }}</el-divider>
 				<div class="layout-breadcrumb-seting-bar-flex" :style="{ opacity: getThemeConfig.layout !== 'columns' ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.twoColumnsMenuBar') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-color-picker
-							v-model="getThemeConfig.columnsMenuBar"
-							size="default"
-							@change="onBgColorPickerChange('columnsMenuBar')"
-							:disabled="getThemeConfig.layout !== 'columns'"
-						>
+						<el-color-picker v-model="getThemeConfig.columnsMenuBar" size="default" @change="onBgColorPickerChange('columnsMenuBar')" :disabled="getThemeConfig.layout !== 'columns'">
 						</el-color-picker>
 					</div>
 				</div>
 				<div class="layout-breadcrumb-seting-bar-flex" :style="{ opacity: getThemeConfig.layout !== 'columns' ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.twoColumnsMenuBarColor') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-color-picker
-							v-model="getThemeConfig.columnsMenuBarColor"
-							size="default"
-							@change="onBgColorPickerChange('columnsMenuBarColor')"
-							:disabled="getThemeConfig.layout !== 'columns'"
-						>
+						<el-color-picker v-model="getThemeConfig.columnsMenuBarColor" size="default" @change="onBgColorPickerChange('columnsMenuBarColor')" :disabled="getThemeConfig.layout !== 'columns'">
 						</el-color-picker>
 					</div>
 				</div>
 				<div class="layout-breadcrumb-seting-bar-flex mt14" :style="{ opacity: getThemeConfig.layout !== 'columns' ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.twoIsColumnsMenuBarColorGradual') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-switch
-							v-model="getThemeConfig.isColumnsMenuBarColorGradual"
-							size="small"
-							@change="onColumnsMenuBarGradualChange"
-							:disabled="getThemeConfig.layout !== 'columns'"
-						></el-switch>
+						<el-switch v-model="getThemeConfig.isColumnsMenuBarColorGradual" size="small" @change="onColumnsMenuBarGradualChange" :disabled="getThemeConfig.layout !== 'columns'"></el-switch>
 					</div>
 				</div>
 
@@ -111,23 +87,13 @@
 				<div class="layout-breadcrumb-seting-bar-flex" :style="{ opacity: getThemeConfig.layout === 'transverse' ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.threeIsCollapse') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-switch
-							v-model="getThemeConfig.isCollapse"
-							:disabled="getThemeConfig.layout === 'transverse'"
-							size="small"
-							@change="onThemeConfigChange"
-						></el-switch>
+						<el-switch v-model="getThemeConfig.isCollapse" :disabled="getThemeConfig.layout === 'transverse'" size="small" @change="onThemeConfigChange"></el-switch>
 					</div>
 				</div>
 				<div class="layout-breadcrumb-seting-bar-flex mt15" :style="{ opacity: getThemeConfig.layout === 'transverse' ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.threeIsUniqueOpened') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-switch
-							v-model="getThemeConfig.isUniqueOpened"
-							:disabled="getThemeConfig.layout === 'transverse'"
-							size="small"
-							@change="setLocalThemeConfig"
-						></el-switch>
+						<el-switch v-model="getThemeConfig.isUniqueOpened" :disabled="getThemeConfig.layout === 'transverse'" size="small" @change="setLocalThemeConfig"></el-switch>
 					</div>
 				</div>
 				<div class="layout-breadcrumb-seting-bar-flex mt15">
@@ -139,13 +105,7 @@
 				<div class="layout-breadcrumb-seting-bar-flex mt15" :style="{ opacity: getThemeConfig.layout !== 'classic' ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.threeIsClassicSplitMenu') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-switch
-							v-model="getThemeConfig.isClassicSplitMenu"
-							:disabled="getThemeConfig.layout !== 'classic'"
-							size="small"
-							@change="onClassicSplitMenuChange"
-						>
-						</el-switch>
+						<el-switch v-model="getThemeConfig.isClassicSplitMenu" :disabled="getThemeConfig.layout !== 'classic'" size="small" @change="onClassicSplitMenuChange"> </el-switch>
 					</div>
 				</div>
 				<div class="layout-breadcrumb-seting-bar-flex mt15">
@@ -157,16 +117,7 @@
 				<div class="layout-breadcrumb-seting-bar-flex mt11">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.threeLockScreenTime') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-input-number
-							v-model="getThemeConfig.lockScreenTime"
-							controls-position="right"
-							:min="1"
-							:max="9999"
-							@change="setLocalThemeConfig"
-							size="default"
-							style="width: 90px"
-						>
-						</el-input-number>
+						<el-input-number v-model="getThemeConfig.lockScreenTime" controls-position="right" :min="1" :max="9999" @change="setLocalThemeConfig" size="default" style="width: 90px"> </el-input-number>
 					</div>
 				</div>
 
@@ -178,10 +129,7 @@
 						<el-switch v-model="getThemeConfig.isShowLogo" size="small" @change="onIsShowLogoChange"></el-switch>
 					</div>
 				</div>
-				<div
-					class="layout-breadcrumb-seting-bar-flex mt15"
-					:style="{ opacity: getThemeConfig.layout === 'classic' || getThemeConfig.layout === 'transverse' ? 0.5 : 1 }"
-				>
+				<div class="layout-breadcrumb-seting-bar-flex mt15" :style="{ opacity: getThemeConfig.layout === 'classic' || getThemeConfig.layout === 'transverse' ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fourIsBreadcrumb') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
 						<el-switch
@@ -219,12 +167,7 @@
 				<div class="layout-breadcrumb-seting-bar-flex mt15" :style="{ opacity: isMobile ? 0.5 : 1 }">
 					<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fourIsSortableTagsView') }}</div>
 					<div class="layout-breadcrumb-seting-bar-flex-value">
-						<el-switch
-							v-model="getThemeConfig.isSortableTagsView"
-							:disabled="isMobile ? true : false"
-							size="small"
-							@change="onSortableTagsViewChange"
-						></el-switch>
+						<el-switch v-model="getThemeConfig.isSortableTagsView" :disabled="isMobile ? true : false" size="small" @change="onSortableTagsViewChange"></el-switch>
 					</div>
 				</div>
 				<div class="layout-breadcrumb-seting-bar-flex mt15">
@@ -523,8 +466,7 @@ export default defineComponent({
 			} else {
 				if (getThemeConfig.value.isInvert) getThemeConfig.value.isGrayscale = false;
 			}
-			const cssAttr =
-				attr === 'grayscale' ? `grayscale(${getThemeConfig.value.isGrayscale ? 1 : 0})` : `invert(${getThemeConfig.value.isInvert ? '80%' : '0%'})`;
+			const cssAttr = attr === 'grayscale' ? `grayscale(${getThemeConfig.value.isGrayscale ? 1 : 0})` : `invert(${getThemeConfig.value.isInvert ? '80%' : '0%'})`;
 			const appEle: any = document.body;
 			appEle.setAttribute('style', `filter: ${cssAttr}`);
 			setLocalThemeConfig();

+ 3 - 7
Web/src/layout/navBars/breadcrumb/user.vue

@@ -83,12 +83,12 @@ import { storeToRefs } from 'pinia';
 import { useUserInfo } from '/@/stores/userInfo';
 import { useThemeConfig } from '/@/stores/themeConfig';
 import other from '/@/utils/other';
-import { Session, Local } from '/@/utils/storage';
+import { Local } from '/@/utils/storage';
 import UserNews from '/@/layout/navBars/breadcrumb/userNews.vue';
 import Search from '/@/layout/navBars/breadcrumb/search.vue';
 
 import OnlineUser from '/@/views/system/onlineUser/index.vue';
-import { getAPI } from '/@/utils/axios-utils';
+import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
 import { SysAuthApi, SysNoticeApi } from '/@/api-services/api';
 
 export default defineComponent({
@@ -161,11 +161,7 @@ export default defineComponent({
 					},
 				})
 					.then(async () => {
-						// 清除缓存 Token 等
-						Session.clear();
-						Local.clear();
-						// 使用 reload 时,不需要调用 resetRoute() 重置路由
-						window.location.reload();
+						clearAccessTokens();
 					})
 					.catch(() => {});
 			} else if (path === 'wareHouse') {

+ 8 - 0
Web/src/router/backEnd.ts

@@ -11,6 +11,7 @@ import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
 
 import { getAPI } from '/@/utils/axios-utils';
 import { SysMenuApi } from '/@/api-services/api';
+import { ElMessage } from 'element-plus';
 
 const layouModules: any = import.meta.glob('../layout/routerView/*.{vue,tsx}');
 const viewsModules: any = import.meta.glob('../views/**/*.{vue,tsx}');
@@ -102,6 +103,13 @@ export async function setAddRoute() {
  */
 export async function getBackEndControlRoutes() {
 	var res = await getAPI(SysMenuApi).loginMenuGet();
+	if (res.data.result == undefined || res.data.result.length < 1) {
+		ElMessage.error('没有任何菜单权限,请联系管理员!');
+		setTimeout(() => {
+			Session.removeToken();
+			window.location.reload();
+		}, 3000);
+	}
 	return res.data.result;
 }
 

+ 1 - 1
Web/src/stores/themeConfig.ts

@@ -19,7 +19,7 @@ export const useThemeConfig = defineStore('themeConfig', {
 			 * 全局主题
 			 */
 			// 默认 primary 主题颜色
-			primary: '#0033CC', // '#FF5C00',
+			primary: '#0052D9', // '#FF6A00',
 			// 是否开启深色模式
 			isIsDark: false,
 

+ 27 - 0
Web/src/theme/element.scss

@@ -250,6 +250,33 @@
 	overflow-y: auto;
 	overflow-x: hidden;
 }
+.el-dialog__title{
+	font-size: 14px;
+	color: #FFF;
+	font-weight: 700;
+}
+.el-dialog__header {
+	margin-right: 0;
+	padding-top: 10px;
+	// border-bottom: 1px solid var(--el-color-primary-light-1);
+	background: var(--el-color-primary-light-1);
+
+}
+.el-dialog__footer {
+	border-top: 1px dashed var(--el-color-primary-light-5);
+	padding-bottom: 10px;
+  }
+.el-dialog__headerbtn{
+	height: 40px;
+	font-weight: 900;
+	.el-dialog__close{
+		color: #FFF;
+	}
+}
+.el-dialog__headerbtn:hover .el-dialog__close{
+	color: var(--el-color-danger) !important;
+}
+
 
 /* Card 卡片
 ------------------------------- */

+ 8 - 5
Web/src/utils/axios-utils.ts

@@ -28,16 +28,19 @@ export const getToken = () => {
 
 // 清除 token
 export const clearAccessTokens = () => {
-	Local.remove(accessTokenKey);
-	Local.remove(refreshAccessTokenKey);
-
-	// 清除其他
-	Session.clear();
+	clearTokens();
 
 	// 刷新浏览器
 	window.location.reload();
 };
 
+// 清除 token
+export const clearTokens = () => {
+	Local.remove(accessTokenKey);
+	Local.remove(refreshAccessTokenKey);
+	Session.removeToken();
+};
+
 // axios 默认实例
 export const axiosInstance: AxiosInstance = globalAxios;
 

+ 6 - 0
Web/src/utils/storage.ts

@@ -56,4 +56,10 @@ export const Session = {
 		Cookies.remove('token');
 		window.sessionStorage.clear();
 	},
+	// 移除Token缓存
+	removeToken() {
+		var key = 'token';
+		Cookies.remove(key);
+		window.sessionStorage.removeItem(key);
+	},
 };

+ 2 - 6
Web/src/views/error/401.vue

@@ -25,7 +25,7 @@ import { defineComponent, computed } from 'vue';
 import { storeToRefs } from 'pinia';
 import { useThemeConfig } from '/@/stores/themeConfig';
 import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
-import { Session } from '/@/utils/storage';
+import { clearAccessTokens } from '/@/utils/axios-utils';
 
 export default defineComponent({
 	name: '401',
@@ -35,11 +35,7 @@ export default defineComponent({
 		const { themeConfig } = storeToRefs(storesThemeConfig);
 		const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
 		const onSetAuth = () => {
-			// https://gitee.com/lyt-top/vue-next-admin/issues/I5C3JS
-			// 清除缓存/token等
-			Session.clear();
-			// 使用 reload 时,不需要调用 resetRoute() 重置路由
-			window.location.reload();
+			clearAccessTokens();
 		};
 		// 设置主内容的高度
 		const initTagViewHeight = computed(() => {

+ 36 - 58
Web/src/views/login/component/account.vue

@@ -1,15 +1,5 @@
 <template>
 	<el-form ref="ruleFormRef" :model="ruleForm" size="large" :rules="rules" class="login-content-form">
-		<el-form-item class="login-animation0" v-show="tenantList.length > 0">
-			<el-select v-model="ruleForm.tenantId" value-key="id" placeholder="租户名称" class="w100">
-				<template #prefix>
-					<el-icon>
-						<ele-OfficeBuilding />
-					</el-icon>
-				</template>
-				<el-option v-for="item in tenantList" :key="item.id" :label="item.name" :value="item.id" />
-			</el-select>
-		</el-form-item>
 		<el-form-item class="login-animation1" prop="account">
 			<el-input type="text" placeholder="请输入账号" v-model="ruleForm.account" clearable autocomplete="off">
 				<template #prefix>
@@ -56,18 +46,20 @@
 		<div class="font12 mt30 login-animation4 login-msg">{{ $t('message.mobile.msgText') }}</div>
 	</el-form>
 
-	<el-dialog v-model="verifyVisible" title="" width="300px" center>
-		<DragVerifyImgRotate
-			ref="dragRef"
-			:imgsrc="verifyImg"
-			v-model:isPassing="isPass"
-			text="请按住滑块拖动"
-			successText="验证通过"
-			handlerIcon="fa fa-angle-double-right"
-			successIcon="fa fa-hand-peace-o"
-			@passcallback="passVerify"
-		/>
-	</el-dialog>
+	<div class="dialog-header">
+		<el-dialog v-model="verifyVisible" width="300px" center :show-close="false">
+			<DragVerifyImgRotate
+				ref="dragRef"
+				:imgsrc="verifyImg"
+				v-model:isPassing="isPass"
+				text="请按住滑块拖动"
+				successText="验证通过"
+				handlerIcon="fa fa-angle-double-right"
+				successIcon="fa fa-hand-peace-o"
+				@passcallback="passVerify"
+			/>
+		</el-dialog>
+	</div>
 </template>
 
 <script lang="ts">
@@ -75,18 +67,13 @@ import { toRefs, reactive, defineComponent, computed, ref, onMounted } from 'vue
 import { useRoute, useRouter } from 'vue-router';
 import { ElMessage } from 'element-plus';
 import { useI18n } from 'vue-i18n';
-// import Cookies from 'js-cookie';
-// import { storeToRefs } from 'pinia';
-// import { useThemeConfig } from '/@/stores/themeConfig';
-// import { initFrontEndControlRoutes } from '/@/router/frontEnd';
 import { initBackEndControlRoutes } from '/@/router/backEnd';
-import { Session, Local } from '/@/utils/storage';
+import { Session } from '/@/utils/storage';
 import { formatAxis } from '/@/utils/formatTime';
 import { NextLoading } from '/@/utils/loading';
 
-import { getAPI } from '/@/utils/axios-utils';
+import { clearTokens, feature, getAPI } from '/@/utils/axios-utils';
 import { SysAuthApi } from '/@/api-services/api';
-import { SysTenant } from '/@/api-services/models';
 
 // 旋转图片滑块组件
 import DragVerifyImgRotate from '/@/components/dragVerify/dragVerifyImgRotate.vue';
@@ -97,8 +84,6 @@ export default defineComponent({
 	components: { DragVerifyImgRotate },
 	setup() {
 		const { t } = useI18n();
-		// const storesThemeConfig = useThemeConfig();
-		// const { themeConfig } = storeToRefs(storesThemeConfig);
 		const route = useRoute();
 		const router = useRouter();
 
@@ -111,7 +96,6 @@ export default defineComponent({
 				password: '123456',
 				code: '',
 				codeId: 0,
-				tenantId: 0,
 			},
 			rules: {
 				account: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
@@ -126,14 +110,8 @@ export default defineComponent({
 			verifyImg: verifyImg,
 			captchaImage: '',
 			captchaEnabled: true,
-			tenantList: [] as Array<SysTenant>,
 		});
 		onMounted(async () => {
-			// 是否开启多库租户
-			var res = await getAPI(SysAuthApi).tenantDbListGet();
-			state.tenantList = res.data.result ?? [];
-			if (state.tenantList.length > 0) state.ruleForm.tenantId = state.tenantList[0].id ?? 0;
-
 			// 是否开启验证码验证
 			var res1 = await getAPI(SysAuthApi).captchaFlagGet();
 			state.captchaEnabled = res1.data.result ?? true;
@@ -153,34 +131,26 @@ export default defineComponent({
 		});
 		// 登录
 		const onSignIn = async () => {
-			// 先清空缓存
-			Session.clear();
-			Local.clear();
+			// 先清空Token缓存
+			clearTokens();
 
-			var res = await getAPI(SysAuthApi).loginPost(state.ruleForm);
-			if (res.data.result?.accessToken == null) {
+			const [err, res] = await feature(getAPI(SysAuthApi).loginPost(state.ruleForm));
+			if (err) {
+				getCaptcha(); // 重新获取验证码
+				return;
+			}
+			if (res?.data.result?.accessToken == undefined) {
 				getCaptcha(); // 重新获取验证码
-
 				ElMessage.error('登录失败,请检查账号!');
 				return;
 			}
 
 			state.loading.signIn = true;
-			// 存储 token 到浏览器缓存
-			Session.set('token', res.data.result?.accessToken);
-			// // 模拟数据,对接接口时,记得删除多余代码及对应依赖的引入。用于 `/src/stores/userInfo.ts` 中不同用户登录判断(模拟数据)
-			// Cookies.set('userName', state.ruleForm.account);
-			// if (!themeConfig.value.isRequestRoutes) {
-			// 	// 前端控制路由,2、请注意执行顺序
-			// 	await initFrontEndControlRoutes();
-			// 	signInSuccess();
-			// } else {
-			// 模拟后端控制路由,isRequestRoutes 为 true,则开启后端控制路由
-			// 添加完动态路由,再进行 router 跳转,否则可能报错 No match found for location with path "/"
+			Session.set('token', res.data.result?.accessToken); // 缓存token
+			// 添加完动态路由再进行router跳转,否则可能报错 No match found for location with path "/"
 			await initBackEndControlRoutes();
-			// 执行完 initBackEndControlRoutes,再执行 signInSuccess
+			// 再执行 signInSuccess
 			signInSuccess();
-			// }
 		};
 		// 登录成功后的跳转
 		const signInSuccess = () => {
@@ -212,7 +182,7 @@ export default defineComponent({
 				} else {
 					state.verifyVisible = true;
 					state.isPass = false;
-					dragRef.value.reset();
+					dragRef.value?.reset();
 				}
 			});
 		};
@@ -235,6 +205,14 @@ export default defineComponent({
 </script>
 
 <style scoped lang="scss">
+.dialog-header {
+	:deep(.el-dialog) {
+		.el-dialog__header {
+			display: none;
+		}
+	}
+}
+
 .login-content-form {
 	margin-top: 20px;
 

+ 1 - 1
Web/src/views/login/index.vue

@@ -131,7 +131,7 @@ export default defineComponent({
 
 	.login-content {
 		width: 500px;
-		height: 550px;
+		height: 500px;
 		padding: 20px;
 		position: absolute;
 		right: 10%;

+ 2 - 2
Web/src/views/system/config/component/editConfig.vue

@@ -64,7 +64,7 @@ import { SysConfigApi } from '/@/api-services/api';
 import { UpdateConfigInput } from '/@/api-services/models';
 
 export default defineComponent({
-	name: 'sysEditPos',
+	name: 'sysEditConfig',
 	components: {},
 	props: {
 		title: {
@@ -81,7 +81,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 1 - 1
Web/src/views/system/database/component/editColumn.vue

@@ -44,7 +44,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 1 - 1
Web/src/views/system/database/component/editTable.vue

@@ -44,7 +44,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 1 - 1
Web/src/views/system/dict/component/editDictData.vue

@@ -72,7 +72,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			if (JSON.stringify(row) == '{}') {
 				state.ruleForm.dictTypeId = props.dictTypeId;
 			}

+ 1 - 1
Web/src/views/system/dict/component/editDictType.vue

@@ -68,7 +68,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 1 - 1
Web/src/views/system/menu/component/editMenu.vue

@@ -170,7 +170,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 1 - 1
Web/src/views/system/notice/component/editNotice.vue

@@ -59,7 +59,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 1 - 1
Web/src/views/system/org/component/editOrg.vue

@@ -82,7 +82,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 取消

+ 1 - 1
Web/src/views/system/pos/component/editPos.vue

@@ -68,7 +68,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 1 - 1
Web/src/views/system/region/component/editRegion.vue

@@ -82,7 +82,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 取消

+ 6 - 7
Web/src/views/system/role/component/editRole.vue

@@ -42,7 +42,6 @@
 								highlight-current
 								class="menu-data-tree"
 								icon="ele-Menu"
-								check-strictly
 							/>
 						</el-form-item>
 					</el-col>
@@ -94,7 +93,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = async (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			if (JSON.stringify(row) !== '{}') {
 				var res = await getAPI(SysRoleApi).sysRoleOwnMenuListGet(row.id);
 				setTimeout(() => {
@@ -158,9 +157,9 @@ export default defineComponent({
 
 :deep(.penultimate-node) {
 	.el-tree-node__children {
-		padding-left: 60px;
+		padding-left: 40px;
 		white-space: pre-wrap;
-		line-height: 12px;
+		line-height: 100%;
 
 		.el-tree-node {
 			display: inline-block;
@@ -170,9 +169,9 @@ export default defineComponent({
 			padding-left: 5px !important;
 			padding-right: 5px;
 
-			.el-tree-node__expand-icon {
-				display: none;
-			}
+			// .el-tree-node__expand-icon {
+			// 	display: none;
+			// }
 		}
 	}
 }

+ 8 - 11
Web/src/views/system/tenant/component/editTenant.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="sys-tenant-container">
-		<el-dialog v-model="isShowDialog" :title="title" draggable width="769px">
+		<el-dialog v-model="isShowDialog" :title="title" draggable :close-on-click-modal="false" width="769px">
 			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="100px">
 				<el-row :gutter="35">
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
@@ -18,7 +18,7 @@
 					</el-col>
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
 						<el-form-item label="管理员" prop="adminName" :rules="[{ required: true, message: '管理员不能为空', trigger: 'blur' }]">
-							<el-input v-model="ruleForm.adminName" placeholder="管理员" clearable :disabled="ruleForm.tenantType == 1" />
+							<el-input v-model="ruleForm.adminName" placeholder="管理员" clearable />
 						</el-form-item>
 					</el-col>
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
@@ -36,11 +36,11 @@
 							<el-input-number v-model="ruleForm.order" placeholder="排序" class="w100" />
 						</el-form-item>
 					</el-col>
-					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+					<!-- <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 						<el-form-item label="主机">
 							<el-input v-model="ruleForm.host" placeholder="主机" clearable />
 						</el-form-item>
-					</el-col>
+					</el-col> -->
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
 						<el-form-item label="数据库类型">
 							<el-select v-model="ruleForm.dbType" placeholder="数据库类型" clearable style="width: 100%" :disabled="ruleForm.tenantType == 0 && ruleForm.tenantType != undefined">
@@ -63,11 +63,11 @@
 							</el-select>
 						</el-form-item>
 					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+					<!-- <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
 						<el-form-item label="数据库标识">
 							<el-input v-model="ruleForm.configId" placeholder="数据库标识" clearable :disabled="ruleForm.tenantType == 0 && ruleForm.tenantType != undefined" />
 						</el-form-item>
-					</el-col>
+					</el-col> -->
 					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 						<el-form-item label="连接字符串">
 							<el-input v-model="ruleForm.connection" placeholder="连接字符串" clearable type="textarea" :disabled="ruleForm.tenantType == 0 && ruleForm.tenantType != undefined" />
@@ -91,7 +91,7 @@
 </template>
 
 <script lang="ts">
-import { reactive, toRefs, defineComponent, getCurrentInstance, ref, watch } from 'vue';
+import { reactive, toRefs, defineComponent, getCurrentInstance, ref } from 'vue';
 
 import { getAPI } from '/@/utils/axios-utils';
 import { SysTenantApi } from '/@/api-services/api';
@@ -113,12 +113,9 @@ export default defineComponent({
 			isShowDialog: false,
 			ruleForm: {} as UpdateTenantInput,
 		});
-		watch(state, () => {
-			if (state.ruleForm.tenantType == 1) state.ruleForm.adminName = 'Administrator';
-		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 6 - 7
Web/src/views/system/tenant/component/grantMenu.vue

@@ -15,7 +15,6 @@
 								highlight-current
 								class="menu-data-tree"
 								icon="ele-Menu"
-								check-strictly
 								default-expand-all
 							/>
 						</el-form-item>
@@ -106,16 +105,16 @@ export default defineComponent({
 <style scoped lang="scss">
 .menu-data-tree {
 	width: 100%;
-	border: 1px solid var(--el-border-color);
+	// border: 1px solid var(--el-border-color);
 	border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
 	padding: 5px;
 }
 
 :deep(.penultimate-node) {
 	.el-tree-node__children {
-		padding-left: 60px;
+		padding-left: 40px;
 		white-space: pre-wrap;
-		line-height: 12px;
+		line-height: 100%;
 
 		.el-tree-node {
 			display: inline-block;
@@ -125,9 +124,9 @@ export default defineComponent({
 			padding-left: 5px !important;
 			padding-right: 5px;
 
-			.el-tree-node__expand-icon {
-				display: none;
-			}
+			// .el-tree-node__expand-icon {
+			// 	display: none;
+			// }
 		}
 	}
 }

+ 10 - 5
Web/src/views/system/tenant/index.vue

@@ -27,7 +27,13 @@
 				<el-table-column prop="tenantType" label="租户类型" align="center" show-overflow-tooltip>
 					<template #default="scope">
 						<el-tag v-if="scope.row.tenantType === 0"> ID隔离 </el-tag>
-						<el-tag v-else> 库隔离 </el-tag>
+						<el-tag type="danger" v-else> 库隔离 </el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="status" label="状态" width="70" align="center" show-overflow-tooltip>
+					<template #default="scope">
+						<el-tag type="success" v-if="scope.row.status === 1">启用</el-tag>
+						<el-tag type="danger" v-else>禁用</el-tag>
 					</template>
 				</el-table-column>
 				<el-table-column prop="dbType" label="数据库类型" align="center" show-overflow-tooltip>
@@ -50,7 +56,7 @@
 						<el-tag v-else-if="scope.row.dbType === 900"> Custom </el-tag>
 					</template>
 				</el-table-column>
-				<el-table-column prop="configId" label="数据库标识" show-overflow-tooltip />
+				<!-- <el-table-column prop="configId" label="数据库标识" show-overflow-tooltip /> -->
 				<el-table-column prop="connection" label="数据库连接" width="300" show-overflow-tooltip />
 				<el-table-column prop="order" label="排序" width="70" align="center" show-overflow-tooltip />
 				<el-table-column prop="createTime" label="修改时间" align="center" show-overflow-tooltip />
@@ -197,15 +203,14 @@ export default defineComponent({
 		};
 		// 创建租户库
 		const createTenant = (row: any) => {
-			ElMessageBox.confirm(`确定创建/更新数据库:【${row.name}】?`, '提示', {
+			ElMessageBox.confirm(`确定创建/更新租户数据库:【${row.name}】?`, '提示', {
 				confirmButtonText: '确定',
 				cancelButtonText: '取消',
 				type: 'warning',
 			})
 				.then(async () => {
 					await getAPI(SysTenantApi).sysTenantCreateDbPost({ id: row.id });
-					handleQuery();
-					ElMessage.success('创建/更新数据库成功');
+					ElMessage.success('创建/更新租户数据库成功');
 				})
 				.catch(() => {});
 		};

+ 1 - 1
Web/src/views/system/timer/component/editTimer.vue

@@ -87,7 +87,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			state.isShowDialog = true;
 		};
 		// 关闭弹窗

+ 34 - 31
Web/src/views/system/user/component/editUser.vue

@@ -84,40 +84,43 @@
 								<div style="color: #b1b3b8">附属机构</div>
 							</el-divider>
 							<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-								<el-button icon="ele-Plus" type="primary" @click="addExtOrgRow"> 增加附属机构 </el-button>
+								<el-button icon="ele-Plus" type="primary" plain @click="addExtOrgRow"> 增加附属机构 </el-button>
 								<span style="font-size: 12px; color: gray; padding-left: 5px"> 具有相应组织机构的数据权限 </span>
 							</el-col>
 							<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
-								<el-row :gutter="35" v-for="(v, k) in ruleForm.extOrgIdList" :key="k">
-									<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-										<el-form-item label="机构" :prop="`extOrgIdList[${k}].orgId`" :rules="[{ required: true, message: `机构不能为空`, trigger: 'blur' }]">
-											<template #label>
-												<el-button icon="ele-Delete" type="danger" circle plain size="small" @click="deleteExtOrgRow(k)"></el-button>
-												<span class="ml5">机构</span>
-											</template>
-											<el-cascader
-												:options="orgData"
-												:props="{ checkStrictly: true, emitPath: false, value: 'id', label: 'name' }"
-												placeholder="机构组织"
-												clearable
-												class="w100"
-												v-model="ruleForm.extOrgIdList[k].orgId"
-											>
-												<template #default="{ node, data }">
-													<span>{{ data.name }}</span>
-													<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
+								<template v-if="ruleForm.extOrgIdList != undefined && ruleForm.extOrgIdList.length > 0">
+									<el-row :gutter="35" v-for="(v, k) in ruleForm.extOrgIdList" :key="k">
+										<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+											<el-form-item label="机构" :prop="`extOrgIdList[${k}].orgId`" :rules="[{ required: true, message: `机构不能为空`, trigger: 'blur' }]">
+												<template #label>
+													<el-button icon="ele-Delete" type="danger" circle plain size="small" @click="deleteExtOrgRow(k)"></el-button>
+													<span class="ml5">机构</span>
 												</template>
-											</el-cascader>
-										</el-form-item>
-									</el-col>
-									<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
-										<el-form-item label="职位" :prop="`extOrgIdList[${k}].posId`" :rules="[{ required: true, message: `职位不能为空`, trigger: 'blur' }]">
-											<el-select v-model="ruleForm.extOrgIdList[k].posId" placeholder="职位名称" style="width: 100%">
-												<el-option v-for="d in posData" :key="d.id" :label="d.name" :value="d.id" />
-											</el-select>
-										</el-form-item>
-									</el-col>
-								</el-row>
+												<el-cascader
+													:options="orgData"
+													:props="{ checkStrictly: true, emitPath: false, value: 'id', label: 'name' }"
+													placeholder="机构组织"
+													clearable
+													class="w100"
+													v-model="ruleForm.extOrgIdList[k].orgId"
+												>
+													<template #default="{ node, data }">
+														<span>{{ data.name }}</span>
+														<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
+													</template>
+												</el-cascader>
+											</el-form-item>
+										</el-col>
+										<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+											<el-form-item label="职位" :prop="`extOrgIdList[${k}].posId`" :rules="[{ required: true, message: `职位不能为空`, trigger: 'blur' }]">
+												<el-select v-model="ruleForm.extOrgIdList[k].posId" placeholder="职位名称" style="width: 100%">
+													<el-option v-for="d in posData" :key="d.id" :label="d.name" :value="d.id" />
+												</el-select>
+											</el-form-item>
+										</el-col>
+									</el-row>
+								</template>
+								<el-empty description="空" v-else></el-empty>
 							</el-col>
 						</el-row>
 					</el-form>
@@ -259,7 +262,7 @@ export default defineComponent({
 		});
 		// 打开弹窗
 		const openDialog = async (row: any) => {
-			state.ruleForm = row;
+			state.ruleForm = JSON.parse(JSON.stringify(row));
 			if (JSON.stringify(row) !== '{}') {
 				var resRole = await getAPI(SysUserApi).sysUserOwnRoleUserIdGet(row.id);
 				state.ruleForm.roleIdList = resRole.data.result;

+ 2 - 5
Web/src/views/system/user/component/userCenter.vue

@@ -136,11 +136,10 @@ import { toRefs, reactive, defineComponent, ref, onMounted, watch } from 'vue';
 import { storeToRefs } from 'pinia';
 import { ElMessageBox, UploadInstance } from 'element-plus';
 import { useUserInfo } from '/@/stores/userInfo';
-import { Session } from '/@/utils/storage';
 import { base64ToFile } from '/@/utils/base64Conver';
 import OrgTree from '/@/views/system/user/component/orgTree.vue';
 
-import { getAPI } from '/@/utils/axios-utils';
+import { clearAccessTokens, getAPI } from '/@/utils/axios-utils';
 import { SysFileApi, SysUserApi } from '/@/api-services/api';
 import { ChangePwdInput, SysUser } from '/@/api-services/models';
 
@@ -257,9 +256,7 @@ export default defineComponent({
 					cancelButtonText: '取消',
 					type: 'warning',
 				}).then(async () => {
-					// 清除缓存
-					Session.clear();
-					window.location.reload();
+					clearAccessTokens();
 				});
 			});
 		};

+ 78 - 0
Web/src/views/test/tenant/component/editTenant.vue

@@ -0,0 +1,78 @@
+<template>
+	<div class="tenant-container">
+		<el-dialog v-model="isShowDialog" :title="title" draggable width="600px">
+			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="80px">
+				<el-row :gutter="35">
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="名称" prop="name" :rules="[{ required: true, message: '名称不能为空', trigger: 'blur' }]">
+							<el-input v-model="ruleForm.name" placeholder="名称" clearable />
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="cancel" size="default">取 消</el-button>
+					<el-button type="primary" @click="submit" size="default">确 定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script lang="ts">
+import { reactive, toRefs, defineComponent, getCurrentInstance, ref } from 'vue';
+
+import { getAPI } from '/@/utils/axios-utils';
+import { TenantBusinessApi } from '/@/api-services/_business/api';
+import { TenantBusiness } from '/@/api-services/_business/models';
+
+export default defineComponent({
+	name: 'sysEditTenant',
+	components: {},
+	props: {
+		title: {
+			type: String,
+			default: '',
+		},
+	},
+	setup() {
+		const { proxy } = getCurrentInstance() as any;
+		const ruleFormRef = ref();
+		const state = reactive({
+			isShowDialog: false,
+			ruleForm: {} as TenantBusiness,
+		});
+		// 打开弹窗
+		const openDialog = (row: any) => {
+			state.ruleForm = row;
+			state.isShowDialog = true;
+		};
+		// 关闭弹窗
+		const closeDialog = () => {
+			proxy.mittBus.emit('submitRefresh');
+			state.isShowDialog = false;
+		};
+		// 取消
+		const cancel = () => {
+			state.isShowDialog = false;
+		};
+		// 提交
+		const submit = () => {
+			ruleFormRef.value.validate(async (valid: boolean) => {
+				if (!valid) return;
+				await getAPI(TenantBusinessApi).apiTenantBusinessAddBusinessPost();
+				closeDialog();
+			});
+		};
+		return {
+			ruleFormRef,
+			openDialog,
+			closeDialog,
+			cancel,
+			submit,
+			...toRefs(state),
+		};
+	},
+});
+</script>

+ 113 - 0
Web/src/views/test/tenant/index.vue

@@ -0,0 +1,113 @@
+<template>
+	<div class="tenant-container">
+		<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
+			<el-form :model="queryParams" ref="queryForm" :inline="true">
+				<el-form-item label="名称" prop="name">
+					<el-input placeholder="名称" clearable @keyup.enter="handleQuery" v-model="queryParams.name" />
+				</el-form-item>
+				<el-form-item>
+					<el-button icon="ele-Refresh" @click="resetQuery"> 重置 </el-button>
+					<el-button type="primary" icon="ele-Search" @click="handleQuery"> 查询 </el-button>
+					<el-button icon="ele-Plus" @click="openAddTenant"> 新增 </el-button>
+				</el-form-item>
+			</el-form>
+		</el-card>
+
+		<el-card shadow="hover" style="margin-top: 8px">
+			<el-table :data="tenantData" style="width: 100%" v-loading="loading" border>
+				<el-table-column type="index" label="序号" width="55" align="center" />
+				<el-table-column prop="name" label="名称" show-overflow-tooltip />
+				<el-table-column prop="createTime" label="修改时间" align="center" show-overflow-tooltip />
+				<el-table-column label="操作" width="140" fixed="right" align="center" show-overflow-tooltip>
+					<template #default="scope">
+						<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditTenant(scope.row)"> 编辑 </el-button>
+						<el-button icon="ele-Delete" size="small" text type="danger" @click="delTenant(scope.row)"> 删除 </el-button>
+					</template>
+				</el-table-column>
+			</el-table>
+		</el-card>
+		<EditTenant ref="editTenantRef" :title="editTenantTitle" />
+	</div>
+</template>
+
+<script lang="ts">
+import { toRefs, reactive, onMounted, ref, defineComponent, onUnmounted, getCurrentInstance } from 'vue';
+import { ElMessageBox } from 'element-plus';
+import EditTenant from '/@/views/test/tenant/component/editTenant.vue';
+
+import { getAPI } from '/@/utils/axios-utils';
+import { TenantBusinessApi } from '/@/api-services/_business/api';
+import { TenantBusiness } from '/@/api-services/_business/models';
+
+export default defineComponent({
+	name: 'testTenant',
+	components: { EditTenant },
+	setup() {
+		const { proxy } = getCurrentInstance() as any;
+		const editTenantRef = ref();
+		const state = reactive({
+			loading: false,
+			tenantData: [] as Array<TenantBusiness>,
+			queryParams: {
+				name: undefined,
+			},
+			editTenantTitle: '',
+		});
+		onMounted(async () => {
+			handleQuery();
+
+			proxy.mittBus.on('submitRefresh', () => {
+				handleQuery();
+			});
+		});
+		onUnmounted(() => {
+			proxy.mittBus.off('submitRefresh');
+		});
+		// 查询操作
+		const handleQuery = async () => {
+			state.loading = true;
+			var res = await getAPI(TenantBusinessApi).apiTenantBusinessGetBusinessListGet();
+			state.tenantData = res.data.result ?? [];
+			state.loading = false;
+		};
+		// 重置操作
+		const resetQuery = () => {
+			state.queryParams.name = undefined;
+			handleQuery();
+		};
+		// 打开新增页面
+		const openAddTenant = () => {
+			state.editTenantTitle = '添加业务';
+			editTenantRef.value.openDialog({});
+		};
+		// 打开编辑页面
+		const openEditTenant = (row: any) => {
+			state.editTenantTitle = '编辑业务';
+			editTenantRef.value.openDialog(row);
+		};
+		// 删除
+		const delTenant = (row: any) => {
+			ElMessageBox.confirm(`确定删除业务:【${row.name}】?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+			});
+			// .then(async () => {
+			// 	await getAPI(TenantBusinessApi).sysConfigDeletePost({ id: row.id });
+			// 	handleQuery();
+			// 	ElMessage.success('删除成功');
+			// })
+			// .catch(() => {});
+		};
+		return {
+			handleQuery,
+			resetQuery,
+			editTenantRef,
+			openAddTenant,
+			openEditTenant,
+			delTenant,
+			...toRefs(state),
+		};
+	},
+});
+</script>