From 45ac0f23e12ac2a45c6affe9e39d0897e4fad618 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期四, 16 二月 2023 17:06:10 +0800
Subject: [PATCH] !286 合并 多租户功能 * add 新增 ruoyi-common-tenant 多租户模块 全框架适配多租户改动 * update 优化 隐藏页面主键 * remove 移除 缓存列表功能(多租户缓存功能繁杂多样 没有办法在页面管理) * update 重构 全局缓存KEY 与 常用缓存KEY做区分 * update 重构 OssFactory 加载方式 改为每次比对配置做实例更新 * update 优化 SaTokenDao 改为 Bean 注入 便于扩展 * update 重构 项目初始化数据改为懒加载 不提供热加载 * update 重构 验证码开关使用配置文件(经调查少有动态开启需求) * update 优化 启用 sqlserver 高版本语法 简化sql脚本语法 * update 优化 DataPermissionHelper 增加 开启/关闭 忽略数据权限功能 * update 优化 连接池增加 keepaliveTime 探活参数 * update 优化 调整连接池最长生命周期 防止出现警告 * update 优化 代码生成页面模板 校验不必要的表单数据 * add 新增 StringUtils splitTo 与 splitList 方法 优化业务代码

---
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java                                        |   10 
 script/sql/oracle/oracle_test.sql                                                                                                     |    4 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/config/RuoYiConfig.java                                            |    5 
 ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java                                                  |   12 
 ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/FilterConfig.java                                             |    2 
 ruoyi-ui/src/assets/icons/svg/company.svg                                                                                             |    1 
 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantMapper.xml                                                       |    7 
 ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java                                                            |    9 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysProfileController.java                                 |    4 
 ruoyi-ui/src/views/register.vue                                                                                                       |   14 
 ruoyi-ui/src/views/system/dict/index.vue                                                                                              |    2 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java                                            |    5 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOperLogBo.java                                                 |  116 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/manager/TenantSpringCacheManager.java                          |   32 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java                                                |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java                                   |   47 
 ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java                                                    |    4 
 ruoyi-ui/src/views/system/post/index.vue                                                                                              |    2 
 ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataPermissionHelper.java                             |   17 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java                                                    |    8 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java                                                    |    2 
 ruoyi-ui/src/views/system/tenant/index.vue                                                                                            |  419 ++
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java                                                         |   25 
 ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/page/PageQuery.java                                     |    4 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/config/TenantConfig.java                                       |  100 
 ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/filter/XssFilter.java                                                |    2 
 ruoyi-admin/src/main/resources/application.yml                                                                                        |   17 
 ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java                                                       |   14 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StreamUtils.java                                             |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java                                        |   36 
 script/sql/sqlserver/sqlserver_test.sql                                                                                               |  314 +-
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysOperLogVo.java                                                 |  138 
 script/sql/postgres/postgres_test.sql                                                                                                 |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysLogininforBo.java                                              |   74 
 ruoyi-admin/src/main/resources/application-prod.yml                                                                                   |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenantPackage.java                                                |   54 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java                                         |    5 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java                                                    |   19 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java                                                         |   13 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOss.java                                                          |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java                                    |   42 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java                                      |   29 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/TenantKeyPrefixHandler.java                             |   58 
 ruoyi-admin/src/main/resources/application-dev.yml                                                                                    |    4 
 ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm                                                           |   14 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysLoginController.java                                                            |   45 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantPackageVo.java                                           |   63 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantEntity.java                                         |   21 
 ruoyi-ui/src/store/modules/user.js                                                                                                    |    8 
 ruoyi-ui/src/api/system/tenant.js                                                                                                     |   74 
 ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/OperLogEvent.java                                              |    5 
 ruoyi-ui/src/views/system/role/index.vue                                                                                              |    2 
 ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm                                                               |    4 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/properties/TenantProperties.java                               |   27 
 pom.xml                                                                                                                               |    6 
 ruoyi-ui/src/store/getters.js                                                                                                         |    1 
 ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/config/SaTokenConfig.java                                    |   10 
 ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm                                                          |    4 
 ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/core/TencentSmsTemplate.java                                         |    2 
 ruoyi-common/ruoyi-common-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports  |    1 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/GlobalConstants.java                                      |   39 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java                                             |   13 
 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml                                                         |    1 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysMenuController.java                                    |   41 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java                                   |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java                                    |   18 
 ruoyi-ui/src/api/login.js                                                                                                             |   14 
 ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/MybatisExceptionHandler.java                         |    2 
 ruoyi-common/ruoyi-common-tenant/pom.xml                                                                                              |   37 
 ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm                                                                   |   19 
 ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm                                                             |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOssConfig.java                                                    |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPermissionService.java                                          |   28 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysUserVo.java                                                    |   10 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java                                                     |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysUserOnlineController.java                             |   11 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssConfigController.java                               |   14 
 ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/core/dao/PlusSaTokenDao.java                                 |    2 
 ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java                                              |   18 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java                                                         |   31 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java                                            |   10 
 ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/core/OssClient.java                                                  |   13 
 script/sql/sqlserver/sqlserver_ry_vue_5.X.sql                                                                                         | 1394 ++++++---
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantSaTokenDao.java                                     |  114 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantPackageMapper.java                                          |   14 
 ruoyi-ui/src/views/login.vue                                                                                                          |   31 
 ruoyi-ui/src/api/system/tenantPackage.js                                                                                              |   58 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java                                                     |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java                                        |   18 
 script/sql/postgres/postgres_ry_vue_5.X.sql                                                                                           |  717 ++--
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java                                                         |    6 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java                                                             |   12 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java                                                       |    4 
 ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java                                              |   14 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssBo.java                                                     |    1 
 ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java                                               |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java                                                |    3 
 ruoyi-admin/src/main/java/com/ruoyi/web/service/SysRegisterService.java                                                               |   29 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java                                       |  112 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantPackageController.java                           |  124 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java                                  |   61 
 ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java                                                |    1 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java                                                   |   29 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java                                             |   67 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java                                          |   11 
 ruoyi-ui/src/views/system/user/index.vue                                                                                              |    2 
 ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/factory/OssFactory.java                                              |   42 
 script/sql/test.sql                                                                                                                   |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java                                                       |    4 
 ruoyi-admin/src/main/resources/i18n/messages_en_US.properties                                                                         |    5 
 ruoyi-common/ruoyi-common-security/pom.xml                                                                                            |    6 
 ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/constant/GenConstants.java                                            |   15 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantBo.java                                                  |  111 
 ruoyi-admin/src/main/java/com/ruoyi/web/service/SysLoginService.java                                                                  |  115 
 ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/PlusDataPermissionHandler.java                       |    3 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java                                                    |    1 
 script/sql/oracle/oracle_ry_vue_5.X.sql                                                                                               |  378 +
 ruoyi-modules/ruoyi-system/pom.xml                                                                                                    |    2 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java                                        |    5 
 ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java                                            |    2 
 ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/properties/CaptchaProperties.java                             |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysDeptVo.java                                                    |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantPackageServiceImpl.java                               |  139 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java                                        |    6 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java                                     |   12 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java                                  |   19 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantMapper.java                                                 |   14 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java                                             |    3 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java                                       |   26 
 ruoyi-ui/src/views/system/notice/index.vue                                                                                            |    2 
 ruoyi-ui/src/views/system/tenantPackage/index.vue                                                                                     |  388 ++
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java                                      |  334 ++
 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantPackageMapper.xml                                                |    7 
 ruoyi-ui/src/layout/components/Navbar.vue                                                                                             |   62 
 ruoyi-ui/src/views/system/config/index.vue                                                                                            |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java                                                      |   44 
 ruoyi-common/ruoyi-common-satoken/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports |    1 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenant.java                                                       |  103 
 ruoyi-admin/src/main/resources/i18n/messages.properties                                                                               |    5 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java                                    |   22 
 ruoyi-ui/src/layout/index.vue                                                                                                         |    7 
 ruoyi-admin/src/main/java/com/ruoyi/web/domain/vo/TenantListVo.java                                                                   |   19 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysDeptController.java                                    |   10 
 ruoyi-ui/src/api/system/menu.js                                                                                                       |   10 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java                                              |   10 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java                                  |  168 +
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysLogininforVo.java                                              |   90 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java                                                |    8 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysRegisterController.java                                                         |    2 
 ruoyi-common/ruoyi-common-bom/pom.xml                                                                                                 |    7 
 ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/mapper/BaseMapperPlus.java                              |    9 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/PlusTenantLineHandler.java                              |   57 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantPackageBo.java                                           |   54 
 ruoyi-common/ruoyi-common-idempotent/src/main/java/com/ruoyi/common/idempotent/aspectj/RepeatSubmitAspect.java                        |    4 
 ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/ruoyi/common/ratelimiter/annotation/RateLimiter.java                          |    4 
 ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties                                                                         |    5 
 ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm                                                                  |    4 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/TenantStatus.java                                            |   30 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantVo.java                                                  |  112 
 ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm                                                               |   33 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java                                            |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysLogininforController.java                             |   23 
 ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/annotation/ExcelDictFormat.java                                  |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/runner/SystemApplicationRunner.java                                         |   13 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/TenantConstants.java                                      |   51 
 ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/exception/TenantException.java                                 |   20 
 ruoyi-ui/src/views/system/dict/data.vue                                                                                               |    2 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysOperlogController.java                                |   11 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/SmsLoginBody.java                                     |    6 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java                                                    |   11 
 script/sql/ry_vue_5.X.sql                                                                                                             |  278 +
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantService.java                                              |   72 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java                                     |   21 
 ruoyi-common/pom.xml                                                                                                                  |    1 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantPackageService.java                                       |   52 
 /dev/null                                                                                                                             |  241 -
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssConfigBo.java                                               |    1 
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheNames.java                                           |    5 
 ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/utils/LoginHelper.java                                       |   57 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java                                                         |   19 
 ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/LogininforEvent.java                                           |    5 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java                                        |    7 
 ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/utils/ExcelUtil.java                                             |    4 
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java                                                    |    9 
 184 files changed, 6,486 insertions(+), 2,094 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8f687cc..32707d5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
         <hutool.version>5.8.11</hutool.version>
         <okhttp.version>4.10.0</okhttp.version>
         <spring-boot-admin.version>3.0.0</spring-boot-admin.version>
-        <redisson.version>3.19.1</redisson.version>
+        <redisson.version>3.19.2</redisson.version>
         <lock4j.version>2.2.4</lock4j.version>
         <dynamic-ds.version>3.6.1</dynamic-ds.version>
         <alibaba-ttl.version>2.14.2</alibaba-ttl.version>
@@ -42,10 +42,10 @@
         <snakeyaml.version>1.33</snakeyaml.version>
 
         <!-- OSS 閰嶇疆 -->
-        <aws-java-sdk-s3.version>1.12.373</aws-java-sdk-s3.version>
+        <aws-java-sdk-s3.version>1.12.400</aws-java-sdk-s3.version>
         <!-- SMS 閰嶇疆 -->
         <aliyun.sms.version>2.0.23</aliyun.sms.version>
-        <tencent.sms.version>3.1.660</tencent.sms.version>
+        <tencent.sms.version>3.1.687</tencent.sms.version>
 
         <!-- 鎻掍欢鐗堟湰 -->
         <maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java
index 67281ec..bfb127a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/CaptchaController.java
@@ -5,8 +5,8 @@
 import cn.hutool.captcha.generator.CodeGenerator;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.RandomUtil;
-import com.ruoyi.common.core.constant.CacheConstants;
 import com.ruoyi.common.core.constant.Constants;
+import com.ruoyi.common.core.constant.GlobalConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StringUtils;
@@ -17,8 +17,8 @@
 import com.ruoyi.common.sms.entity.SmsResult;
 import com.ruoyi.common.web.config.properties.CaptchaProperties;
 import com.ruoyi.common.web.enums.CaptchaType;
-import com.ruoyi.system.service.ISysConfigService;
 import com.ruoyi.web.domain.vo.CaptchaVo;
+import jakarta.validation.constraints.NotBlank;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.expression.Expression;
@@ -28,7 +28,6 @@
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import jakarta.validation.constraints.NotBlank;
 import java.time.Duration;
 import java.util.HashMap;
 import java.util.Map;
@@ -47,7 +46,6 @@
 
     private final CaptchaProperties captchaProperties;
     private final SmsProperties smsProperties;
-    private final ISysConfigService configService;
 
     /**
      * 鐭俊楠岃瘉鐮�
@@ -60,7 +58,7 @@
         if (!smsProperties.getEnabled()) {
             return R.fail("褰撳墠绯荤粺娌℃湁寮�鍚煭淇″姛鑳斤紒");
         }
-        String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber;
+        String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber;
         String code = RandomUtil.randomNumbers(4);
         RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
         // 楠岃瘉鐮佹ā鏉縤d 鑷澶勭悊 (鏌ユ暟鎹簱鎴栧啓姝诲潎鍙�)
@@ -82,14 +80,14 @@
     @GetMapping("/captchaImage")
     public R<CaptchaVo> getCode() {
         CaptchaVo captchaVo = new CaptchaVo();
-        boolean captchaEnabled = configService.selectCaptchaEnabled();
+        boolean captchaEnabled = captchaProperties.getEnable();
         if (!captchaEnabled) {
             captchaVo.setCaptchaEnabled(false);
             return R.ok(captchaVo);
         }
         // 淇濆瓨楠岃瘉鐮佷俊鎭�
         String uuid = IdUtil.simpleUUID();
-        String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid;
+        String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + uuid;
         // 鐢熸垚楠岃瘉鐮�
         CaptchaType captchaType = captchaProperties.getType();
         boolean isMath = CaptchaType.MATH == captchaType;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysLoginController.java
index 73e6a24..f55b5c8 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysLoginController.java
@@ -1,19 +1,27 @@
 package com.ruoyi.web.controller;
 
 import cn.dev33.satoken.annotation.SaIgnore;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.domain.model.LoginBody;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.core.domain.model.SmsLoginBody;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.satoken.utils.LoginHelper;
 import com.ruoyi.system.domain.SysMenu;
+import com.ruoyi.system.domain.bo.SysTenantBo;
 import com.ruoyi.system.domain.vo.RouterVo;
+import com.ruoyi.system.domain.vo.SysTenantVo;
 import com.ruoyi.system.domain.vo.SysUserVo;
 import com.ruoyi.system.service.ISysMenuService;
+import com.ruoyi.system.service.ISysTenantService;
 import com.ruoyi.system.service.ISysUserService;
-import com.ruoyi.system.service.SysLoginService;
 import com.ruoyi.web.domain.vo.LoginVo;
+import com.ruoyi.web.domain.vo.TenantListVo;
 import com.ruoyi.web.domain.vo.UserInfoVo;
+import com.ruoyi.web.service.SysLoginService;
+import jakarta.servlet.http.HttpServletRequest;
 import jakarta.validation.constraints.NotBlank;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
@@ -22,6 +30,7 @@
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.net.URL;
 import java.util.List;
 
 /**
@@ -37,20 +46,23 @@
     private final SysLoginService loginService;
     private final ISysMenuService menuService;
     private final ISysUserService userService;
+    private final ISysTenantService tenantService;
 
     /**
      * 鐧诲綍鏂规硶
      *
-     * @param loginBody 鐧诲綍淇℃伅
+     * @param body 鐧诲綍淇℃伅
      * @return 缁撴灉
      */
     @SaIgnore
     @PostMapping("/login")
-    public R<LoginVo> login(@Validated @RequestBody LoginBody loginBody) {
+    public R<LoginVo> login(@Validated @RequestBody LoginBody body) {
         LoginVo loginVo = new LoginVo();
         // 鐢熸垚浠ょ墝
-        String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
-            loginBody.getUuid());
+        String token = loginService.login(
+                body.getTenantId(),
+                body.getUsername(), body.getPassword(),
+                body.getCode(), body.getUuid());
         loginVo.setToken(token);
         return R.ok(loginVo);
     }
@@ -58,15 +70,15 @@
     /**
      * 鐭俊鐧诲綍(绀轰緥)
      *
-     * @param smsLoginBody 鐧诲綍淇℃伅
+     * @param body 鐧诲綍淇℃伅
      * @return 缁撴灉
      */
     @SaIgnore
     @PostMapping("/smsLogin")
-    public R<LoginVo> smsLogin(@Validated @RequestBody SmsLoginBody smsLoginBody) {
+    public R<LoginVo> smsLogin(@Validated @RequestBody SmsLoginBody body) {
         LoginVo loginVo = new LoginVo();
         // 鐢熸垚浠ょ墝
-        String token = loginService.smsLogin(smsLoginBody.getPhonenumber(), smsLoginBody.getSmsCode());
+        String token = loginService.smsLogin(body.getTenantId(), body.getPhonenumber(), body.getSmsCode());
         loginVo.setToken(token);
         return R.ok(loginVo);
     }
@@ -98,6 +110,23 @@
     }
 
     /**
+     * 鐧诲綍椤甸潰绉熸埛涓嬫媺妗�
+     *
+     * @return 绉熸埛鍒楄〃
+     */
+    @SaIgnore
+    @GetMapping("/tenant/list")
+    public R<List<TenantListVo>> tenantList(HttpServletRequest request) throws Exception {
+        List<SysTenantVo> tenantList = tenantService.queryList(new SysTenantBo());
+        List<TenantListVo> voList = BeanUtil.copyToList(tenantList, TenantListVo.class);
+        // 鑾峰彇鍩熷悕
+        String host = new URL(request.getRequestURL().toString()).getHost();
+        // 鏍规嵁鍩熷悕杩涜绛涢��
+        List<TenantListVo> list = voList.stream().filter(vo -> StringUtils.equals(vo.getDomain(), host)).toList();
+        return R.ok(CollUtil.isNotEmpty(list) ? list : voList);
+    }
+
+    /**
      * 鑾峰彇鐢ㄦ埛淇℃伅
      *
      * @return 鐢ㄦ埛淇℃伅
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysRegisterController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysRegisterController.java
index 46937fb..21abf93 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysRegisterController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/SysRegisterController.java
@@ -5,7 +5,7 @@
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.domain.model.RegisterBody;
 import com.ruoyi.system.service.ISysConfigService;
-import com.ruoyi.system.service.SysRegisterService;
+import com.ruoyi.web.service.SysRegisterService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PostMapping;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/domain/vo/TenantListVo.java b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/vo/TenantListVo.java
new file mode 100644
index 0000000..9f8016b
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/domain/vo/TenantListVo.java
@@ -0,0 +1,19 @@
+package com.ruoyi.web.domain.vo;
+
+import lombok.Data;
+
+/**
+ * 绉熸埛鍒楄〃
+ *
+ * @author Lion Li
+ */
+@Data
+public class TenantListVo {
+
+    private String tenantId;
+
+    private String companyName;
+
+    private String domain;
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java b/ruoyi-admin/src/main/java/com/ruoyi/web/service/SysLoginService.java
similarity index 63%
rename from ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java
rename to ruoyi-admin/src/main/java/com/ruoyi/web/service/SysLoginService.java
index 4c298ee..2279512 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/service/SysLoginService.java
@@ -1,4 +1,4 @@
-package com.ruoyi.system.service;
+package com.ruoyi.web.service;
 
 import cn.dev33.satoken.exception.NotLoginException;
 import cn.dev33.satoken.secure.BCrypt;
@@ -6,13 +6,14 @@
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.ruoyi.common.core.constant.CacheConstants;
 import com.ruoyi.common.core.constant.Constants;
+import com.ruoyi.common.core.constant.GlobalConstants;
 import com.ruoyi.common.core.domain.dto.RoleDTO;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.core.domain.model.XcxLoginUser;
 import com.ruoyi.common.core.enums.DeviceType;
 import com.ruoyi.common.core.enums.LoginType;
+import com.ruoyi.common.core.enums.TenantStatus;
 import com.ruoyi.common.core.enums.UserStatus;
 import com.ruoyi.common.core.exception.user.CaptchaException;
 import com.ruoyi.common.core.exception.user.CaptchaExpireException;
@@ -21,9 +22,15 @@
 import com.ruoyi.common.log.event.LogininforEvent;
 import com.ruoyi.common.redis.utils.RedisUtils;
 import com.ruoyi.common.satoken.utils.LoginHelper;
+import com.ruoyi.common.tenant.exception.TenantException;
+import com.ruoyi.common.tenant.helper.TenantHelper;
+import com.ruoyi.common.web.config.properties.CaptchaProperties;
 import com.ruoyi.system.domain.SysUser;
+import com.ruoyi.system.domain.vo.SysTenantVo;
 import com.ruoyi.system.domain.vo.SysUserVo;
 import com.ruoyi.system.mapper.SysUserMapper;
+import com.ruoyi.system.service.ISysPermissionService;
+import com.ruoyi.system.service.ISysTenantService;
 import jakarta.servlet.http.HttpServletRequest;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -31,6 +38,7 @@
 import org.springframework.stereotype.Service;
 
 import java.time.Duration;
+import java.util.Date;
 import java.util.List;
 import java.util.function.Supplier;
 
@@ -45,8 +53,9 @@
 public class SysLoginService {
 
     private final SysUserMapper userMapper;
-    private final ISysConfigService configService;
-    private final SysPermissionService permissionService;
+    private final CaptchaProperties captchaProperties;
+    private final ISysPermissionService permissionService;
+    private final ISysTenantService tenantService;
 
     @Value("${user.password.maxRetryCount}")
     private Integer maxRetryCount;
@@ -63,36 +72,41 @@
      * @param uuid     鍞竴鏍囪瘑
      * @return 缁撴灉
      */
-    public String login(String username, String password, String code, String uuid) {
+    public String login(String tenantId, String username, String password, String code, String uuid) {
         HttpServletRequest request = ServletUtils.getRequest();
-        boolean captchaEnabled = configService.selectCaptchaEnabled();
+        boolean captchaEnabled = captchaProperties.getEnable();
         // 楠岃瘉鐮佸紑鍏�
         if (captchaEnabled) {
-            validateCaptcha(username, code, uuid, request);
+            validateCaptcha(tenantId, username, code, uuid, request);
         }
-        SysUserVo user = loadUserByUsername(username);
-        checkLogin(LoginType.PASSWORD, username, () -> !BCrypt.checkpw(password, user.getPassword()));
+        // 鏍¢獙绉熸埛
+        checkTenant(tenantId);
+
+        SysUserVo user = loadUserByUsername(tenantId, username);
+        checkLogin(LoginType.PASSWORD, tenantId, username, () -> !BCrypt.checkpw(password, user.getPassword()));
         // 姝ゅ鍙牴鎹櫥褰曠敤鎴风殑鏁版嵁涓嶅悓 鑷鍒涘缓 loginUser
         LoginUser loginUser = buildLoginUser(user);
         // 鐢熸垚token
         LoginHelper.loginByDevice(loginUser, DeviceType.PC);
 
-        recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
+        recordLogininfor(loginUser.getTenantId(), username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
         recordLoginInfo(user.getUserId());
         return StpUtil.getTokenValue();
     }
 
-    public String smsLogin(String phonenumber, String smsCode) {
+    public String smsLogin(String tenantId, String phonenumber, String smsCode) {
+        // 鏍¢獙绉熸埛
+        checkTenant(tenantId);
         // 閫氳繃鎵嬫満鍙锋煡鎵剧敤鎴�
-        SysUserVo user = loadUserByPhonenumber(phonenumber);
+        SysUserVo user = loadUserByPhonenumber(tenantId, phonenumber);
 
-        checkLogin(LoginType.SMS, user.getUserName(), () -> !validateSmsCode(phonenumber, smsCode));
+        checkLogin(LoginType.SMS, tenantId, user.getUserName(), () -> !validateSmsCode(tenantId, phonenumber, smsCode));
         // 姝ゅ鍙牴鎹櫥褰曠敤鎴风殑鏁版嵁涓嶅悓 鑷鍒涘缓 loginUser
         LoginUser loginUser = buildLoginUser(user);
         // 鐢熸垚token
         LoginHelper.loginByDevice(loginUser, DeviceType.APP);
 
-        recordLogininfor(user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
+        recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
         recordLoginInfo(user.getUserId());
         return StpUtil.getTokenValue();
     }
@@ -104,9 +118,12 @@
         // 鏍¢獙 appid + appsrcret + xcxCode 璋冪敤鐧诲綍鍑瘉鏍¢獙鎺ュ彛 鑾峰彇 session_key 涓� openid
         String openid = "";
         SysUserVo user = loadUserByOpenid(openid);
+        // 鏍¢獙绉熸埛
+        checkTenant(user.getTenantId());
 
         // 姝ゅ鍙牴鎹櫥褰曠敤鎴风殑鏁版嵁涓嶅悓 鑷鍒涘缓 loginUser
         XcxLoginUser loginUser = new XcxLoginUser();
+        loginUser.setTenantId(user.getTenantId());
         loginUser.setUserId(user.getUserId());
         loginUser.setUsername(user.getUserName());
         loginUser.setUserType(user.getUserType());
@@ -114,7 +131,7 @@
         // 鐢熸垚token
         LoginHelper.loginByDevice(loginUser, DeviceType.XCX);
 
-        recordLogininfor(user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
+        recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"));
         recordLoginInfo(user.getUserId());
         return StpUtil.getTokenValue();
     }
@@ -126,7 +143,7 @@
         try {
             LoginUser loginUser = LoginHelper.getLoginUser();
             StpUtil.logout();
-            recordLogininfor(loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success"));
+            recordLogininfor(loginUser.getTenantId(), loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success"));
         } catch (NotLoginException ignored) {
         }
     }
@@ -134,13 +151,15 @@
     /**
      * 璁板綍鐧诲綍淇℃伅
      *
+     * @param tenantId 绉熸埛ID
      * @param username 鐢ㄦ埛鍚�
      * @param status   鐘舵��
      * @param message  娑堟伅鍐呭
      * @return
      */
-    private void recordLogininfor(String username, String status, String message) {
+    private void recordLogininfor(String tenantId, String username, String status, String message) {
         LogininforEvent logininforEvent = new LogininforEvent();
+        logininforEvent.setTenantId(tenantId);
         logininforEvent.setUsername(username);
         logininforEvent.setStatus(status);
         logininforEvent.setMessage(message);
@@ -151,10 +170,10 @@
     /**
      * 鏍¢獙鐭俊楠岃瘉鐮�
      */
-    private boolean validateSmsCode(String phonenumber, String smsCode) {
-        String code = RedisUtils.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + phonenumber);
+    private boolean validateSmsCode(String tenantId, String phonenumber, String smsCode) {
+        String code = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY + phonenumber);
         if (StringUtils.isBlank(code)) {
-            recordLogininfor(phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
+            recordLogininfor(tenantId, phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
             throw new CaptchaExpireException();
         }
         return code.equals(smsCode);
@@ -167,24 +186,25 @@
      * @param code     楠岃瘉鐮�
      * @param uuid     鍞竴鏍囪瘑
      */
-    public void validateCaptcha(String username, String code, String uuid, HttpServletRequest request) {
-        String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, "");
+    public void validateCaptcha(String tenantId, String username, String code, String uuid, HttpServletRequest request) {
+        String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, "");
         String captcha = RedisUtils.getCacheObject(verifyKey);
         RedisUtils.deleteObject(verifyKey);
         if (captcha == null) {
-            recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
+            recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
             throw new CaptchaExpireException();
         }
         if (!code.equalsIgnoreCase(captcha)) {
-            recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"));
+            recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"));
             throw new CaptchaException();
         }
     }
 
-    private SysUserVo loadUserByUsername(String username) {
+    private SysUserVo loadUserByUsername(String tenantId, String username) {
         SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>()
-            .select(SysUser::getUserName, SysUser::getStatus)
-            .eq(SysUser::getUserName, username));
+                .select(SysUser::getUserName, SysUser::getStatus)
+                .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId)
+                .eq(SysUser::getUserName, username));
         if (ObjectUtil.isNull(user)) {
             log.info("鐧诲綍鐢ㄦ埛锛歿} 涓嶅瓨鍦�.", username);
             throw new UserException("user.not.exists", username);
@@ -195,10 +215,11 @@
         return userMapper.selectUserByUserName(username);
     }
 
-    private SysUserVo loadUserByPhonenumber(String phonenumber) {
+    private SysUserVo loadUserByPhonenumber(String tenantId, String phonenumber) {
         SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>()
-            .select(SysUser::getPhonenumber, SysUser::getStatus)
-            .eq(SysUser::getPhonenumber, phonenumber));
+                .select(SysUser::getPhonenumber, SysUser::getStatus)
+                .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId)
+                .eq(SysUser::getPhonenumber, phonenumber));
         if (ObjectUtil.isNull(user)) {
             log.info("鐧诲綍鐢ㄦ埛锛歿} 涓嶅瓨鍦�.", phonenumber);
             throw new UserException("user.not.exists", phonenumber);
@@ -228,12 +249,13 @@
      */
     private LoginUser buildLoginUser(SysUserVo user) {
         LoginUser loginUser = new LoginUser();
+        loginUser.setTenantId(user.getTenantId());
         loginUser.setUserId(user.getUserId());
         loginUser.setDeptId(user.getDeptId());
         loginUser.setUsername(user.getUserName());
         loginUser.setUserType(user.getUserType());
-        loginUser.setMenuPermission(permissionService.getMenuPermission(user.getUserId(), user.isAdmin()));
-        loginUser.setRolePermission(permissionService.getRolePermission(user.getUserId(), user.isAdmin()));
+        loginUser.setMenuPermission(permissionService.getMenuPermission(user.getUserId()));
+        loginUser.setRolePermission(permissionService.getRolePermission(user.getUserId()));
         loginUser.setDeptName(ObjectUtil.isNull(user.getDept()) ? "" : user.getDept().getDeptName());
         List<RoleDTO> roles = BeanUtil.copyToList(user.getRoles(), RoleDTO.class);
         loginUser.setRoles(roles);
@@ -257,15 +279,15 @@
     /**
      * 鐧诲綍鏍¢獙
      */
-    private void checkLogin(LoginType loginType, String username, Supplier<Boolean> supplier) {
-        String errorKey = CacheConstants.PWD_ERR_CNT_KEY + username;
+    private void checkLogin(LoginType loginType, String tenantId, String username, Supplier<Boolean> supplier) {
+        String errorKey = GlobalConstants.PWD_ERR_CNT_KEY + username;
         String loginFail = Constants.LOGIN_FAIL;
 
         // 鑾峰彇鐢ㄦ埛鐧诲綍閿欒娆℃暟(鍙嚜瀹氫箟闄愬埗绛栫暐 渚嬪: key + username + ip)
         Integer errorNumber = RedisUtils.getCacheObject(errorKey);
         // 閿佸畾鏃堕棿鍐呯櫥褰� 鍒欒涪鍑�
         if (ObjectUtil.isNotNull(errorNumber) && errorNumber.equals(maxRetryCount)) {
-            recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
+            recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
             throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime);
         }
 
@@ -275,12 +297,12 @@
             // 杈惧埌瑙勫畾閿欒娆℃暟 鍒欓攣瀹氱櫥褰�
             if (errorNumber.equals(maxRetryCount)) {
                 RedisUtils.setCacheObject(errorKey, errorNumber, Duration.ofMinutes(lockTime));
-                recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
+                recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
                 throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime);
             } else {
                 // 鏈揪鍒拌瀹氶敊璇鏁� 鍒欓�掑
                 RedisUtils.setCacheObject(errorKey, errorNumber);
-                recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber));
+                recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber));
                 throw new UserException(loginType.getRetryLimitCount(), errorNumber);
             }
         }
@@ -288,4 +310,23 @@
         // 鐧诲綍鎴愬姛 娓呯┖閿欒娆℃暟
         RedisUtils.deleteObject(errorKey);
     }
+
+    private void checkTenant(String tenantId) {
+        if (!TenantHelper.isEnable()) {
+            return;
+        }
+        SysTenantVo tenant = tenantService.queryByTenantId(tenantId);
+        if (ObjectUtil.isNull(tenant)) {
+            log.info("鐧诲綍绉熸埛锛歿} 涓嶅瓨鍦�.", tenantId);
+            throw new TenantException("tenant.not.exists");
+        } else if (TenantStatus.DISABLE.getCode().equals(tenant.getStatus())) {
+            log.info("鐧诲綍绉熸埛锛歿} 宸茶鍋滅敤.", tenantId);
+            throw new TenantException("tenant.blocked");
+        } else if (ObjectUtil.isNotNull(tenant.getExpireTime())
+                && new Date().after(tenant.getExpireTime())) {
+            log.info("鐧诲綍绉熸埛锛歿} 宸茶秴杩囨湁鏁堟湡.", tenantId);
+            throw new TenantException("tenant.expired");
+        }
+    }
+
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysRegisterService.java b/ruoyi-admin/src/main/java/com/ruoyi/web/service/SysRegisterService.java
similarity index 69%
rename from ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysRegisterService.java
rename to ruoyi-admin/src/main/java/com/ruoyi/web/service/SysRegisterService.java
index 5621cb8..3f23c21 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysRegisterService.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/service/SysRegisterService.java
@@ -1,8 +1,8 @@
-package com.ruoyi.system.service;
+package com.ruoyi.web.service;
 
 import cn.dev33.satoken.secure.BCrypt;
-import com.ruoyi.common.core.constant.CacheConstants;
 import com.ruoyi.common.core.constant.Constants;
+import com.ruoyi.common.core.constant.GlobalConstants;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.domain.model.RegisterBody;
 import com.ruoyi.common.core.enums.UserType;
@@ -15,7 +15,9 @@
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.log.event.LogininforEvent;
 import com.ruoyi.common.redis.utils.RedisUtils;
+import com.ruoyi.common.web.config.properties.CaptchaProperties;
 import com.ruoyi.system.domain.bo.SysUserBo;
+import com.ruoyi.system.service.ISysUserService;
 import jakarta.servlet.http.HttpServletRequest;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
@@ -30,22 +32,23 @@
 public class SysRegisterService {
 
     private final ISysUserService userService;
-    private final ISysConfigService configService;
+    private final CaptchaProperties captchaProperties;
 
     /**
      * 娉ㄥ唽
      */
     public void register(RegisterBody registerBody) {
         HttpServletRequest request = ServletUtils.getRequest();
+        String tenantId = registerBody.getTenantId();
         String username = registerBody.getUsername();
         String password = registerBody.getPassword();
         // 鏍¢獙鐢ㄦ埛绫诲瀷鏄惁瀛樺湪
         String userType = UserType.getUserType(registerBody.getUserType()).getUserType();
 
-        boolean captchaEnabled = configService.selectCaptchaEnabled();
+        boolean captchaEnabled = captchaProperties.getEnable();
         // 楠岃瘉鐮佸紑鍏�
         if (captchaEnabled) {
-            validateCaptcha(username, registerBody.getCode(), registerBody.getUuid(), request);
+            validateCaptcha(tenantId, username, registerBody.getCode(), registerBody.getUuid(), request);
         }
         SysUserBo sysUser = new SysUserBo();
         sysUser.setUserName(username);
@@ -56,11 +59,11 @@
         if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(sysUser))) {
             throw new UserException("user.register.save.error", username);
         }
-        boolean regFlag = userService.registerUser(sysUser);
+        boolean regFlag = userService.registerUser(sysUser, tenantId);
         if (!regFlag) {
             throw new UserException("user.register.error");
         }
-        recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success"));
+        recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.register.success"));
     }
 
     /**
@@ -71,16 +74,16 @@
      * @param uuid     鍞竴鏍囪瘑
      * @return 缁撴灉
      */
-    public void validateCaptcha(String username, String code, String uuid, HttpServletRequest request) {
-        String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, "");
+    public void validateCaptcha(String tenantId, String username, String code, String uuid, HttpServletRequest request) {
+        String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, "");
         String captcha = RedisUtils.getCacheObject(verifyKey);
         RedisUtils.deleteObject(verifyKey);
         if (captcha == null) {
-            recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.expire"));
+            recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.expire"));
             throw new CaptchaExpireException();
         }
         if (!code.equalsIgnoreCase(captcha)) {
-            recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.error"));
+            recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.error"));
             throw new CaptchaException();
         }
     }
@@ -88,13 +91,15 @@
     /**
      * 璁板綍鐧诲綍淇℃伅
      *
+     * @param tenantId 绉熸埛ID
      * @param username 鐢ㄦ埛鍚�
      * @param status   鐘舵��
      * @param message  娑堟伅鍐呭
      * @return
      */
-    private void recordLogininfor(String username, String status, String message) {
+    private void recordLogininfor(String tenantId, String username, String status, String message) {
         LogininforEvent logininforEvent = new LogininforEvent();
+        logininforEvent.setTenantId(tenantId);
         logininforEvent.setUsername(username);
         logininforEvent.setStatus(status);
         logininforEvent.setMessage(message);
diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml
index 081b1d1..92a3640 100644
--- a/ruoyi-admin/src/main/resources/application-dev.yml
+++ b/ruoyi-admin/src/main/resources/application-dev.yml
@@ -92,9 +92,11 @@
         # 绌洪棽杩炴帴瀛樻椿鏈�澶ф椂闂达紝榛樿10鍒嗛挓
         idleTimeout: 600000
         # 姝ゅ睘鎬ф帶鍒舵睜涓繛鎺ョ殑鏈�闀跨敓鍛藉懆鏈燂紝鍊�0琛ㄧず鏃犻檺鐢熷懡鍛ㄦ湡锛岄粯璁�30鍒嗛挓
-        maxLifetime: 900000
+        maxLifetime: 1800000
         # 杩炴帴娴嬭瘯query锛堥厤缃娴嬭繛鎺ユ槸鍚︽湁鏁堬級
         connectionTestQuery: SELECT 1
+        # 澶氫箙妫�鏌ヤ竴娆¤繛鎺ョ殑娲绘��
+        keepaliveTime: 30000
 
 --- # redis 鍗曟満閰嶇疆(鍗曟満涓庨泦缇ゅ彧鑳藉紑鍚竴涓彟涓�涓渶瑕佹敞閲婃帀)
 spring.data:
diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
index 049ce38..e760823 100644
--- a/ruoyi-admin/src/main/resources/application-prod.yml
+++ b/ruoyi-admin/src/main/resources/application-prod.yml
@@ -95,9 +95,11 @@
         # 绌洪棽杩炴帴瀛樻椿鏈�澶ф椂闂达紝榛樿10鍒嗛挓
         idleTimeout: 600000
         # 姝ゅ睘鎬ф帶鍒舵睜涓繛鎺ョ殑鏈�闀跨敓鍛藉懆鏈燂紝鍊�0琛ㄧず鏃犻檺鐢熷懡鍛ㄦ湡锛岄粯璁�30鍒嗛挓
-        maxLifetime: 900000
+        maxLifetime: 1800000
         # 杩炴帴娴嬭瘯query锛堥厤缃娴嬭繛鎺ユ槸鍚︽湁鏁堬級
         connectionTestQuery: SELECT 1
+        # 澶氫箙妫�鏌ヤ竴娆¤繛鎺ョ殑娲绘��
+        keepaliveTime: 30000
 
 --- # redis 鍗曟満閰嶇疆(鍗曟満涓庨泦缇ゅ彧鑳藉紑鍚竴涓彟涓�涓渶瑕佹敞閲婃帀)
 spring.data:
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 2f496b0..f18898c 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -10,10 +10,9 @@
   demoEnabled: true
   # 鑾峰彇ip鍦板潃寮�鍏�
   addressEnabled: true
-  # 缂撳瓨鎳掑姞杞�
-  cacheLazy: false
 
 captcha:
+  enable: true
   # 椤甸潰 <鍙傛暟璁剧疆> 鍙紑鍚叧闂� 楠岃瘉鐮佹牎楠�
   # 楠岃瘉鐮佺被鍨� math 鏁扮粍璁$畻 char 瀛楃楠岃瘉
   type: MATH
@@ -136,6 +135,20 @@
     - /actuator
     - /actuator/**
 
+# 澶氱鎴烽厤缃�
+tenant:
+  # 鏄惁寮�鍚�
+  enable: true
+  # 鎺掗櫎琛�
+  excludes:
+    - sys_menu
+    - sys_tenant
+    - sys_tenant_package
+    - sys_role_dept
+    - sys_role_menu
+    - sys_user_post
+    - sys_user_role
+
 # MyBatisPlus閰嶇疆
 # https://baomidou.com/config/
 mybatis-plus:
diff --git a/ruoyi-admin/src/main/resources/i18n/messages.properties b/ruoyi-admin/src/main/resources/i18n/messages.properties
index 4ff55f4..3a5eeac 100644
--- a/ruoyi-admin/src/main/resources/i18n/messages.properties
+++ b/ruoyi-admin/src/main/resources/i18n/messages.properties
@@ -43,3 +43,8 @@
 sms.code.retry.limit.count=鐭俊楠岃瘉鐮佽緭鍏ラ敊璇瘂0}娆�
 sms.code.retry.limit.exceed=鐭俊楠岃瘉鐮佽緭鍏ラ敊璇瘂0}娆★紝甯愭埛閿佸畾{1}鍒嗛挓
 xcx.code.not.blank=灏忕▼搴廲ode涓嶈兘涓虹┖
+##绉熸埛
+tenant.number.not.blank=绉熸埛缂栧彿涓嶈兘涓虹┖
+tenant.not.exists=瀵逛笉璧�, 鎮ㄧ殑绉熸埛涓嶅瓨鍦紝璇疯仈绯荤鐞嗗憳
+tenant.blocked=瀵逛笉璧凤紝鎮ㄧ殑绉熸埛宸茬鐢紝璇疯仈绯荤鐞嗗憳
+tenant.expired=瀵逛笉璧凤紝鎮ㄧ殑绉熸埛宸茶繃鏈燂紝璇疯仈绯荤鐞嗗憳
diff --git a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties
index c0faca9..7568f68 100644
--- a/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties
+++ b/ruoyi-admin/src/main/resources/i18n/messages_en_US.properties
@@ -43,3 +43,8 @@
 sms.code.retry.limit.count=Sms code input error {0} times
 sms.code.retry.limit.exceed=Sms code input error {0} times, account locked for {1} minutes
 xcx.code.not.blank=Mini program code cannot be blank
+##绉熸埛
+tenant.number.not.blank=Tenant number cannot be blank
+tenant.not.exists=Sorry, your tenant does not exist. Please contact the administrator
+tenant.blocked=Sorry, your tenant is disabled. Please contact the administrator
+tenant.expired=Sorry, your tenant has expired. Please contact the administrator.
diff --git a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties
index 4ff55f4..3a5eeac 100644
--- a/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties
+++ b/ruoyi-admin/src/main/resources/i18n/messages_zh_CN.properties
@@ -43,3 +43,8 @@
 sms.code.retry.limit.count=鐭俊楠岃瘉鐮佽緭鍏ラ敊璇瘂0}娆�
 sms.code.retry.limit.exceed=鐭俊楠岃瘉鐮佽緭鍏ラ敊璇瘂0}娆★紝甯愭埛閿佸畾{1}鍒嗛挓
 xcx.code.not.blank=灏忕▼搴廲ode涓嶈兘涓虹┖
+##绉熸埛
+tenant.number.not.blank=绉熸埛缂栧彿涓嶈兘涓虹┖
+tenant.not.exists=瀵逛笉璧�, 鎮ㄧ殑绉熸埛涓嶅瓨鍦紝璇疯仈绯荤鐞嗗憳
+tenant.blocked=瀵逛笉璧凤紝鎮ㄧ殑绉熸埛宸茬鐢紝璇疯仈绯荤鐞嗗憳
+tenant.expired=瀵逛笉璧凤紝鎮ㄧ殑绉熸埛宸茶繃鏈燂紝璇疯仈绯荤鐞嗗憳
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index af49f5f..4f8e1f1 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -31,6 +31,7 @@
         <module>ruoyi-common-sensitive</module>
         <module>ruoyi-common-json</module>
         <module>ruoyi-common-encrypt</module>
+        <module>ruoyi-common-tenant</module>
     </modules>
 
     <artifactId>ruoyi-common</artifactId>
diff --git a/ruoyi-common/ruoyi-common-bom/pom.xml b/ruoyi-common/ruoyi-common-bom/pom.xml
index 72f28e4..3bd6c09 100644
--- a/ruoyi-common/ruoyi-common-bom/pom.xml
+++ b/ruoyi-common/ruoyi-common-bom/pom.xml
@@ -152,6 +152,13 @@
                 <version>${revision}</version>
             </dependency>
 
+            <!-- 绉熸埛妯″潡 -->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-common-tenant</artifactId>
+                <version>${revision}</version>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>
 
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/config/RuoYiConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/config/RuoYiConfig.java
index 6185fbc..e772a16 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/config/RuoYiConfig.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/config/RuoYiConfig.java
@@ -37,11 +37,6 @@
     private boolean demoEnabled;
 
     /**
-     * 缂撳瓨鎳掑姞杞�
-     */
-    private boolean cacheLazy;
-
-    /**
      * 鑾峰彇鍦板潃寮�鍏�
      */
     @Getter
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
index 38a31ee..c5e8707 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheConstants.java
@@ -3,24 +3,14 @@
 /**
  * 缂撳瓨鐨刱ey 甯搁噺
  *
- * @author ruoyi
+ * @author Lion Li
  */
 public interface CacheConstants {
-
-    /**
-     * 鐧诲綍鐢ㄦ埛 redis key
-     */
-    String LOGIN_TOKEN_KEY = "Authorization:login:token:";
 
     /**
      * 鍦ㄧ嚎鐢ㄦ埛 redis key
      */
     String ONLINE_TOKEN_KEY = "online_tokens:";
-
-    /**
-     * 楠岃瘉鐮� redis key
-     */
-    String CAPTCHA_CODE_KEY = "captcha_codes:";
 
     /**
      * 鍙傛暟绠$悊 cache key
@@ -32,18 +22,4 @@
      */
     String SYS_DICT_KEY = "sys_dict:";
 
-    /**
-     * 闃查噸鎻愪氦 redis key
-     */
-    String REPEAT_SUBMIT_KEY = "repeat_submit:";
-
-    /**
-     * 闄愭祦 redis key
-     */
-    String RATE_LIMIT_KEY = "rate_limit:";
-
-    /**
-     * 鐧诲綍璐︽埛瀵嗙爜閿欒娆℃暟 redis key
-     */
-    String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
 }
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheNames.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheNames.java
index b0d6573..81e92f5 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheNames.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/CacheNames.java
@@ -31,6 +31,11 @@
     String SYS_DICT = "sys_dict";
 
     /**
+     * 绉熸埛
+     */
+    String SYS_TENANT = GlobalConstants.GLOBAL_REDIS_KEY + "sys_tenant#30d";
+
+    /**
      * 鐢ㄦ埛璐︽埛
      */
     String SYS_USER_NAME = "sys_user_name#30d";
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java
index 155d0dc..9553d17 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/Constants.java
@@ -72,5 +72,10 @@
      */
     String TOKEN = "token";
 
+    /**
+     * 椤剁骇閮ㄩ棬id
+     */
+    Long TOP_PARENT_ID = 0L;
+
 }
 
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/GlobalConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/GlobalConstants.java
new file mode 100644
index 0000000..7fcdad1
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/GlobalConstants.java
@@ -0,0 +1,39 @@
+package com.ruoyi.common.core.constant;
+
+/**
+ * 鍏ㄥ眬鐨刱ey甯搁噺 (涓氬姟鏃犲叧鐨刱ey)
+ *
+ * @author Lion Li
+ */
+public interface GlobalConstants {
+
+    /**
+     * 鍏ㄥ眬 redis key (涓氬姟鏃犲叧鐨刱ey)
+     */
+    String GLOBAL_REDIS_KEY = "global:";
+
+    /**
+     * 鐧诲綍鐢ㄦ埛 redis key
+     */
+    String LOGIN_TOKEN_KEY = GLOBAL_REDIS_KEY + "Authorization:login:token:";
+
+    /**
+     * 楠岃瘉鐮� redis key
+     */
+    String CAPTCHA_CODE_KEY = GLOBAL_REDIS_KEY + "captcha_codes:";
+
+    /**
+     * 闃查噸鎻愪氦 redis key
+     */
+    String REPEAT_SUBMIT_KEY = GLOBAL_REDIS_KEY + "repeat_submit:";
+
+    /**
+     * 闄愭祦 redis key
+     */
+    String RATE_LIMIT_KEY = GLOBAL_REDIS_KEY + "rate_limit:";
+
+    /**
+     * 鐧诲綍璐︽埛瀵嗙爜閿欒娆℃暟 redis key
+     */
+    String PWD_ERR_CNT_KEY = GLOBAL_REDIS_KEY + "pwd_err_cnt:";
+}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/TenantConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/TenantConstants.java
new file mode 100644
index 0000000..30a649b
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/constant/TenantConstants.java
@@ -0,0 +1,51 @@
+package com.ruoyi.common.core.constant;
+
+/**
+ * 绉熸埛甯搁噺淇℃伅
+ *
+ * @author Lion Li
+ */
+public interface TenantConstants {
+
+    /**
+     * 绉熸埛姝e父鐘舵��
+     */
+    String NORMAL = "0";
+
+    /**
+     * 绉熸埛灏佺鐘舵��
+     */
+    String DISABLE = "1";
+
+    /**
+     * 鏍¢獙杩斿洖缁撴灉鐮�
+     */
+    String PASS = "0";
+    String NOT_PASS = "1";
+
+    /**
+     * 瓒呯骇绠$悊鍛業D
+     */
+    Long SUPER_ADMIN_ID = 1L;
+
+    /**
+     * 瓒呯骇绠$悊鍛樿鑹� roleKey
+     */
+    String SUPER_ADMIN_ROLE_KEY = "superadmin";
+
+    /**
+     * 绉熸埛绠$悊鍛樿鑹� roleKey
+     */
+    String TENANT_ADMIN_ROLE_KEY = "admin";
+
+    /**
+     * 绉熸埛绠$悊鍛樿鑹插悕绉�
+     */
+    String TENANT_ADMIN_ROLE_NAME = "绠$悊鍛�";
+
+    /**
+     * 榛樿绉熸埛ID
+     */
+    String DEFAULT_TENANT_ID = "000000";
+
+}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
index eab6581..153c02f 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java
@@ -16,6 +16,12 @@
 public class LoginBody {
 
     /**
+     * 绉熸埛ID
+     */
+    @NotBlank(message = "{tenant.number.not.blank}")
+    private String tenantId;
+
+    /**
      * 鐢ㄦ埛鍚�
      */
     @NotBlank(message = "{user.username.not.blank}")
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
index 7db0464..47126f2 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
@@ -23,6 +23,11 @@
     private static final long serialVersionUID = 1L;
 
     /**
+     * 绉熸埛ID
+     */
+    private String tenantId;
+
+    /**
      * 鐢ㄦ埛ID
      */
     private Long userId;
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/SmsLoginBody.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/SmsLoginBody.java
index 5bf95c4..3b25fce 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/SmsLoginBody.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/domain/model/SmsLoginBody.java
@@ -14,6 +14,12 @@
 public class SmsLoginBody {
 
     /**
+     * 绉熸埛ID
+     */
+    @NotBlank(message = "{tenant.number.not.blank}")
+    private String tenantId;
+
+    /**
      * 鐢ㄦ埛鍚�
      */
     @NotBlank(message = "{user.phonenumber.not.blank}")
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/TenantStatus.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/TenantStatus.java
new file mode 100644
index 0000000..166804b
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/TenantStatus.java
@@ -0,0 +1,30 @@
+package com.ruoyi.common.core.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 鐢ㄦ埛鐘舵��
+ *
+ * @author LionLi
+ */
+@Getter
+@AllArgsConstructor
+public enum TenantStatus {
+    /**
+     * 姝e父
+     */
+    OK("0", "姝e父"),
+    /**
+     * 鍋滅敤
+     */
+    DISABLE("1", "鍋滅敤"),
+    /**
+     * 鍒犻櫎
+     */
+    DELETED("2", "鍒犻櫎");
+
+    private final String code;
+    private final String info;
+
+}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java
index 4cff1d5..99bb1da 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/ServletUtils.java
@@ -92,7 +92,7 @@
     public static Map<String, String> getParamMap(ServletRequest request) {
         Map<String, String> params = new HashMap<>();
         for (Map.Entry<String, String[]> entry : getParams(request).entrySet()) {
-            params.put(entry.getKey(), StringUtils.join(entry.getValue(), ","));
+            params.put(entry.getKey(), StringUtils.join(entry.getValue(), StringUtils.SEPARATOR));
         }
         return params;
     }
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StreamUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StreamUtils.java
index c864315..28fce35 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StreamUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StreamUtils.java
@@ -42,7 +42,7 @@
      * @return 鎷兼帴鍚庣殑list
      */
     public static <E> String join(Collection<E> collection, Function<E, String> function) {
-        return join(collection, function, ",");
+        return join(collection, function, StringUtils.SEPARATOR);
     }
 
     /**
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
index cf19a02..5b1c8ca 100644
--- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/StringUtils.java
@@ -1,16 +1,16 @@
 package com.ruoyi.common.core.utils;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.convert.Convert;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import org.springframework.util.AntPathMatcher;
 
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 /**
  * 瀛楃涓插伐鍏风被
@@ -19,6 +19,8 @@
  */
 @NoArgsConstructor(access = AccessLevel.PRIVATE)
 public class StringUtils extends org.apache.commons.lang3.StringUtils {
+
+    public static final String SEPARATOR = ",";
 
     /**
      * 鑾峰彇鍙傛暟涓嶄负绌哄��
@@ -233,7 +235,7 @@
     /**
      * 鏁板瓧宸﹁竟琛ラ綈0锛屼娇涔嬭揪鍒版寚瀹氶暱搴︺�傛敞鎰忥紝濡傛灉鏁板瓧杞崲涓哄瓧绗︿覆鍚庯紝闀垮害澶т簬size锛屽垯鍙繚鐣� 鏈�鍚巗ize涓瓧绗︺��
      *
-     * @param num 鏁板瓧瀵硅薄
+     * @param num  鏁板瓧瀵硅薄
      * @param size 瀛楃涓叉寚瀹氶暱搴�
      * @return 杩斿洖鏁板瓧鐨勫瓧绗︿覆鏍煎紡锛岃瀛楃涓蹭负鎸囧畾闀垮害銆�
      */
@@ -244,9 +246,9 @@
     /**
      * 瀛楃涓插乏琛ラ綈銆傚鏋滃師濮嬪瓧绗︿覆s闀垮害澶т簬size锛屽垯鍙繚鐣欐渶鍚巗ize涓瓧绗︺��
      *
-     * @param s 鍘熷瀛楃涓�
+     * @param s    鍘熷瀛楃涓�
      * @param size 瀛楃涓叉寚瀹氶暱搴�
-     * @param c 鐢ㄤ簬琛ラ綈鐨勫瓧绗�
+     * @param c    鐢ㄤ簬琛ラ綈鐨勫瓧绗�
      * @return 杩斿洖鎸囧畾闀垮害鐨勫瓧绗︿覆锛岀敱鍘熷瓧绗︿覆宸﹁ˉ榻愭垨鎴彇寰楀埌銆�
      */
     public static String padl(final String s, final int size, final char c) {
@@ -265,4 +267,55 @@
         return sb.toString();
     }
 
+    /**
+     * 鍒囧垎瀛楃涓�(鍒嗛殧绗﹂粯璁ら�楀彿)
+     *
+     * @param str 琚垏鍒嗙殑瀛楃涓�
+     * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃
+     */
+    public static List<String> splitList(String str) {
+        return splitTo(str, Convert::toStr);
+    }
+
+    /**
+     * 鍒囧垎瀛楃涓�
+     *
+     * @param str       琚垏鍒嗙殑瀛楃涓�
+     * @param separator 鍒嗛殧绗�
+     * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃
+     */
+    public static List<String> splitList(String str, String separator) {
+        return splitTo(str, separator, Convert::toStr);
+    }
+
+    /**
+     * 鍒囧垎瀛楃涓茶嚜瀹氫箟杞崲(鍒嗛殧绗﹂粯璁ら�楀彿)
+     *
+     * @param str    琚垏鍒嗙殑瀛楃涓�
+     * @param mapper 鑷畾涔夎浆鎹�
+     * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃
+     */
+    public static <T> List<T> splitTo(String str, Function<? super Object, T> mapper) {
+        return splitTo(str, SEPARATOR, mapper);
+    }
+
+    /**
+     * 鍒囧垎瀛楃涓茶嚜瀹氫箟杞崲
+     *
+     * @param str       琚垏鍒嗙殑瀛楃涓�
+     * @param separator 鍒嗛殧绗�
+     * @param mapper    鑷畾涔夎浆鎹�
+     * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃
+     */
+    public static <T> List<T> splitTo(String str, String separator, Function<? super Object, T> mapper) {
+        if (isBlank(str)) {
+            return new ArrayList<>(0);
+        }
+        return StrUtil.split(str, separator)
+            .stream()
+            .filter(Objects::nonNull)
+            .map(mapper)
+            .collect(Collectors.toList());
+    }
+
 }
diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/annotation/ExcelDictFormat.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/annotation/ExcelDictFormat.java
index a9671fb..162dc79 100644
--- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/annotation/ExcelDictFormat.java
+++ b/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/annotation/ExcelDictFormat.java
@@ -1,5 +1,7 @@
 package com.ruoyi.common.excel.annotation;
 
+import com.ruoyi.common.core.utils.StringUtils;
+
 import java.lang.annotation.*;
 
 /**
@@ -25,6 +27,6 @@
     /**
      * 鍒嗛殧绗︼紝璇诲彇瀛楃涓茬粍鍐呭
      */
-    String separator() default ",";
+    String separator() default StringUtils.SEPARATOR;
 
 }
diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/utils/ExcelUtil.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/utils/ExcelUtil.java
index c67cff6..2e77701 100644
--- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/utils/ExcelUtil.java
+++ b/ruoyi-common/ruoyi-common-excel/src/main/java/com/ruoyi/common/excel/utils/ExcelUtil.java
@@ -269,7 +269,7 @@
      */
     public static String convertByExp(String propertyValue, String converterExp, String separator) {
         StringBuilder propertyString = new StringBuilder();
-        String[] convertSource = converterExp.split(",");
+        String[] convertSource = converterExp.split(StringUtils.SEPARATOR);
         for (String item : convertSource) {
             String[] itemArray = item.split("=");
             if (StringUtils.containsAny(propertyValue, separator)) {
@@ -298,7 +298,7 @@
      */
     public static String reverseByExp(String propertyValue, String converterExp, String separator) {
         StringBuilder propertyString = new StringBuilder();
-        String[] convertSource = converterExp.split(",");
+        String[] convertSource = converterExp.split(StringUtils.SEPARATOR);
         for (String item : convertSource) {
             String[] itemArray = item.split("=");
             if (StringUtils.containsAny(propertyValue, separator)) {
diff --git a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/ruoyi/common/idempotent/aspectj/RepeatSubmitAspect.java b/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/ruoyi/common/idempotent/aspectj/RepeatSubmitAspect.java
index 1d8bcf4..37824d5 100644
--- a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/ruoyi/common/idempotent/aspectj/RepeatSubmitAspect.java
+++ b/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/ruoyi/common/idempotent/aspectj/RepeatSubmitAspect.java
@@ -3,7 +3,7 @@
 import cn.dev33.satoken.SaManager;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.crypto.SecureUtil;
-import com.ruoyi.common.core.constant.CacheConstants;
+import com.ruoyi.common.core.constant.GlobalConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.exception.ServiceException;
 import com.ruoyi.common.core.utils.MessageUtils;
@@ -57,7 +57,7 @@
 
         submitKey = SecureUtil.md5(submitKey + ":" + nowParams);
         // 鍞竴鏍囪瘑锛堟寚瀹歬ey + url + 娑堟伅澶达級
-        String cacheRepeatKey = CacheConstants.REPEAT_SUBMIT_KEY + url + submitKey;
+        String cacheRepeatKey = GlobalConstants.REPEAT_SUBMIT_KEY + url + submitKey;
         String key = RedisUtils.getCacheObject(cacheRepeatKey);
         if (key == null) {
             RedisUtils.setCacheObject(cacheRepeatKey, "", Duration.ofMillis(interval));
diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
index ca8a568..d85d152 100644
--- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
+++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
@@ -67,6 +67,7 @@
 
             // *========鏁版嵁搴撴棩蹇�=========*//
             OperLogEvent operLog = new OperLogEvent();
+            operLog.setTenantId(LoginHelper.getTenantId());
             operLog.setStatus(BusinessStatus.SUCCESS.ordinal());
             // 璇锋眰鐨勫湴鍧�
             String ip = ServletUtils.getClientIP();
diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/LogininforEvent.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/LogininforEvent.java
index e52e102..785f589 100644
--- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/LogininforEvent.java
+++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/LogininforEvent.java
@@ -20,6 +20,11 @@
     private static final long serialVersionUID = 1L;
 
     /**
+     * 绉熸埛ID
+     */
+    private String tenantId;
+
+    /**
      * 鐢ㄦ埛璐﹀彿
      */
     private String username;
diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/OperLogEvent.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/OperLogEvent.java
index be07dd0..ecb4b7c 100644
--- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/OperLogEvent.java
+++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/event/OperLogEvent.java
@@ -24,6 +24,11 @@
     private Long operId;
 
     /**
+     * 绉熸埛ID
+     */
+    private String tenantId;
+
+    /**
      * 鎿嶄綔妯″潡
      */
     private String title;
diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/domain/TreeEntity.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/domain/TreeEntity.java
deleted file mode 100644
index a238083..0000000
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/domain/TreeEntity.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.ruoyi.common.mybatis.core.domain;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-import java.io.Serial;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Tree鍩虹被
- *
- * @author Lion Li
- */
-
-@Data
-@EqualsAndHashCode(callSuper = true)
-public class TreeEntity<T> extends BaseEntity {
-
-    @Serial
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 鐖惰彍鍗曞悕绉�
-     */
-    @TableField(exist = false)
-    private String parentName;
-
-    /**
-     * 鐖惰彍鍗旾D
-     */
-    private Long parentId;
-
-    /**
-     * 瀛愰儴闂�
-     */
-    @TableField(exist = false)
-    private List<T> children = new ArrayList<>();
-
-}
diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/mapper/BaseMapperPlus.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/mapper/BaseMapperPlus.java
index ee1bc58..68a3509 100644
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/mapper/BaseMapperPlus.java
+++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/mapper/BaseMapperPlus.java
@@ -6,7 +6,7 @@
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.*;
+import com.baomidou.mybatisplus.core.toolkit.ReflectionKit;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.toolkit.Db;
 import com.ruoyi.common.core.utils.BeanCopyUtils;
@@ -17,6 +17,9 @@
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
+import java.util.function.Function;
+import java.util.stream.Collectors;
 
 /**
  * 鑷畾涔� Mapper 鎺ュ彛, 瀹炵幇 鑷畾涔夋墿灞�
@@ -193,4 +196,8 @@
         return (P) voPage;
     }
 
+    default <C> List<C> selectObjs(Wrapper<T> wrapper, Function<? super Object, C> mapper) {
+        return this.selectObjs(wrapper).stream().filter(Objects::nonNull).map(mapper).collect(Collectors.toList());
+    }
+
 }
diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/page/PageQuery.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/page/PageQuery.java
index 30a3e2d..d4c2432 100644
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/page/PageQuery.java
+++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/core/page/PageQuery.java
@@ -89,8 +89,8 @@
         // 鍏煎鍓嶇鎺掑簭绫诲瀷
         isAsc = StringUtils.replaceEach(isAsc, new String[]{"ascending", "descending"}, new String[]{"asc", "desc"});
 
-        String[] orderByArr = orderBy.split(",");
-        String[] isAscArr = isAsc.split(",");
+        String[] orderByArr = orderBy.split(StringUtils.SEPARATOR);
+        String[] isAscArr = isAsc.split(StringUtils.SEPARATOR);
         if (isAscArr.length != 1 && isAscArr.length != orderByArr.length) {
             throw new ServiceException("鎺掑簭鍙傛暟鏈夎");
         }
diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/MybatisExceptionHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/MybatisExceptionHandler.java
similarity index 97%
rename from ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/MybatisExceptionHandler.java
rename to ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/MybatisExceptionHandler.java
index 532cd79..12e1d0c 100644
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/MybatisExceptionHandler.java
+++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/MybatisExceptionHandler.java
@@ -1,4 +1,4 @@
-package com.ruoyi.common.mybatis.helper;
+package com.ruoyi.common.mybatis.handler;
 
 import com.ruoyi.common.core.domain.R;
 import lombok.extern.slf4j.Slf4j;
diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/PlusDataPermissionHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/PlusDataPermissionHandler.java
index 42e238a..740f932 100644
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/PlusDataPermissionHandler.java
+++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/handler/PlusDataPermissionHandler.java
@@ -35,7 +35,6 @@
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.function.Function;
-import java.util.stream.Collectors;
 
 /**
  * 鏁版嵁鏉冮檺杩囨护
@@ -79,7 +78,7 @@
             DataPermissionHelper.setVariable("user", currentUser);
         }
         // 濡傛灉鏄秴绾х鐞嗗憳锛屽垯涓嶈繃婊ゆ暟鎹�
-        if (LoginHelper.isAdmin()) {
+        if (LoginHelper.isSuperAdmin()) {
             return where;
         }
         String dataFilterSql = buildDataFilter(dataColumns, isSelect);
diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataPermissionHelper.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataPermissionHelper.java
index 2094166..8423c1c 100644
--- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataPermissionHelper.java
+++ b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/ruoyi/common/mybatis/helper/DataPermissionHelper.java
@@ -3,6 +3,8 @@
 import cn.dev33.satoken.context.SaHolder;
 import cn.dev33.satoken.context.model.SaStorage;
 import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.plugins.IgnoreStrategy;
+import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 
@@ -44,4 +46,19 @@
         }
         throw new NullPointerException("data permission context type exception");
     }
+
+    /**
+     * 寮�鍚拷鐣ユ暟鎹潈闄�(寮�鍚悗闇�鎵嬪姩璋冪敤 {@link #disableIgnore()} 鍏抽棴)
+     */
+    public static void enableIgnore() {
+        InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().dataPermission(true).build());
+    }
+
+    /**
+     * 鍏抽棴蹇界暐鏁版嵁鏉冮檺
+     */
+    public static void disableIgnore() {
+        InterceptorIgnoreHelper.clearIgnoreStrategy();
+    }
+
 }
diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/core/OssClient.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/core/OssClient.java
index 7a72a5d..924efc1 100644
--- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/core/OssClient.java
+++ b/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/core/OssClient.java
@@ -183,6 +183,12 @@
         return configKey;
     }
 
+    /**
+     * 鑾峰彇绉佹湁URL閾炬帴
+     *
+     * @param objectKey 瀵硅薄KEY
+     * @param second    鎺堟潈鏃堕棿
+     */
     public String getPrivateUrl(String objectKey, Integer second) {
         GeneratePresignedUrlRequest generatePresignedUrlRequest =
             new GeneratePresignedUrlRequest(properties.getBucketName(), objectKey)
@@ -193,6 +199,13 @@
     }
 
     /**
+     * 妫�鏌ラ厤缃槸鍚︾浉鍚�
+     */
+    public boolean checkPropertiesSame(OssProperties properties) {
+        return this.properties.equals(properties);
+    }
+
+    /**
      * 鑾峰彇褰撳墠妗舵潈闄愮被鍨�
      *
      * @return 褰撳墠妗舵潈闄愮被鍨媍ode
diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/factory/OssFactory.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/factory/OssFactory.java
index 885c7be..82467ef 100644
--- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/factory/OssFactory.java
+++ b/ruoyi-common/ruoyi-common-oss/src/main/java/com/ruoyi/common/oss/factory/OssFactory.java
@@ -25,21 +25,6 @@
     private static final Map<String, OssClient> CLIENT_CACHE = new ConcurrentHashMap<>();
 
     /**
-     * 鍒濆鍖栧伐鍘�
-     */
-    public static void init() {
-        log.info("鍒濆鍖朞SS宸ュ巶");
-        RedisUtils.subscribe(OssConstant.DEFAULT_CONFIG_KEY, String.class, configKey -> {
-            OssClient client = getClient(configKey);
-            // 鏈垵濮嬪寲涓嶅鐞�
-            if (client != null) {
-                refresh(configKey);
-                log.info("璁㈤槄鍒锋柊OSS閰嶇疆 => " + configKey);
-            }
-        });
-    }
-
-    /**
      * 鑾峰彇榛樿瀹炰緥
      */
     public static OssClient instance() {
@@ -55,25 +40,24 @@
      * 鏍规嵁绫诲瀷鑾峰彇瀹炰緥
      */
     public static OssClient instance(String configKey) {
-        OssClient client = getClient(configKey);
-        if (client == null) {
-            refresh(configKey);
-            return getClient(configKey);
-        }
-        return client;
-    }
-
-    private static void refresh(String configKey) {
         String json = CacheUtils.get(CacheNames.SYS_OSS_CONFIG, configKey);
         if (json == null) {
             throw new OssException("绯荤粺寮傚父, '" + configKey + "'閰嶇疆淇℃伅涓嶅瓨鍦�!");
         }
         OssProperties properties = JsonUtils.parseObject(json, OssProperties.class);
-        CLIENT_CACHE.put(configKey, new OssClient(configKey, properties));
-    }
-
-    private static OssClient getClient(String configKey) {
-        return CLIENT_CACHE.get(configKey);
+        OssClient client = CLIENT_CACHE.get(configKey);
+        if (client == null) {
+            CLIENT_CACHE.put(configKey, new OssClient(configKey, properties));
+            log.info("鍒涘缓OSS瀹炰緥 key => {}", configKey);
+            return CLIENT_CACHE.get(configKey);
+        }
+        // 閰嶇疆涓嶇浉鍚屽垯閲嶆柊鏋勫缓
+        if (!client.checkPropertiesSame(properties)) {
+            CLIENT_CACHE.put(configKey, new OssClient(configKey, properties));
+            log.info("閲嶈浇OSS瀹炰緥 key => {}", configKey);
+            return CLIENT_CACHE.get(configKey);
+        }
+        return client;
     }
 
 }
diff --git a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/ruoyi/common/ratelimiter/annotation/RateLimiter.java b/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/ruoyi/common/ratelimiter/annotation/RateLimiter.java
index b5bd284..9fe9b0a 100644
--- a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/ruoyi/common/ratelimiter/annotation/RateLimiter.java
+++ b/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/ruoyi/common/ratelimiter/annotation/RateLimiter.java
@@ -1,6 +1,6 @@
 package com.ruoyi.common.ratelimiter.annotation;
 
-import com.ruoyi.common.core.constant.CacheConstants;
+import com.ruoyi.common.core.constant.GlobalConstants;
 import com.ruoyi.common.ratelimiter.enums.LimitType;
 
 import java.lang.annotation.*;
@@ -17,7 +17,7 @@
     /**
      * 闄愭祦key
      */
-    String key() default CacheConstants.RATE_LIMIT_KEY;
+    String key() default GlobalConstants.RATE_LIMIT_KEY;
 
     /**
      * 闄愭祦鏃堕棿,鍗曚綅绉�
diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/config/SaTokenConfig.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/config/SaTokenConfig.java
index f4fe28b..609e3ec 100644
--- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/config/SaTokenConfig.java
+++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/config/SaTokenConfig.java
@@ -1,8 +1,10 @@
 package com.ruoyi.common.satoken.config;
 
+import cn.dev33.satoken.dao.SaTokenDao;
 import cn.dev33.satoken.jwt.StpLogicJwtForSimple;
 import cn.dev33.satoken.stp.StpInterface;
 import cn.dev33.satoken.stp.StpLogic;
+import com.ruoyi.common.satoken.core.dao.PlusSaTokenDao;
 import com.ruoyi.common.satoken.core.service.SaPermissionImpl;
 import org.springframework.boot.autoconfigure.AutoConfiguration;
 import org.springframework.context.annotation.Bean;
@@ -30,4 +32,12 @@
         return new SaPermissionImpl();
     }
 
+    /**
+     * 鑷畾涔塪ao灞傚瓨鍌�
+     */
+    @Bean
+    public SaTokenDao saTokenDao() {
+        return new PlusSaTokenDao();
+    }
+
 }
diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/core/dao/PlusSaTokenDao.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/core/dao/PlusSaTokenDao.java
index 52dd903..aafa457 100644
--- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/core/dao/PlusSaTokenDao.java
+++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/core/dao/PlusSaTokenDao.java
@@ -3,7 +3,6 @@
 import cn.dev33.satoken.dao.SaTokenDao;
 import cn.dev33.satoken.util.SaFoxUtil;
 import com.ruoyi.common.redis.utils.RedisUtils;
-import org.springframework.stereotype.Component;
 
 import java.time.Duration;
 import java.util.ArrayList;
@@ -15,7 +14,6 @@
  *
  * @author Lion Li
  */
-@Component
 public class PlusSaTokenDao implements SaTokenDao {
 
     /**
diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/utils/LoginHelper.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/utils/LoginHelper.java
index f7fefa3..3bff1f2 100644
--- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/utils/LoginHelper.java
+++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/ruoyi/common/satoken/utils/LoginHelper.java
@@ -1,8 +1,11 @@
 package com.ruoyi.common.satoken.utils;
 
 import cn.dev33.satoken.context.SaHolder;
+import cn.dev33.satoken.stp.SaLoginModel;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.json.JSONObject;
+import com.ruoyi.common.core.constant.TenantConstants;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.core.enums.DeviceType;
@@ -11,6 +14,8 @@
 import com.ruoyi.common.core.utils.StringUtils;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
+
+import java.util.Set;
 
 /**
  * 鐧诲綍閴存潈鍔╂墜
@@ -37,8 +42,7 @@
      */
     public static void login(LoginUser loginUser) {
         SaHolder.getStorage().set(LOGIN_USER_KEY, loginUser);
-        StpUtil.login(loginUser.getLoginId());
-        setLoginUser(loginUser);
+        StpUtil.login(loginUser.getLoginId(), new SaLoginModel().setExtra(LOGIN_USER_KEY, loginUser));
     }
 
     /**
@@ -49,15 +53,9 @@
      */
     public static void loginByDevice(LoginUser loginUser, DeviceType deviceType) {
         SaHolder.getStorage().set(LOGIN_USER_KEY, loginUser);
-        StpUtil.login(loginUser.getLoginId(), deviceType.getDevice());
-        setLoginUser(loginUser);
-    }
-
-    /**
-     * 璁剧疆鐢ㄦ埛鏁版嵁(澶氱骇缂撳瓨)
-     */
-    public static void setLoginUser(LoginUser loginUser) {
-        StpUtil.getTokenSession().set(LOGIN_USER_KEY, loginUser);
+        StpUtil.login(loginUser.getLoginId(), new SaLoginModel()
+            .setDevice(deviceType.getDevice())
+            .setExtra(LOGIN_USER_KEY, loginUser));
     }
 
     /**
@@ -68,7 +66,7 @@
         if (loginUser != null) {
             return loginUser;
         }
-        loginUser = (LoginUser) StpUtil.getTokenSession().get(LOGIN_USER_KEY);
+        loginUser = ((JSONObject) StpUtil.getExtra(LOGIN_USER_KEY)).toBean(LoginUser.class);
         SaHolder.getStorage().set(LOGIN_USER_KEY, loginUser);
         return loginUser;
     }
@@ -97,6 +95,19 @@
     }
 
     /**
+     * 鑾峰彇绉熸埛ID
+     */
+    public static String getTenantId() {
+        LoginUser loginUser;
+        try {
+            loginUser = getLoginUser();
+        } catch (Exception e) {
+            return null;
+        }
+        return loginUser.getTenantId();
+    }
+
+    /**
      * 鑾峰彇閮ㄩ棬ID
      */
     public static Long getDeptId() {
@@ -119,17 +130,31 @@
     }
 
     /**
-     * 鏄惁涓虹鐞嗗憳
+     * 鏄惁涓鸿秴绾х鐞嗗憳
      *
      * @param userId 鐢ㄦ埛ID
      * @return 缁撴灉
      */
-    public static boolean isAdmin(Long userId) {
+    public static boolean isSuperAdmin(Long userId) {
         return UserConstants.SUPER_ADMIN_ID.equals(userId);
     }
 
-    public static boolean isAdmin() {
-        return isAdmin(getUserId());
+    public static boolean isSuperAdmin() {
+        return isSuperAdmin(getUserId());
+    }
+
+    /**
+     * 鏄惁涓鸿秴绾х鐞嗗憳
+     *
+     * @param rolePermission 瑙掕壊鏉冮檺鏍囪瘑缁�
+     * @return 缁撴灉
+     */
+    public static boolean isTenantAdmin(Set<String> rolePermission) {
+        return rolePermission.contains(TenantConstants.TENANT_ADMIN_ROLE_KEY);
+    }
+
+    public static boolean isTenantAdmin() {
+        return isTenantAdmin(getLoginUser().getRolePermission());
     }
 
 }
diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-common/ruoyi-common-satoken/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index 78e5b7e..d358acb 100644
--- a/ruoyi-common/ruoyi-common-satoken/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ b/ruoyi-common/ruoyi-common-satoken/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -1,2 +1 @@
-com.ruoyi.common.satoken.core.dao.PlusSaTokenDao
 com.ruoyi.common.satoken.config.SaTokenConfig
diff --git a/ruoyi-common/ruoyi-common-security/pom.xml b/ruoyi-common/ruoyi-common-security/pom.xml
index eaa3258..1cc554b 100644
--- a/ruoyi-common/ruoyi-common-security/pom.xml
+++ b/ruoyi-common/ruoyi-common-security/pom.xml
@@ -22,12 +22,6 @@
             <artifactId>ruoyi-common-satoken</artifactId>
         </dependency>
 
-        <!-- Sa-Token 鏉冮檺璁よ瘉, 鍦ㄧ嚎鏂囨。锛歨ttp://sa-token.dev33.cn/ -->
-        <dependency>
-            <groupId>cn.dev33</groupId>
-            <artifactId>sa-token-spring-boot3-starter</artifactId>
-            <version>${satoken.version}</version>
-        </dependency>
     </dependencies>
 
 </project>
diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/core/TencentSmsTemplate.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/core/TencentSmsTemplate.java
index a7be95a..8dbd1ad 100644
--- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/core/TencentSmsTemplate.java
+++ b/ruoyi-common/ruoyi-common-sms/src/main/java/com/ruoyi/common/sms/core/TencentSmsTemplate.java
@@ -53,7 +53,7 @@
             throw new SmsException("妯℃澘ID涓嶈兘涓虹┖");
         }
         SendSmsRequest req = new SendSmsRequest();
-        Set<String> set = Arrays.stream(phones.split(",")).map(p -> "+86" + p).collect(Collectors.toSet());
+        Set<String> set = Arrays.stream(phones.split(StringUtils.SEPARATOR)).map(p -> "+86" + p).collect(Collectors.toSet());
         req.setPhoneNumberSet(ArrayUtil.toArray(set, String.class));
         if (CollUtil.isNotEmpty(param)) {
             req.setTemplateParamSet(ArrayUtil.toArray(param.values(), String.class));
diff --git a/ruoyi-common/ruoyi-common-tenant/pom.xml b/ruoyi-common/ruoyi-common-tenant/pom.xml
new file mode 100644
index 0000000..5eeb86a
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>com.ruoyi</groupId>
+        <artifactId>ruoyi-common</artifactId>
+        <version>${revision}</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ruoyi-common-tenant</artifactId>
+
+    <description>
+        ruoyi-common-tenant 绉熸埛妯″潡
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-common-mybatis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-common-redis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>transmittable-thread-local</artifactId>
+        </dependency>
+
+    </dependencies>
+
+</project>
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/config/TenantConfig.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/config/TenantConfig.java
new file mode 100644
index 0000000..373e77c
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/config/TenantConfig.java
@@ -0,0 +1,100 @@
+package com.ruoyi.common.tenant.config;
+
+import cn.dev33.satoken.dao.SaTokenDao;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
+import com.ruoyi.common.core.utils.reflect.ReflectUtils;
+import com.ruoyi.common.mybatis.config.MybatisPlusConfig;
+import com.ruoyi.common.redis.config.RedisConfig;
+import com.ruoyi.common.redis.config.properties.RedissonProperties;
+import com.ruoyi.common.tenant.core.TenantSaTokenDao;
+import com.ruoyi.common.tenant.handle.PlusTenantLineHandler;
+import com.ruoyi.common.tenant.handle.TenantKeyPrefixHandler;
+import com.ruoyi.common.tenant.manager.TenantSpringCacheManager;
+import com.ruoyi.common.tenant.properties.TenantProperties;
+import org.redisson.config.ClusterServersConfig;
+import org.redisson.config.SingleServerConfig;
+import org.redisson.spring.starter.RedissonAutoConfigurationCustomizer;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cache.CacheManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Primary;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 绉熸埛閰嶇疆绫�
+ *
+ * @author Lion Li
+ */
+@EnableConfigurationProperties(TenantProperties.class)
+@AutoConfiguration(after = {RedisConfig.class, MybatisPlusConfig.class})
+@ConditionalOnProperty(value = "tenant.enable", havingValue = "true")
+public class TenantConfig {
+
+    /**
+     * 鍒濆鍖栫鎴烽厤缃�
+     */
+    @Bean
+    public boolean tenantInit(MybatisPlusInterceptor mybatisPlusInterceptor,
+                              TenantProperties tenantProperties) {
+        List<InnerInterceptor> interceptors = new ArrayList<>();
+        // 澶氱鎴锋彃浠� 蹇呴』鏀惧埌绗竴浣�
+        interceptors.add(tenantLineInnerInterceptor(tenantProperties));
+        interceptors.addAll(mybatisPlusInterceptor.getInterceptors());
+        mybatisPlusInterceptor.setInterceptors(interceptors);
+        return true;
+    }
+
+    /**
+     * 澶氱鎴锋彃浠�
+     */
+    public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties tenantProperties) {
+        return new TenantLineInnerInterceptor(new PlusTenantLineHandler(tenantProperties));
+    }
+
+    @Bean
+    public RedissonAutoConfigurationCustomizer tenantRedissonCustomizer(RedissonProperties redissonProperties) {
+        return config -> {
+            TenantKeyPrefixHandler nameMapper = new TenantKeyPrefixHandler(redissonProperties.getKeyPrefix());
+            SingleServerConfig singleServerConfig = ReflectUtils.invokeGetter(config, "singleServerConfig");
+            if (ObjectUtil.isNotNull(singleServerConfig)) {
+                // 浣跨敤鍗曟満妯″紡
+                // 璁剧疆澶氱鎴� redis key鍓嶇紑
+                singleServerConfig.setNameMapper(nameMapper);
+                ReflectUtils.invokeSetter(config, "singleServerConfig", singleServerConfig);
+            }
+            ClusterServersConfig clusterServersConfig = ReflectUtils.invokeGetter(config, "clusterServersConfig");
+            // 闆嗙兢閰嶇疆鏂瑰紡 鍙傝�冧笅鏂规敞閲�
+            if (ObjectUtil.isNotNull(clusterServersConfig)) {
+                // 璁剧疆澶氱鎴� redis key鍓嶇紑
+                clusterServersConfig.setNameMapper(nameMapper);
+                ReflectUtils.invokeSetter(config, "clusterServersConfig", clusterServersConfig);
+            }
+        };
+    }
+
+    /**
+     * 澶氱鎴风紦瀛樼鐞嗗櫒
+     */
+    @Primary
+    @Bean
+    public CacheManager tenantCacheManager() {
+        return new TenantSpringCacheManager();
+    }
+
+    /**
+     * 澶氱鎴烽壌鏉僤ao瀹炵幇
+     */
+    @Primary
+    @Bean
+    public SaTokenDao tenantSaTokenDao() {
+        return new TenantSaTokenDao();
+    }
+
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantEntity.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantEntity.java
new file mode 100644
index 0000000..2864ccd
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantEntity.java
@@ -0,0 +1,21 @@
+package com.ruoyi.common.tenant.core;
+
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 绉熸埛鍩虹被
+ *
+ * @author Michelle.Chung
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class TenantEntity extends BaseEntity {
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantSaTokenDao.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantSaTokenDao.java
new file mode 100644
index 0000000..db9c025
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/core/TenantSaTokenDao.java
@@ -0,0 +1,114 @@
+package com.ruoyi.common.tenant.core;
+
+import com.ruoyi.common.core.constant.GlobalConstants;
+import com.ruoyi.common.satoken.core.dao.PlusSaTokenDao;
+
+import java.util.List;
+
+/**
+ * SaToken 璁よ瘉鏁版嵁鎸佷箙灞� 閫傞厤澶氱鎴�
+ *
+ * @author Lion Li
+ */
+public class TenantSaTokenDao extends PlusSaTokenDao {
+
+    @Override
+    public String get(String key) {
+        return super.get(GlobalConstants.GLOBAL_REDIS_KEY + key);
+    }
+
+    @Override
+    public void set(String key, String value, long timeout) {
+        super.set(GlobalConstants.GLOBAL_REDIS_KEY + key, value, timeout);
+    }
+
+    /**
+     * 淇慨鏀规寚瀹歬ey-value閿�煎 (杩囨湡鏃堕棿涓嶅彉)
+     */
+    @Override
+    public void update(String key, String value) {
+        super.update(GlobalConstants.GLOBAL_REDIS_KEY + key, value);
+    }
+
+    /**
+     * 鍒犻櫎Value
+     */
+    @Override
+    public void delete(String key) {
+        super.delete(GlobalConstants.GLOBAL_REDIS_KEY + key);
+    }
+
+    /**
+     * 鑾峰彇Value鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�)
+     */
+    @Override
+    public long getTimeout(String key) {
+        return super.getTimeout(GlobalConstants.GLOBAL_REDIS_KEY + key);
+    }
+
+    /**
+     * 淇敼Value鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�)
+     */
+    @Override
+    public void updateTimeout(String key, long timeout) {
+        super.updateTimeout(GlobalConstants.GLOBAL_REDIS_KEY + key, timeout);
+    }
+
+
+    /**
+     * 鑾峰彇Object锛屽鏃犺繑绌�
+     */
+    @Override
+    public Object getObject(String key) {
+        return super.getObject(GlobalConstants.GLOBAL_REDIS_KEY + key);
+    }
+
+    /**
+     * 鍐欏叆Object锛屽苟璁惧畾瀛樻椿鏃堕棿 (鍗曚綅: 绉�)
+     */
+    @Override
+    public void setObject(String key, Object object, long timeout) {
+        super.setObject(GlobalConstants.GLOBAL_REDIS_KEY + key, object, timeout);
+    }
+
+    /**
+     * 鏇存柊Object (杩囨湡鏃堕棿涓嶅彉)
+     */
+    @Override
+    public void updateObject(String key, Object object) {
+        super.updateObject(GlobalConstants.GLOBAL_REDIS_KEY + key, object);
+    }
+
+    /**
+     * 鍒犻櫎Object
+     */
+    @Override
+    public void deleteObject(String key) {
+        super.deleteObject(GlobalConstants.GLOBAL_REDIS_KEY + key);
+    }
+
+    /**
+     * 鑾峰彇Object鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�)
+     */
+    @Override
+    public long getObjectTimeout(String key) {
+        return super.getObjectTimeout(GlobalConstants.GLOBAL_REDIS_KEY + key);
+    }
+
+    /**
+     * 淇敼Object鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�)
+     */
+    @Override
+    public void updateObjectTimeout(String key, long timeout) {
+        super.updateObjectTimeout(GlobalConstants.GLOBAL_REDIS_KEY + key, timeout);
+    }
+
+
+    /**
+     * 鎼滅储鏁版嵁
+     */
+    @Override
+    public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType) {
+        return super.searchData(GlobalConstants.GLOBAL_REDIS_KEY + prefix, keyword, start, size, sortType);
+    }
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/exception/TenantException.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/exception/TenantException.java
new file mode 100644
index 0000000..371bc12
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/exception/TenantException.java
@@ -0,0 +1,20 @@
+package com.ruoyi.common.tenant.exception;
+
+import com.ruoyi.common.core.exception.base.BaseException;
+
+import java.io.Serial;
+
+/**
+ * 绉熸埛寮傚父绫�
+ *
+ * @author Lion Li
+ */
+public class TenantException extends BaseException {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    public TenantException(String code, Object... args) {
+        super("tenant", code, args, null);
+    }
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/PlusTenantLineHandler.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/PlusTenantLineHandler.java
new file mode 100644
index 0000000..0133adb
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/PlusTenantLineHandler.java
@@ -0,0 +1,57 @@
+package com.ruoyi.common.tenant.handle;
+
+import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.satoken.utils.LoginHelper;
+import com.ruoyi.common.tenant.helper.TenantHelper;
+import com.ruoyi.common.tenant.properties.TenantProperties;
+import lombok.AllArgsConstructor;
+import net.sf.jsqlparser.expression.Expression;
+import net.sf.jsqlparser.expression.LongValue;
+import net.sf.jsqlparser.expression.NullValue;
+
+import java.util.List;
+
+/**
+ * 鑷畾涔夌鎴峰鐞嗗櫒
+ *
+ * @author Lion Li
+ */
+@AllArgsConstructor
+public class PlusTenantLineHandler implements TenantLineHandler {
+
+    private final TenantProperties tenantProperties;
+
+    @Override
+    public Expression getTenantId() {
+        String tenantId = LoginHelper.getTenantId();
+        if (StringUtils.isBlank(tenantId)) {
+            return new NullValue();
+        }
+        String dynamicTenantId = TenantHelper.getDynamic();
+        if (StringUtils.isNotBlank(dynamicTenantId)) {
+            // 杩斿洖鍔ㄦ�佺鎴�
+            return new LongValue(dynamicTenantId);
+        }
+        // 杩斿洖鍥哄畾绉熸埛
+        return new LongValue(tenantId);
+    }
+
+    @Override
+    public boolean ignoreTable(String tableName) {
+        String tenantId = LoginHelper.getTenantId();
+        // 鍒ゆ柇鏄惁鏈夌鎴�
+        if (StringUtils.isNotBlank(tenantId)) {
+            // 涓嶉渶瑕佽繃婊ょ鎴风殑琛�
+            List<String> excludes = tenantProperties.getExcludes();
+            // 闈炰笟鍔¤〃
+            excludes.addAll(List.of(
+                    "gen_table",
+                    "gen_table_column"
+            ));
+            return excludes.contains(tableName);
+        }
+        return true;
+    }
+
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/TenantKeyPrefixHandler.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/TenantKeyPrefixHandler.java
new file mode 100644
index 0000000..729702d
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/handle/TenantKeyPrefixHandler.java
@@ -0,0 +1,58 @@
+package com.ruoyi.common.tenant.handle;
+
+import com.ruoyi.common.core.constant.GlobalConstants;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.redis.handler.KeyPrefixHandler;
+import com.ruoyi.common.tenant.helper.TenantHelper;
+
+/**
+ * 澶氱鎴穜edis缂撳瓨key鍓嶇紑澶勭悊
+ *
+ * @author Lion Li
+ */
+public class TenantKeyPrefixHandler extends KeyPrefixHandler {
+
+    public TenantKeyPrefixHandler(String keyPrefix) {
+        super(keyPrefix);
+    }
+
+    /**
+     * 澧炲姞鍓嶇紑
+     */
+    @Override
+    public String map(String name) {
+        if (StringUtils.isBlank(name)) {
+            return null;
+        }
+        if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) {
+            return super.map(name);
+        }
+        String tenantId = TenantHelper.getTenantId();
+        if (StringUtils.startsWith(name, tenantId)) {
+            // 濡傛灉瀛樺湪鍒欑洿鎺ヨ繑鍥�
+            return super.map(name);
+        }
+        return super.map(tenantId + ":" + name);
+    }
+
+    /**
+     * 鍘婚櫎鍓嶇紑
+     */
+    @Override
+    public String unmap(String name) {
+        String unmap = super.unmap(name);
+        if (StringUtils.isBlank(unmap)) {
+            return null;
+        }
+        if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) {
+            return super.unmap(name);
+        }
+        String tenantId = TenantHelper.getTenantId();
+        if (StringUtils.startsWith(unmap, tenantId)) {
+            // 濡傛灉瀛樺湪鍒欏垹闄�
+            return unmap.substring((tenantId + ":").length());
+        }
+        return unmap;
+    }
+
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java
new file mode 100644
index 0000000..f9815be
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/helper/TenantHelper.java
@@ -0,0 +1,112 @@
+package com.ruoyi.common.tenant.helper;
+
+import cn.dev33.satoken.context.SaHolder;
+import cn.dev33.satoken.spring.SpringMVCUtil;
+import com.alibaba.ttl.TransmittableThreadLocal;
+import com.baomidou.mybatisplus.core.plugins.IgnoreStrategy;
+import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper;
+import com.ruoyi.common.core.constant.GlobalConstants;
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.redis.utils.RedisUtils;
+import com.ruoyi.common.satoken.utils.LoginHelper;
+import com.ruoyi.common.tenant.properties.TenantProperties;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * 绉熸埛鍔╂墜
+ *
+ * @author Lion Li
+ */
+@Slf4j
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public class TenantHelper {
+
+    private static final TenantProperties PROPERTIES = SpringUtils.getBean(TenantProperties.class);
+
+    private static final String DYNAMIC_TENANT_KEY = GlobalConstants.GLOBAL_REDIS_KEY + "dynamicTenant";
+
+    private static final ThreadLocal<String> TEMP_DYNAMIC_TENANT = new TransmittableThreadLocal<>();
+
+    /**
+     * 绉熸埛鍔熻兘鏄惁鍚敤
+     */
+    public static boolean isEnable() {
+        return PROPERTIES.getEnable();
+    }
+
+    /**
+     * 寮�鍚拷鐣ョ鎴�(寮�鍚悗闇�鎵嬪姩璋冪敤 {@link #disableIgnore()} 鍏抽棴)
+     */
+    public static void enableIgnore() {
+        InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().tenantLine(true).build());
+    }
+
+    /**
+     * 鍏抽棴蹇界暐绉熸埛
+     */
+    public static void disableIgnore() {
+        InterceptorIgnoreHelper.clearIgnoreStrategy();
+    }
+
+    /**
+     * 璁剧疆鍔ㄦ�佺鎴�(涓�鐩存湁鏁� 闇�瑕佹墜鍔ㄦ竻鐞�)
+     * <p>
+     * 濡傛灉涓洪潪web鐜 閭d箞鍙湪褰撳墠绾跨▼鍐呯敓鏁�
+     */
+    public static void setDynamic(String tenantId) {
+        if (!SpringMVCUtil.isWeb()) {
+            TEMP_DYNAMIC_TENANT.set(tenantId);
+            return;
+        }
+        String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getTenantId();
+        RedisUtils.setCacheObject(cacheKey, tenantId);
+        SaHolder.getStorage().set(cacheKey, tenantId);
+    }
+
+    /**
+     * 鑾峰彇鍔ㄦ�佺鎴�(涓�鐩存湁鏁� 闇�瑕佹墜鍔ㄦ竻鐞�)
+     * <p>
+     * 濡傛灉涓洪潪web鐜 閭d箞鍙湪褰撳墠绾跨▼鍐呯敓鏁�
+     */
+    public static String getDynamic() {
+        if (!SpringMVCUtil.isWeb()) {
+            return TEMP_DYNAMIC_TENANT.get();
+        }
+        String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getTenantId();
+        String tenantId = (String) SaHolder.getStorage().get(cacheKey);
+        if (StringUtils.isNotBlank(tenantId)) {
+            return tenantId;
+        }
+        tenantId = RedisUtils.getCacheObject(cacheKey);
+        SaHolder.getStorage().set(cacheKey, tenantId);
+        return tenantId;
+    }
+
+    /**
+     * 娓呴櫎鍔ㄦ�佺鎴�
+     */
+    public static void clearDynamic() {
+        if (!SpringMVCUtil.isWeb()) {
+            TEMP_DYNAMIC_TENANT.remove();
+            return;
+        }
+        String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getTenantId();
+        RedisUtils.deleteObject(cacheKey);
+        SaHolder.getStorage().delete(cacheKey);
+    }
+
+    /**
+     * 鑾峰彇褰撳墠绉熸埛id(鍔ㄦ�佺鎴蜂紭鍏�)
+     */
+    public static String getTenantId() {
+        String tenantId = TenantHelper.getDynamic();
+        if (StringUtils.isBlank(tenantId)) {
+            tenantId = LoginHelper.getTenantId();
+        }
+        return tenantId;
+    }
+
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/manager/TenantSpringCacheManager.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/manager/TenantSpringCacheManager.java
new file mode 100644
index 0000000..83402b7
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/manager/TenantSpringCacheManager.java
@@ -0,0 +1,32 @@
+package com.ruoyi.common.tenant.manager;
+
+import com.ruoyi.common.core.constant.GlobalConstants;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.redis.manager.PlusSpringCacheManager;
+import com.ruoyi.common.tenant.helper.TenantHelper;
+import org.springframework.cache.Cache;
+
+/**
+ * 閲嶅啓 cacheName 澶勭悊鏂规硶 鏀寔澶氱鎴�
+ *
+ * @author Lion Li
+ */
+public class TenantSpringCacheManager extends PlusSpringCacheManager {
+
+    public TenantSpringCacheManager() {
+    }
+
+    @Override
+    public Cache getCache(String name) {
+        if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) {
+            return super.getCache(name);
+        }
+        String tenantId = TenantHelper.getTenantId();
+        if (StringUtils.startsWith(name, tenantId)) {
+            // 濡傛灉瀛樺湪鍒欑洿鎺ヨ繑鍥�
+            return super.getCache(name);
+        }
+        return super.getCache(tenantId + ":" + name);
+    }
+
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/properties/TenantProperties.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/properties/TenantProperties.java
new file mode 100644
index 0000000..473ea77
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/ruoyi/common/tenant/properties/TenantProperties.java
@@ -0,0 +1,27 @@
+package com.ruoyi.common.tenant.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+import java.util.List;
+
+/**
+ * 绉熸埛 閰嶇疆灞炴��
+ *
+ * @author Lion Li
+ */
+@Data
+@ConfigurationProperties(prefix = "tenant")
+public class TenantProperties {
+
+    /**
+     * 鏄惁鍚敤
+     */
+    private Boolean enable;
+
+    /**
+     * 鎺掗櫎琛�
+     */
+    private List<String> excludes;
+
+}
diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-common/ruoyi-common-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000..8f39d11
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-tenant/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+com.ruoyi.common.tenant.config.TenantConfig
diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/FilterConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/FilterConfig.java
index 098ad81..7444f73 100644
--- a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/FilterConfig.java
+++ b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/FilterConfig.java
@@ -30,7 +30,7 @@
         FilterRegistrationBean registration = new FilterRegistrationBean();
         registration.setDispatcherTypes(DispatcherType.REQUEST);
         registration.setFilter(new XssFilter());
-        registration.addUrlPatterns(StringUtils.split(xssProperties.getUrlPatterns(), ","));
+        registration.addUrlPatterns(StringUtils.split(xssProperties.getUrlPatterns(), StringUtils.SEPARATOR));
         registration.setName("xssFilter");
         registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE);
         Map<String, String> initParameters = new HashMap<>();
diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/properties/CaptchaProperties.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/properties/CaptchaProperties.java
index 9bebbd9..e4b8e15 100644
--- a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/properties/CaptchaProperties.java
+++ b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/config/properties/CaptchaProperties.java
@@ -14,6 +14,8 @@
 @ConfigurationProperties(prefix = "captcha")
 public class CaptchaProperties {
 
+    private Boolean enable;
+
     /**
      * 楠岃瘉鐮佺被鍨�
      */
diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/filter/XssFilter.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/filter/XssFilter.java
index a11660f..5ae7e7d 100644
--- a/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/filter/XssFilter.java
+++ b/ruoyi-common/ruoyi-common-web/src/main/java/com/ruoyi/common/web/filter/XssFilter.java
@@ -25,7 +25,7 @@
     public void init(FilterConfig filterConfig) throws ServletException {
         String tempExcludes = filterConfig.getInitParameter("excludes");
         if (StringUtils.isNotEmpty(tempExcludes)) {
-            String[] url = tempExcludes.split(",");
+            String[] url = tempExcludes.split(StringUtils.SEPARATOR);
             for (int i = 0; url != null && i < url.length; i++) {
                 excludes.add(url[i]);
             }
diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java
index d16fe9d..3747b61 100644
--- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java
+++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestDemoController.java
@@ -45,7 +45,7 @@
 @RequestMapping("/demo/demo")
 public class TestDemoController extends BaseController {
 
-    private final ITestDemoService iTestDemoService;
+    private final ITestDemoService testDemoService;
 
     /**
      * 鏌ヨ娴嬭瘯鍗曡〃鍒楄〃
@@ -53,7 +53,7 @@
     @SaCheckPermission("demo:demo:list")
     @GetMapping("/list")
     public TableDataInfo<TestDemoVo> list(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) {
-        return iTestDemoService.queryPageList(bo, pageQuery);
+        return testDemoService.queryPageList(bo, pageQuery);
     }
 
     /**
@@ -62,7 +62,7 @@
     @SaCheckPermission("demo:demo:list")
     @GetMapping("/page")
     public TableDataInfo<TestDemoVo> page(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) {
-        return iTestDemoService.customPageList(bo, pageQuery);
+        return testDemoService.customPageList(bo, pageQuery);
     }
 
     /**
@@ -77,7 +77,7 @@
         ExcelResult<TestDemoImportVo> excelResult = ExcelUtil.importExcel(file.getInputStream(), TestDemoImportVo.class, true);
         List<TestDemoImportVo> volist = excelResult.getList();
         List<TestDemo> list = BeanUtil.copyToList(volist, TestDemo.class);
-        iTestDemoService.saveBatch(list);
+        testDemoService.saveBatch(list);
         return R.ok(excelResult.getAnalysis());
     }
 
@@ -88,7 +88,7 @@
     @Log(title = "娴嬭瘯鍗曡〃", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(@Validated TestDemoBo bo, HttpServletResponse response) {
-        List<TestDemoVo> list = iTestDemoService.queryList(bo);
+        List<TestDemoVo> list = testDemoService.queryList(bo);
         // 娴嬭瘯闆姳id瀵煎嚭
 //        for (TestDemoVo vo : list) {
 //            vo.setId(1234567891234567893L);
@@ -105,7 +105,7 @@
     @GetMapping("/{id}")
     public R<TestDemoVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖")
                                  @PathVariable("id") Long id) {
-        return R.ok(iTestDemoService.queryById(id));
+        return R.ok(testDemoService.queryById(id));
     }
 
     /**
@@ -119,7 +119,7 @@
         // 浣跨敤鏍¢獙宸ュ叿瀵规爣 @Validated(AddGroup.class) 娉ㄨВ
         // 鐢ㄤ簬鍦ㄩ潪 Controller 鐨勫湴鏂规牎楠屽璞�
         ValidatorUtils.validate(bo, AddGroup.class);
-        return toAjax(iTestDemoService.insertByBo(bo));
+        return toAjax(testDemoService.insertByBo(bo));
     }
 
     /**
@@ -130,7 +130,7 @@
     @RepeatSubmit
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestDemoBo bo) {
-        return toAjax(iTestDemoService.updateByBo(bo));
+        return toAjax(testDemoService.updateByBo(bo));
     }
 
     /**
@@ -143,6 +143,6 @@
     @DeleteMapping("/{ids}")
     public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
                           @PathVariable Long[] ids) {
-        return toAjax(iTestDemoService.deleteWithValidByIds(Arrays.asList(ids), true));
+        return toAjax(testDemoService.deleteWithValidByIds(Arrays.asList(ids), true));
     }
 }
diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java
index ec8821c..51a680d 100644
--- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java
+++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/TestTreeController.java
@@ -35,7 +35,7 @@
 @RequestMapping("/demo/tree")
 public class TestTreeController extends BaseController {
 
-    private final ITestTreeService iTestTreeService;
+    private final ITestTreeService testTreeService;
 
     /**
      * 鏌ヨ娴嬭瘯鏍戣〃鍒楄〃
@@ -43,7 +43,7 @@
     @SaCheckPermission("demo:tree:list")
     @GetMapping("/list")
     public R<List<TestTreeVo>> list(@Validated(QueryGroup.class) TestTreeBo bo) {
-        List<TestTreeVo> list = iTestTreeService.queryList(bo);
+        List<TestTreeVo> list = testTreeService.queryList(bo);
         return R.ok(list);
     }
 
@@ -54,7 +54,7 @@
     @Log(title = "娴嬭瘯鏍戣〃", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public void export(@Validated TestTreeBo bo, HttpServletResponse response) {
-        List<TestTreeVo> list = iTestTreeService.queryList(bo);
+        List<TestTreeVo> list = testTreeService.queryList(bo);
         ExcelUtil.exportExcel(list, "娴嬭瘯鏍戣〃", TestTreeVo.class, response);
     }
 
@@ -67,7 +67,7 @@
     @GetMapping("/{id}")
     public R<TestTreeVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖")
                                  @PathVariable("id") Long id) {
-        return R.ok(iTestTreeService.queryById(id));
+        return R.ok(testTreeService.queryById(id));
     }
 
     /**
@@ -78,7 +78,7 @@
     @RepeatSubmit
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody TestTreeBo bo) {
-        return toAjax(iTestTreeService.insertByBo(bo));
+        return toAjax(testTreeService.insertByBo(bo));
     }
 
     /**
@@ -89,7 +89,7 @@
     @RepeatSubmit
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestTreeBo bo) {
-        return toAjax(iTestTreeService.updateByBo(bo));
+        return toAjax(testTreeService.updateByBo(bo));
     }
 
     /**
@@ -102,6 +102,6 @@
     @DeleteMapping("/{ids}")
     public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
                           @PathVariable Long[] ids) {
-        return toAjax(iTestTreeService.deleteWithValidByIds(Arrays.asList(ids), true));
+        return toAjax(testTreeService.deleteWithValidByIds(Arrays.asList(ids), true));
     }
 }
diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java
index 0567002..14f1355 100644
--- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java
+++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/TestTree.java
@@ -4,7 +4,7 @@
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.Version;
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -19,7 +19,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("test_tree")
-public class TestTree extends TreeEntity<TestTree> {
+public class TestTree extends BaseEntity {
 
     @Serial
     private static final long serialVersionUID = 1L;
@@ -31,6 +31,11 @@
     private Long id;
 
     /**
+     * 鐖禝D
+     */
+    private Long parentId;
+
+    /**
      * 閮ㄩ棬id
      */
     private Long deptId;
diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java
index 7e6daab..8251b5b 100644
--- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java
+++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/bo/TestTreeBo.java
@@ -2,12 +2,11 @@
 
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
 
 /**
  * 娴嬭瘯鏍戣〃涓氬姟瀵硅薄 test_tree
@@ -18,7 +17,7 @@
 
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class TestTreeBo extends TreeEntity<TestTreeBo> {
+public class TestTreeBo extends BaseEntity {
 
     /**
      * 涓婚敭
@@ -27,6 +26,11 @@
     private Long id;
 
     /**
+     * 鐖禝D
+     */
+    private Long parentId;
+
+    /**
      * 閮ㄩ棬id
      */
     @NotNull(message = "閮ㄩ棬id涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class})
diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/constant/GenConstants.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/constant/GenConstants.java
index f2c59c9..eb0d12f 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/constant/GenConstants.java
+++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/constant/GenConstants.java
@@ -69,35 +69,30 @@
      * BO瀵硅薄 涓嶉渶瑕佹坊鍔犲瓧娈�
      */
     String[] COLUMNNAME_NOT_ADD = {"create_dept", "create_by", "create_time", "del_flag", "update_by",
-        "update_time", "version"};
+        "update_time", "version", "tenant_id"};
 
     /**
      * BO瀵硅薄 涓嶉渶瑕佺紪杈戝瓧娈�
      */
     String[] COLUMNNAME_NOT_EDIT = {"create_dept", "create_by", "create_time", "del_flag", "update_by",
-        "update_time", "version"};
+        "update_time", "version", "tenant_id"};
 
     /**
      * VO瀵硅薄 涓嶉渶瑕佽繑鍥炲瓧娈�
      */
     String[] COLUMNNAME_NOT_LIST = {"create_dept", "create_by", "create_time", "del_flag", "update_by",
-        "update_time", "version"};
+        "update_time", "version", "tenant_id"};
 
     /**
      * BO瀵硅薄 涓嶉渶瑕佹煡璇㈠瓧娈�
      */
     String[] COLUMNNAME_NOT_QUERY = {"id", "create_dept", "create_by", "create_time", "del_flag", "update_by",
-        "update_time", "remark", "version"};
+        "update_time", "remark", "version", "tenant_id"};
 
     /**
      * Entity鍩虹被瀛楁
      */
-    String[] BASE_ENTITY = {"createDept", "createBy", "createTime", "updateBy", "updateTime"};
-
-    /**
-     * Tree鍩虹被瀛楁
-     */
-    String[] TREE_ENTITY = {"parentName", "parentId", "children"};
+    String[] BASE_ENTITY = {"createDept", "createBy", "createTime", "updateBy", "updateTime", "tenantId"};
 
     /**
      * 鏂囨湰妗�
diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java
index dec9c8b..ed1ea1a 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java
+++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java
@@ -1,14 +1,16 @@
 package com.ruoyi.generator.domain;
 
-import com.baomidou.mybatisplus.annotation.*;
-import com.ruoyi.generator.constant.GenConstants;
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.generator.constant.GenConstants;
 import jakarta.validation.Valid;
 import jakarta.validation.constraints.NotBlank;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.apache.commons.lang3.ArrayUtils;
 
 import java.util.List;
 
@@ -183,10 +185,6 @@
     }
 
     public static boolean isSuperColumn(String tplCategory, String javaField) {
-        if (isTree(tplCategory)) {
-            return StringUtils.equalsAnyIgnoreCase(javaField,
-                ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY));
-        }
         return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY);
     }
 }
diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java
index 5a4c3cf..f374bf9 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java
+++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java
@@ -212,7 +212,7 @@
                 if (StringUtils.isNotEmpty(value)) {
                     Object startStr = value.subSequence(0, 1);
                     String endStr = value.substring(1);
-                    sb.append("").append(startStr).append("=").append(endStr).append(",");
+                    sb.append(StringUtils.EMPTY).append(startStr).append("=").append(endStr).append(StringUtils.SEPARATOR);
                 }
             }
             return sb.deleteCharAt(sb.length() - 1).toString();
diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
index 77275ef..5a9286f 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
+++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
@@ -59,7 +59,7 @@
             column.setHtmlType(GenConstants.HTML_INPUT);
 
             // 濡傛灉鏄诞鐐瑰瀷 缁熶竴鐢˙igDecimal
-            String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ",");
+            String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), StringUtils.SEPARATOR);
             if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) {
                 column.setJavaType(GenConstants.TYPE_BIGDECIMAL);
             }
@@ -168,7 +168,7 @@
         boolean autoRemovePre = GenConfig.getAutoRemovePre();
         String tablePrefix = GenConfig.getTablePrefix();
         if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) {
-            String[] searchList = StringUtils.split(tablePrefix, ",");
+            String[] searchList = StringUtils.split(tablePrefix, StringUtils.SEPARATOR);
             tableName = replaceFirst(tableName, searchList);
         }
         return StringUtils.convertToCamelCase(tableName);
diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
index 7b3cd01..b1557fc 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
+++ b/ruoyi-modules/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java
@@ -225,7 +225,7 @@
      */
     public static String getDicts(GenTable genTable) {
         List<GenTableColumn> columns = genTable.getColumns();
-        Set<String> dicts = new HashSet<String>();
+        Set<String> dicts = new HashSet<>();
         addDicts(dicts, columns);
         return StringUtils.join(dicts, ", ");
     }
diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm
index 1989e06..e235202 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm
+++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm
@@ -1,21 +1,16 @@
 package ${packageName}.domain.bo;
 
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import jakarta.validation.constraints.*;
-
-import java.util.Date;
-
 #foreach ($import in $importList)
 import ${import};
 #end
-#if($table.crud || $table.sub)
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
-#elseif($table.tree)
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
-#end
+
+import java.util.Date;
 
 /**
  * ${functionName}涓氬姟瀵硅薄 ${tableName}
@@ -23,15 +18,9 @@
  * @author ${author}
  * @date ${datetime}
  */
-#if($table.crud || $table.sub)
-#set($Entity="BaseEntity")
-#elseif($table.tree)
-#set($Entity="TreeEntity<${ClassName}Bo>")
-#end
-
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class ${ClassName}Bo extends ${Entity} {
+public class ${ClassName}Bo extends BaseEntity {
 
 #foreach ($column in $columns)
 #if(!$table.isSuperColumn($column.javaField) && ($column.query || $column.isInsert || $column.isEdit))
diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm
index ee6fdd2..761284f 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm
+++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm
@@ -39,7 +39,7 @@
 @RequestMapping("/${moduleName}/${businessName}")
 public class ${ClassName}Controller extends BaseController {
 
-    private final I${ClassName}Service i${ClassName}Service;
+    private final I${ClassName}Service ${className}Service;
 
     /**
      * 鏌ヨ${functionName}鍒楄〃
@@ -52,7 +52,7 @@
     }
 #elseif($table.tree)
     public R<List<${ClassName}Vo>> list(${ClassName}Bo bo) {
-        List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo);
+        List<${ClassName}Vo> list = ${className}Service.queryList(bo);
         return R.ok(list);
     }
 #end
@@ -64,7 +64,7 @@
     @Log(title = "${functionName}", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(${ClassName}Bo bo, HttpServletResponse response) {
-        List<${ClassName}Vo> list = i${ClassName}Service.queryList(bo);
+        List<${ClassName}Vo> list = ${className}Service.queryList(bo);
         ExcelUtil.exportExcel(list, "${functionName}", ${ClassName}Vo.class, response);
     }
 
@@ -77,7 +77,7 @@
     @GetMapping("/{${pkColumn.javaField}}")
     public R<${ClassName}Vo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖")
                                      @PathVariable ${pkColumn.javaType} ${pkColumn.javaField}) {
-        return R.ok(i${ClassName}Service.queryById(${pkColumn.javaField}));
+        return R.ok(${className}Service.queryById(${pkColumn.javaField}));
     }
 
     /**
@@ -88,7 +88,7 @@
     @RepeatSubmit()
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody ${ClassName}Bo bo) {
-        return toAjax(i${ClassName}Service.insertByBo(bo));
+        return toAjax(${className}Service.insertByBo(bo));
     }
 
     /**
@@ -99,7 +99,7 @@
     @RepeatSubmit()
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody ${ClassName}Bo bo) {
-        return toAjax(i${ClassName}Service.updateByBo(bo));
+        return toAjax(${className}Service.updateByBo(bo));
     }
 
     /**
@@ -112,6 +112,6 @@
     @DeleteMapping("/{${pkColumn.javaField}s}")
     public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
                           @PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) {
-        return toAjax(i${ClassName}Service.deleteWithValidByIds(List.of(${pkColumn.javaField}s), true));
+        return toAjax(${className}Service.deleteWithValidByIds(List.of(${pkColumn.javaField}s), true));
     }
 }
diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
index 6e0f6a2..f176ecd 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
+++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm
@@ -1,21 +1,25 @@
 package ${packageName}.domain;
 
+#foreach ($column in $columns)
+#if($column.javaField=='tenantId')
+#set($IsTenant=1)
+#end
+#end
+#if($IsTenant==1)
+import com.ruoyi.common.tenant.core.TenantEntity;
+#else
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+#end
 import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import java.io.Serial;
-import java.io.Serializable;
-import java.util.Date;
-import java.math.BigDecimal;
-
 #foreach ($import in $importList)
 import ${import};
 #end
-#if($table.crud || $table.sub)
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
-#elseif($table.tree)
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
-#end
+
+import java.io.Serial;
+import java.util.Date;
+import java.math.BigDecimal;
 
 /**
  * ${functionName}瀵硅薄 ${tableName}
@@ -23,10 +27,10 @@
  * @author ${author}
  * @date ${datetime}
  */
-#if($table.crud || $table.sub)
-    #set($Entity="BaseEntity")
-#elseif($table.tree)
-    #set($Entity="TreeEntity<${ClassName}>")
+#if($IsTenant==1)
+#set($Entity="TenantEntity")
+#else
+#set($Entity="BaseEntity")
 #end
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -51,6 +55,7 @@
     @TableId(value = "$column.columnName")
 #end
     private $column.javaType $column.javaField;
+
 #end
 #end
 
diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
index 2bc699a..1dcf0b9 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm
@@ -333,6 +333,7 @@
       // 琛ㄥ崟鏍¢獙
       rules: {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.required)
 #set($parentheseIndex=$column.columnComment.indexOf("锛�"))
 #if($parentheseIndex != -1)
@@ -343,6 +344,7 @@
         $column.javaField: [
           { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
         ]#if($foreach.count != $columns.size()),#end
+#end
 #end
 #end
       }
@@ -404,12 +406,14 @@
     reset() {
       this.form = {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.htmlType == "checkbox")
         $column.javaField: []#if($foreach.count != $columns.size()),#end
 #else
         $column.javaField: null#if($foreach.count != $columns.size()),#end
 #end
 #end
+#end
       };
       this.resetForm("form");
     },
diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
index 9f0131b..3e7628e 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
+++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
@@ -343,6 +343,7 @@
       // 琛ㄥ崟鏍¢獙
       rules: {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.required)
 #set($parentheseIndex=$column.columnComment.indexOf("锛�"))
 #if($parentheseIndex != -1)
@@ -353,6 +354,7 @@
         $column.javaField: [
           { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
         ]#if($foreach.count != $columns.size()),#end
+#end
 #end
 #end
       }
@@ -395,12 +397,14 @@
     reset() {
       this.form = {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.htmlType == "checkbox")
         $column.javaField: []#if($foreach.count != $columns.size()),#end
 #else
         $column.javaField: undefined#if($foreach.count != $columns.size()),#end
 #end
 #end
+#end
       };
       this.resetForm("form");
     },
diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm
index 663893a..31091a3 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm
+++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index-tree.vue.vm
@@ -304,6 +304,7 @@
   },
   rules: {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.required)
 #set($parentheseIndex=$column.columnComment.indexOf("锛�"))
 #if($parentheseIndex != -1)
@@ -314,6 +315,7 @@
     $column.javaField: [
       { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
     ]#if($foreach.count != $columns.size()),#end
+#end
 #end
 #end
   }
@@ -365,12 +367,14 @@
 function reset() {
   form.value = {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.htmlType == "checkbox")
     $column.javaField: []#if($foreach.count != $columns.size()),#end
 #else
     $column.javaField: null#if($foreach.count != $columns.size()),#end
 #end
 #end
+#end
   };
   proxy.resetForm("${businessName}Ref");
 }
diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm
index e623295..2a2deb4 100644
--- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm
+++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/v3/index.vue.vm
@@ -315,6 +315,7 @@
   },
   rules: {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.required)
 #set($parentheseIndex=$column.columnComment.indexOf("锛�"))
 #if($parentheseIndex != -1)
@@ -325,6 +326,7 @@
     $column.javaField: [
       { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
     ]#if($foreach.count != $columns.size()),#end
+#end
 #end
 #end
   }
@@ -367,12 +369,14 @@
 function reset() {
   form.value = {
 #foreach ($column in $columns)
+#if($column.isInsert || $column.isEdit)
 #if($column.htmlType == "checkbox")
     $column.javaField: []#if($foreach.count != $columns.size()),#end
 #else
     $column.javaField: null#if($foreach.count != $columns.size()),#end
 #end
 #end
+#end
   };
   proxy.resetForm("${businessName}Ref");
 }
diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml
index 7f3572b..be1c3ce 100644
--- a/ruoyi-modules/ruoyi-system/pom.xml
+++ b/ruoyi-modules/ruoyi-system/pom.xml
@@ -63,7 +63,7 @@
 
         <dependency>
             <groupId>com.ruoyi</groupId>
-            <artifactId>ruoyi-common-satoken</artifactId>
+            <artifactId>ruoyi-common-tenant</artifactId>
         </dependency>
 
         <dependency>
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/CacheController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/CacheController.java
deleted file mode 100644
index 03fc761..0000000
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/CacheController.java
+++ /dev/null
@@ -1,168 +0,0 @@
-package com.ruoyi.system.controller.monitor;
-
-import cn.dev33.satoken.annotation.SaCheckPermission;
-import cn.hutool.core.collection.CollUtil;
-import com.ruoyi.common.core.constant.CacheConstants;
-import com.ruoyi.common.core.constant.CacheNames;
-import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.utils.StreamUtils;
-import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.json.utils.JsonUtils;
-import com.ruoyi.common.redis.utils.CacheUtils;
-import com.ruoyi.common.redis.utils.RedisUtils;
-import com.ruoyi.system.domain.SysCache;
-import com.ruoyi.system.domain.vo.CacheListInfoVo;
-import lombok.RequiredArgsConstructor;
-import org.redisson.spring.data.connection.RedissonConnectionFactory;
-import org.springframework.data.redis.connection.RedisConnection;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.*;
-
-/**
- * 缂撳瓨鐩戞帶
- *
- * @author Lion Li
- */
-@RequiredArgsConstructor
-@RestController
-@RequestMapping("/monitor/cache")
-public class CacheController {
-
-    private final RedissonConnectionFactory connectionFactory;
-
-    private final static List<SysCache> CACHES = new ArrayList<>();
-
-    static {
-        CACHES.add(new SysCache(CacheConstants.LOGIN_TOKEN_KEY, "鐢ㄦ埛淇℃伅"));
-        CACHES.add(new SysCache(CacheConstants.ONLINE_TOKEN_KEY, "鍦ㄧ嚎鐢ㄦ埛"));
-        CACHES.add(new SysCache(CacheNames.SYS_CONFIG, "閰嶇疆淇℃伅"));
-        CACHES.add(new SysCache(CacheNames.SYS_DICT, "鏁版嵁瀛楀吀"));
-        CACHES.add(new SysCache(CacheConstants.CAPTCHA_CODE_KEY, "楠岃瘉鐮�"));
-        CACHES.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "闃查噸鎻愪氦"));
-        CACHES.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "闄愭祦澶勭悊"));
-        CACHES.add(new SysCache(CacheNames.SYS_OSS_CONFIG, "OSS閰嶇疆"));
-        CACHES.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "瀵嗙爜閿欒娆℃暟"));
-    }
-
-    /**
-     * 鑾峰彇缂撳瓨鐩戞帶鍒楄〃
-     */
-    @SaCheckPermission("monitor:cache:list")
-    @GetMapping()
-    public R<CacheListInfoVo> getInfo() throws Exception {
-        RedisConnection connection = connectionFactory.getConnection();
-        Properties commandStats = connection.commands().info("commandstats");
-
-        List<Map<String, String>> pieList = new ArrayList<>();
-        if (commandStats != null) {
-            commandStats.stringPropertyNames().forEach(key -> {
-                Map<String, String> data = new HashMap<>(2);
-                String property = commandStats.getProperty(key);
-                data.put("name", StringUtils.removeStart(key, "cmdstat_"));
-                data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
-                pieList.add(data);
-            });
-        }
-
-        CacheListInfoVo infoVo = new CacheListInfoVo();
-        infoVo.setInfo(connection.commands().info());
-        infoVo.setDbSize(connection.commands().dbSize());
-        infoVo.setCommandStats(pieList);
-        return R.ok(infoVo);
-    }
-
-    /**
-     * 鑾峰彇缂撳瓨鐩戞帶缂撳瓨鍚嶅垪琛�
-     */
-    @SaCheckPermission("monitor:cache:list")
-    @GetMapping("/getNames")
-    public R<List<SysCache>> cache() {
-        return R.ok(CACHES);
-    }
-
-    /**
-     * 鑾峰彇缂撳瓨鐩戞帶Key鍒楄〃
-     *
-     * @param cacheName 缂撳瓨鍚�
-     */
-    @SaCheckPermission("monitor:cache:list")
-    @GetMapping("/getKeys/{cacheName}")
-    public R<Collection<String>> getCacheKeys(@PathVariable String cacheName) {
-        Collection<String> cacheKeys = new HashSet<>(0);
-        if (isCacheNames(cacheName)) {
-            Set<Object> keys = CacheUtils.keys(cacheName);
-            if (CollUtil.isNotEmpty(keys)) {
-                cacheKeys = StreamUtils.toList(keys, Object::toString);
-            }
-        } else {
-            cacheKeys = RedisUtils.keys(cacheName + "*");
-        }
-        return R.ok(cacheKeys);
-    }
-
-    /**
-     * 鑾峰彇缂撳瓨鐩戞帶缂撳瓨鍊艰鎯�
-     *
-     * @param cacheName 缂撳瓨鍚�
-     * @param cacheKey  缂撳瓨key
-     */
-    @SaCheckPermission("monitor:cache:list")
-    @GetMapping("/getValue/{cacheName}/{cacheKey}")
-    public R<SysCache> getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey) {
-        Object cacheValue;
-        if (isCacheNames(cacheName)) {
-            cacheValue = CacheUtils.get(cacheName, cacheKey);
-        } else {
-            cacheValue = RedisUtils.getCacheObject(cacheKey);
-        }
-        SysCache sysCache = new SysCache(cacheName, cacheKey, JsonUtils.toJsonString(cacheValue));
-        return R.ok(sysCache);
-    }
-
-    /**
-     * 娓呯悊缂撳瓨鐩戞帶缂撳瓨鍚�
-     *
-     * @param cacheName 缂撳瓨鍚�
-     */
-    @SaCheckPermission("monitor:cache:list")
-    @DeleteMapping("/clearCacheName/{cacheName}")
-    public R<Void> clearCacheName(@PathVariable String cacheName) {
-        if (isCacheNames(cacheName)) {
-            CacheUtils.clear(cacheName);
-        } else {
-            RedisUtils.deleteKeys(cacheName + "*");
-        }
-        return R.ok();
-    }
-
-    /**
-     * 娓呯悊缂撳瓨鐩戞帶Key
-     *
-     * @param cacheKey key鍚�
-     */
-    @SaCheckPermission("monitor:cache:list")
-    @DeleteMapping("/clearCacheKey/{cacheName}/{cacheKey}")
-    public R<Void> clearCacheKey(@PathVariable String cacheName, @PathVariable String cacheKey) {
-        if (isCacheNames(cacheName)) {
-            CacheUtils.evict(cacheName, cacheKey);
-        } else {
-            RedisUtils.deleteObject(cacheKey);
-        }
-        return R.ok();
-    }
-
-    /**
-     * 娓呯悊鍏ㄩ儴缂撳瓨鐩戞帶
-     */
-    @SaCheckPermission("monitor:cache:list")
-    @DeleteMapping("/clearCacheAll")
-    public R<Void> clearCacheAll() {
-        RedisUtils.deleteKeys("*");
-        return R.ok();
-    }
-
-    private boolean isCacheNames(String cacheName) {
-        return !StringUtils.contains(cacheName, ":");
-    }
-}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysLogininforController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysLogininforController.java
index c937e60..1ef7f7f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysLogininforController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysLogininforController.java
@@ -1,22 +1,23 @@
 package com.ruoyi.system.controller.monitor;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
-import com.ruoyi.common.core.constant.CacheConstants;
-import com.ruoyi.common.mybatis.core.page.PageQuery;
+import com.ruoyi.common.core.constant.GlobalConstants;
 import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.mybatis.core.page.TableDataInfo;
-import com.ruoyi.common.web.core.BaseController;
 import com.ruoyi.common.excel.utils.ExcelUtil;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 import com.ruoyi.common.redis.utils.RedisUtils;
-import com.ruoyi.system.domain.SysLogininfor;
+import com.ruoyi.common.web.core.BaseController;
+import com.ruoyi.system.domain.bo.SysLogininforBo;
+import com.ruoyi.system.domain.vo.SysLogininforVo;
 import com.ruoyi.system.service.ISysLogininforService;
+import jakarta.servlet.http.HttpServletResponse;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import jakarta.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
@@ -37,7 +38,7 @@
      */
     @SaCheckPermission("monitor:logininfor:list")
     @GetMapping("/list")
-    public TableDataInfo<SysLogininfor> list(SysLogininfor logininfor, PageQuery pageQuery) {
+    public TableDataInfo<SysLogininforVo> list(SysLogininforBo logininfor, PageQuery pageQuery) {
         return logininforService.selectPageLogininforList(logininfor, pageQuery);
     }
 
@@ -47,9 +48,9 @@
     @Log(title = "鐧诲綍鏃ュ織", businessType = BusinessType.EXPORT)
     @SaCheckPermission("monitor:logininfor:export")
     @PostMapping("/export")
-    public void export(SysLogininfor logininfor, HttpServletResponse response) {
-        List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
-        ExcelUtil.exportExcel(list, "鐧诲綍鏃ュ織", SysLogininfor.class, response);
+    public void export(SysLogininforBo logininfor, HttpServletResponse response) {
+        List<SysLogininforVo> list = logininforService.selectLogininforList(logininfor);
+        ExcelUtil.exportExcel(list, "鐧诲綍鏃ュ織", SysLogininforVo.class, response);
     }
 
     /**
@@ -78,7 +79,7 @@
     @Log(title = "璐︽埛瑙i攣", businessType = BusinessType.OTHER)
     @GetMapping("/unlock/{userName}")
     public R<Void> unlock(@PathVariable("userName") String userName) {
-        String loginName = CacheConstants.PWD_ERR_CNT_KEY + userName;
+        String loginName = GlobalConstants.PWD_ERR_CNT_KEY + userName;
         if (RedisUtils.hasKey(loginName)) {
             RedisUtils.deleteObject(loginName);
         }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysOperlogController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysOperlogController.java
index a985497..2793890 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysOperlogController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysOperlogController.java
@@ -8,7 +8,8 @@
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.excel.utils.ExcelUtil;
-import com.ruoyi.system.domain.SysOperLog;
+import com.ruoyi.system.domain.bo.SysOperLogBo;
+import com.ruoyi.system.domain.vo.SysOperLogVo;
 import com.ruoyi.system.service.ISysOperLogService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
@@ -35,7 +36,7 @@
      */
     @SaCheckPermission("monitor:operlog:list")
     @GetMapping("/list")
-    public TableDataInfo<SysOperLog> list(SysOperLog operLog, PageQuery pageQuery) {
+    public TableDataInfo<SysOperLogVo> list(SysOperLogBo operLog, PageQuery pageQuery) {
         return operLogService.selectPageOperLogList(operLog, pageQuery);
     }
 
@@ -45,9 +46,9 @@
     @Log(title = "鎿嶄綔鏃ュ織", businessType = BusinessType.EXPORT)
     @SaCheckPermission("monitor:operlog:export")
     @PostMapping("/export")
-    public void export(SysOperLog operLog, HttpServletResponse response) {
-        List<SysOperLog> list = operLogService.selectOperLogList(operLog);
-        ExcelUtil.exportExcel(list, "鎿嶄綔鏃ュ織", SysOperLog.class, response);
+    public void export(SysOperLogBo operLog, HttpServletResponse response) {
+        List<SysOperLogVo> list = operLogService.selectOperLogList(operLog);
+        ExcelUtil.exportExcel(list, "鎿嶄綔鏃ュ織", SysOperLogVo.class, response);
     }
 
     /**
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysUserOnlineController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysUserOnlineController.java
index bebfad2..9daa394 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysUserOnlineController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/monitor/SysUserOnlineController.java
@@ -4,16 +4,17 @@
 import cn.dev33.satoken.exception.NotLoginException;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.bean.BeanUtil;
-import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.core.constant.CacheConstants;
-import com.ruoyi.common.web.core.BaseController;
+import com.ruoyi.common.core.constant.GlobalConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.domain.dto.UserOnlineDTO;
-import com.ruoyi.common.mybatis.core.page.TableDataInfo;
-import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.core.utils.StreamUtils;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 import com.ruoyi.common.redis.utils.RedisUtils;
+import com.ruoyi.common.web.core.BaseController;
 import com.ruoyi.system.domain.SysUserOnline;
 import lombok.RequiredArgsConstructor;
 import org.springframework.web.bind.annotation.*;
@@ -45,7 +46,7 @@
         List<String> keys = StpUtil.searchTokenValue("", 0, -1, false);
         List<UserOnlineDTO> userOnlineDTOList = new ArrayList<>();
         for (String key : keys) {
-            String token = key.replace(CacheConstants.LOGIN_TOKEN_KEY, "");
+            String token = key.replace(GlobalConstants.LOGIN_TOKEN_KEY, "");
             // 濡傛灉宸茬粡杩囨湡鍒欒烦杩�
             if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < -1) {
                 continue;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysDeptController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysDeptController.java
index 316497c..90e134c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysDeptController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysDeptController.java
@@ -1,13 +1,13 @@
 package com.ruoyi.system.controller.system;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
-import cn.hutool.core.util.ArrayUtil;
-import com.ruoyi.common.log.annotation.Log;
+import cn.hutool.core.convert.Convert;
 import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.web.core.BaseController;
 import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.web.core.BaseController;
 import com.ruoyi.system.domain.bo.SysDeptBo;
 import com.ruoyi.system.domain.vo.SysDeptVo;
 import com.ruoyi.system.service.ISysDeptService;
@@ -50,7 +50,7 @@
     public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
         List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo());
         depts.removeIf(d -> d.getDeptId().equals(deptId)
-            || ArrayUtil.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
+            || StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId)));
         return R.ok(depts);
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysMenuController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysMenuController.java
index b40acbb..6914d4e 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysMenuController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysMenuController.java
@@ -1,7 +1,10 @@
 package com.ruoyi.system.controller.system;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.annotation.SaCheckRole;
+import cn.dev33.satoken.annotation.SaMode;
 import cn.hutool.core.lang.tree.Tree;
+import com.ruoyi.common.core.constant.TenantConstants;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
@@ -35,6 +38,10 @@
     /**
      * 鑾峰彇鑿滃崟鍒楄〃
      */
+    @SaCheckRole(value = {
+            TenantConstants.SUPER_ADMIN_ROLE_KEY,
+            TenantConstants.TENANT_ADMIN_ROLE_KEY
+    }, mode = SaMode.OR)
     @SaCheckPermission("system:menu:list")
     @GetMapping("/list")
     public R<List<SysMenuVo>> list(SysMenuBo menu) {
@@ -47,6 +54,10 @@
      *
      * @param menuId 鑿滃崟ID
      */
+    @SaCheckRole(value = {
+            TenantConstants.SUPER_ADMIN_ROLE_KEY,
+            TenantConstants.TENANT_ADMIN_ROLE_KEY
+    }, mode = SaMode.OR)
     @SaCheckPermission("system:menu:query")
     @GetMapping(value = "/{menuId}")
     public R<SysMenuVo> getInfo(@PathVariable Long menuId) {
@@ -56,6 +67,11 @@
     /**
      * 鑾峰彇鑿滃崟涓嬫媺鏍戝垪琛�
      */
+    @SaCheckRole(value = {
+            TenantConstants.SUPER_ADMIN_ROLE_KEY,
+            TenantConstants.TENANT_ADMIN_ROLE_KEY
+    }, mode = SaMode.OR)
+    @SaCheckPermission("system:menu:query")
     @GetMapping("/treeselect")
     public R<List<Tree<Long>>> treeselect(SysMenuBo menu) {
         List<SysMenuVo> menus = menuService.selectMenuList(menu, LoginHelper.getUserId());
@@ -67,6 +83,11 @@
      *
      * @param roleId 瑙掕壊ID
      */
+    @SaCheckRole(value = {
+            TenantConstants.SUPER_ADMIN_ROLE_KEY,
+            TenantConstants.TENANT_ADMIN_ROLE_KEY
+    }, mode = SaMode.OR)
+    @SaCheckPermission("system:menu:query")
     @GetMapping(value = "/roleMenuTreeselect/{roleId}")
     public R<MenuTreeSelectVo> roleMenuTreeselect(@PathVariable("roleId") Long roleId) {
         List<SysMenuVo> menus = menuService.selectMenuList(LoginHelper.getUserId());
@@ -77,8 +98,25 @@
     }
 
     /**
+     * 鍔犺浇瀵瑰簲绉熸埛濂楅鑿滃崟鍒楄〃鏍�
+     *
+     * @param packageId 绉熸埛濂楅ID
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:menu:query")
+    @GetMapping(value = "/tenantPackageMenuTreeselect/{packageId}")
+    public R<MenuTreeSelectVo> tenantPackageMenuTreeselect(@PathVariable("packageId") Long packageId) {
+        List<SysMenuVo> menus = menuService.selectMenuList(LoginHelper.getUserId());
+        MenuTreeSelectVo selectVo = new MenuTreeSelectVo();
+        selectVo.setCheckedKeys(menuService.selectMenuListByPackageId(packageId));
+        selectVo.setMenus(menuService.buildMenuTreeSelect(menus));
+        return R.ok(selectVo);
+    }
+
+    /**
      * 鏂板鑿滃崟
      */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
     @SaCheckPermission("system:menu:add")
     @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.INSERT)
     @PostMapping
@@ -94,6 +132,7 @@
     /**
      * 淇敼鑿滃崟
      */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
     @SaCheckPermission("system:menu:edit")
     @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.UPDATE)
     @PutMapping
@@ -113,6 +152,7 @@
      *
      * @param menuId 鑿滃崟ID
      */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
     @SaCheckPermission("system:menu:remove")
     @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.DELETE)
     @DeleteMapping("/{menuId}")
@@ -125,4 +165,5 @@
         }
         return toAjax(menuService.deleteMenuById(menuId));
     }
+
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssConfigController.java
index b899559..7c27230 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssConfigController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssConfigController.java
@@ -35,7 +35,7 @@
 @RequestMapping("/system/oss/config")
 public class SysOssConfigController extends BaseController {
 
-    private final ISysOssConfigService iSysOssConfigService;
+    private final ISysOssConfigService sysOssConfigService;
 
     /**
      * 鏌ヨ瀵硅薄瀛樺偍閰嶇疆鍒楄〃
@@ -43,7 +43,7 @@
     @SaCheckPermission("system:oss:list")
     @GetMapping("/list")
     public TableDataInfo<SysOssConfigVo> list(@Validated(QueryGroup.class) SysOssConfigBo bo, PageQuery pageQuery) {
-        return iSysOssConfigService.queryPageList(bo, pageQuery);
+        return sysOssConfigService.queryPageList(bo, pageQuery);
     }
 
     /**
@@ -55,7 +55,7 @@
     @GetMapping("/{ossConfigId}")
     public R<SysOssConfigVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖")
                                      @PathVariable Long ossConfigId) {
-        return R.ok(iSysOssConfigService.queryById(ossConfigId));
+        return R.ok(sysOssConfigService.queryById(ossConfigId));
     }
 
     /**
@@ -66,7 +66,7 @@
     @RepeatSubmit()
     @PostMapping()
     public R<Void> add(@Validated(AddGroup.class) @RequestBody SysOssConfigBo bo) {
-        return toAjax(iSysOssConfigService.insertByBo(bo));
+        return toAjax(sysOssConfigService.insertByBo(bo));
     }
 
     /**
@@ -77,7 +77,7 @@
     @RepeatSubmit()
     @PutMapping()
     public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysOssConfigBo bo) {
-        return toAjax(iSysOssConfigService.updateByBo(bo));
+        return toAjax(sysOssConfigService.updateByBo(bo));
     }
 
     /**
@@ -90,7 +90,7 @@
     @DeleteMapping("/{ossConfigIds}")
     public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
                           @PathVariable Long[] ossConfigIds) {
-        return toAjax(iSysOssConfigService.deleteWithValidByIds(List.of(ossConfigIds), true));
+        return toAjax(sysOssConfigService.deleteWithValidByIds(List.of(ossConfigIds), true));
     }
 
     /**
@@ -100,6 +100,6 @@
     @Log(title = "瀵硅薄瀛樺偍鐘舵�佷慨鏀�", businessType = BusinessType.UPDATE)
     @PutMapping("/changeStatus")
     public R<Void> changeStatus(@RequestBody SysOssConfigBo bo) {
-        return toAjax(iSysOssConfigService.updateOssConfigStatus(bo));
+        return toAjax(sysOssConfigService.updateOssConfigStatus(bo));
     }
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java
index 993de54..d03bfcd 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysOssController.java
@@ -38,7 +38,7 @@
 @RequestMapping("/system/oss")
 public class SysOssController extends BaseController {
 
-    private final ISysOssService iSysOssService;
+    private final ISysOssService sysOssService;
 
     /**
      * 鏌ヨOSS瀵硅薄瀛樺偍鍒楄〃
@@ -46,7 +46,7 @@
     @SaCheckPermission("system:oss:list")
     @GetMapping("/list")
     public TableDataInfo<SysOssVo> list(@Validated(QueryGroup.class) SysOssBo bo, PageQuery pageQuery) {
-        return iSysOssService.queryPageList(bo, pageQuery);
+        return sysOssService.queryPageList(bo, pageQuery);
     }
 
     /**
@@ -58,7 +58,7 @@
     @GetMapping("/listByIds/{ossIds}")
     public R<List<SysOssVo>> listByIds(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
                                        @PathVariable Long[] ossIds) {
-        List<SysOssVo> list = iSysOssService.listByIds(Arrays.asList(ossIds));
+        List<SysOssVo> list = sysOssService.listByIds(Arrays.asList(ossIds));
         return R.ok(list);
     }
 
@@ -74,7 +74,7 @@
         if (ObjectUtil.isNull(file)) {
             throw new ServiceException("涓婁紶鏂囦欢涓嶈兘涓虹┖");
         }
-        SysOssVo oss = iSysOssService.upload(file);
+        SysOssVo oss = sysOssService.upload(file);
         SysOssUploadVo uploadVo = new SysOssUploadVo();
         uploadVo.setUrl(oss.getUrl());
         uploadVo.setFileName(oss.getOriginalName());
@@ -90,7 +90,7 @@
     @SaCheckPermission("system:oss:download")
     @GetMapping("/download/{ossId}")
     public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException {
-        iSysOssService.download(ossId, response);
+        sysOssService.download(ossId, response);
     }
 
     /**
@@ -103,7 +103,7 @@
     @DeleteMapping("/{ossIds}")
     public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
                           @PathVariable Long[] ossIds) {
-        return toAjax(iSysOssService.deleteWithValidByIds(List.of(ossIds), true));
+        return toAjax(sysOssService.deleteWithValidByIds(List.of(ossIds), true));
     }
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysProfileController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysProfileController.java
index 5e84c07..7a2d5bb 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysProfileController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysProfileController.java
@@ -39,7 +39,7 @@
 public class SysProfileController extends BaseController {
 
     private final ISysUserService userService;
-    private final ISysOssService iSysOssService;
+    private final ISysOssService sysOssService;
 
     /**
      * 涓汉淇℃伅
@@ -114,7 +114,7 @@
             if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
                 return R.fail("鏂囦欢鏍煎紡涓嶆纭紝璇蜂笂浼�" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "鏍煎紡");
             }
-            SysOssVo oss = iSysOssService.upload(avatarfile);
+            SysOssVo oss = sysOssService.upload(avatarfile);
             String avatar = oss.getUrl();
             if (userService.updateUserAvatar(LoginHelper.getUsername(), oss.getOssId())) {
                 AvatarVo avatarVo = new AvatarVo();
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java
index 02dc7ab..a3cf5a0 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java
@@ -1,16 +1,13 @@
 package com.ruoyi.system.controller.system;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
-import cn.hutool.core.util.ObjectUtil;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.domain.R;
-import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.excel.utils.ExcelUtil;
 import com.ruoyi.common.log.annotation.Log;
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.mybatis.core.page.PageQuery;
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
-import com.ruoyi.common.satoken.utils.LoginHelper;
 import com.ruoyi.common.web.core.BaseController;
 import com.ruoyi.system.domain.SysDept;
 import com.ruoyi.system.domain.SysUserRole;
@@ -20,9 +17,9 @@
 import com.ruoyi.system.domain.vo.SysRoleVo;
 import com.ruoyi.system.domain.vo.SysUserVo;
 import com.ruoyi.system.service.ISysDeptService;
+import com.ruoyi.system.service.ISysPermissionService;
 import com.ruoyi.system.service.ISysRoleService;
 import com.ruoyi.system.service.ISysUserService;
-import com.ruoyi.system.service.SysPermissionService;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
@@ -44,7 +41,7 @@
     private final ISysRoleService roleService;
     private final ISysUserService userService;
     private final ISysDeptService deptService;
-    private final SysPermissionService permissionService;
+    private final ISysPermissionService permissionService;
 
     /**
      * 鑾峰彇瑙掕壊淇℃伅鍒楄〃
@@ -110,13 +107,14 @@
         }
 
         if (roleService.updateRole(role) > 0) {
-            // 鏇存柊缂撳瓨鐢ㄦ埛鏉冮檺
-            LoginUser loginUser = LoginHelper.getLoginUser();
-            SysUserVo sysUser = userService.selectUserById(loginUser.getUserId());
-            if (ObjectUtil.isNotNull(sysUser) && !LoginHelper.isAdmin()) {
-                loginUser.setMenuPermission(permissionService.getMenuPermission(sysUser.getUserId(), sysUser.isAdmin()));
-                LoginHelper.setLoginUser(loginUser);
-            }
+//            // 鏇存柊缂撳瓨鐢ㄦ埛鏉冮檺
+//            LoginUser loginUser = LoginHelper.getLoginUser();
+//            SysUserVo sysUser = userService.selectUserById(loginUser.getUserId());
+//            if (ObjectUtil.isNotNull(sysUser)) {
+//                loginUser.setMenuPermission(permissionService.getMenuPermission(sysUser.getUserId()));
+//                LoginHelper.setLoginUser(loginUser);
+//            }
+            // todo LoginUser 鏀逛负瀛樺偍鍒皌oken鍐呴儴 鏃犳硶鐑洿鏂� 绛夊緟鍚庣画鎯冲姙娉�
             return R.ok();
         }
         return R.fail("淇敼瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑱旂郴绠$悊鍛�");
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java
new file mode 100644
index 0000000..5a582ca
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantController.java
@@ -0,0 +1,168 @@
+package com.ruoyi.system.controller.system;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.annotation.SaCheckRole;
+import com.baomidou.lock.annotation.Lock4j;
+import com.ruoyi.common.core.constant.TenantConstants;
+import com.ruoyi.common.core.constant.UserConstants;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.excel.utils.ExcelUtil;
+import com.ruoyi.common.idempotent.annotation.RepeatSubmit;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
+import com.ruoyi.common.tenant.helper.TenantHelper;
+import com.ruoyi.common.web.core.BaseController;
+import com.ruoyi.system.domain.bo.SysTenantBo;
+import com.ruoyi.system.domain.bo.SysUserBo;
+import com.ruoyi.system.domain.vo.SysTenantVo;
+import com.ruoyi.system.service.ISysTenantService;
+import com.ruoyi.system.service.ISysUserService;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.RequiredArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 绉熸埛绠$悊
+ *
+ * @author Michelle.Chung
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/system/tenant")
+public class SysTenantController extends BaseController {
+
+    private final ISysTenantService sysTenantService;
+    private final ISysUserService sysUserService;
+
+    /**
+     * 鏌ヨ绉熸埛鍒楄〃
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenant:list")
+    @GetMapping("/list")
+    public TableDataInfo<SysTenantVo> list(SysTenantBo bo, PageQuery pageQuery) {
+        return sysTenantService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 瀵煎嚭绉熸埛鍒楄〃
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenant:export")
+    @Log(title = "绉熸埛", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(SysTenantBo bo, HttpServletResponse response) {
+        List<SysTenantVo> list = sysTenantService.queryList(bo);
+        ExcelUtil.exportExcel(list, "绉熸埛", SysTenantVo.class, response);
+    }
+
+    /**
+     * 鑾峰彇绉熸埛璇︾粏淇℃伅
+     *
+     * @param id 涓婚敭
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenant:query")
+    @GetMapping("/{id}")
+    public R<SysTenantVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖")
+                                     @PathVariable Long id) {
+        return R.ok(sysTenantService.queryById(id));
+    }
+
+    /**
+     * 鏂板绉熸埛
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenant:add")
+    @Log(title = "绉熸埛", businessType = BusinessType.INSERT)
+    @Lock4j
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody SysTenantBo bo) {
+        if (TenantConstants.NOT_PASS.equals(sysTenantService.checkCompanyNameUnique(bo))) {
+            throw new ServiceException("鏂板绉熸埛'" + bo.getCompanyName() + "'澶辫触锛屼紒涓氬悕绉板凡瀛樺湪");
+        }
+        SysUserBo userBo = new SysUserBo();
+        userBo.setUserName(bo.getUsername());
+        // 鍒ゆ柇鐢ㄦ埛鍚嶆槸鍚﹂噸澶�
+        if (UserConstants.NOT_UNIQUE.equals(sysUserService.checkUserNameUnique(userBo))) {
+            throw new ServiceException("鏂板鐢ㄦ埛'" + bo.getUsername() + "'澶辫触锛岀櫥褰曡处鍙峰凡瀛樺湪");
+        }
+        return toAjax(sysTenantService.insertByBo(bo));
+    }
+
+    /**
+     * 淇敼绉熸埛
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenant:edit")
+    @Log(title = "绉熸埛", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysTenantBo bo) {
+        if (UserConstants.NOT_UNIQUE.equals(sysTenantService.checkCompanyNameUnique(bo))) {
+            throw new ServiceException("淇敼绉熸埛'" + bo.getCompanyName() + "'澶辫触锛屽叕鍙稿悕绉板凡瀛樺湪");
+        }
+        return toAjax(sysTenantService.updateByBo(bo));
+    }
+
+    /**
+     * 鐘舵�佷慨鏀�
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:edit")
+    @Log(title = "绉熸埛濂楅", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public R<Void> changeStatus(@RequestBody SysTenantBo bo) {
+        return toAjax(sysTenantService.updateTenantStatus(bo));
+    }
+
+    /**
+     * 鍒犻櫎绉熸埛
+     *
+     * @param ids 涓婚敭涓�
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenant:remove")
+    @Log(title = "绉熸埛", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
+                          @PathVariable Long[] ids) {
+        return toAjax(sysTenantService.deleteWithValidByIds(List.of(ids), true));
+    }
+
+    /**
+     * 鍔ㄦ�佸垏鎹㈢鎴�
+     *
+     * @param tenantId 绉熸埛ID
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @GetMapping("/dynamic/{tenantId}")
+    public R<Void> dynamicTenant(@NotBlank(message = "绉熸埛ID涓嶈兘涓虹┖") @PathVariable String tenantId) {
+        TenantHelper.setDynamic(tenantId);
+        return R.ok();
+    }
+
+    /**
+     * 娓呴櫎鍔ㄦ�佺鎴�
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @GetMapping("/dynamic/clear")
+    public R<Void> dynamicClear() {
+        TenantHelper.clearDynamic();
+        return R.ok();
+    }
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantPackageController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantPackageController.java
new file mode 100644
index 0000000..a0626c3
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysTenantPackageController.java
@@ -0,0 +1,124 @@
+package com.ruoyi.system.controller.system;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.dev33.satoken.annotation.SaCheckRole;
+import com.ruoyi.common.core.constant.TenantConstants;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.excel.utils.ExcelUtil;
+import com.ruoyi.common.idempotent.annotation.RepeatSubmit;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
+import com.ruoyi.common.web.core.BaseController;
+import com.ruoyi.system.domain.bo.SysTenantPackageBo;
+import com.ruoyi.system.domain.vo.SysTenantPackageVo;
+import com.ruoyi.system.service.ISysTenantPackageService;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.NotEmpty;
+import jakarta.validation.constraints.NotNull;
+import lombok.RequiredArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 绉熸埛濂楅绠$悊
+ *
+ * @author Michelle.Chung
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/system/tenant/package")
+public class SysTenantPackageController extends BaseController {
+
+    private final ISysTenantPackageService sysTenantPackageService;
+
+    /**
+     * 鏌ヨ绉熸埛濂楅鍒楄〃
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:list")
+    @GetMapping("/list")
+    public TableDataInfo<SysTenantPackageVo> list(SysTenantPackageBo bo, PageQuery pageQuery) {
+        return sysTenantPackageService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 瀵煎嚭绉熸埛濂楅鍒楄〃
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:export")
+    @Log(title = "绉熸埛濂楅", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(SysTenantPackageBo bo, HttpServletResponse response) {
+        List<SysTenantPackageVo> list = sysTenantPackageService.queryList(bo);
+        ExcelUtil.exportExcel(list, "绉熸埛濂楅", SysTenantPackageVo.class, response);
+    }
+
+    /**
+     * 鑾峰彇绉熸埛濂楅璇︾粏淇℃伅
+     *
+     * @param packageId 涓婚敭
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:query")
+    @GetMapping("/{packageId}")
+    public R<SysTenantPackageVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖")
+                                     @PathVariable Long packageId) {
+        return R.ok(sysTenantPackageService.queryById(packageId));
+    }
+
+    /**
+     * 鏂板绉熸埛濂楅
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:add")
+    @Log(title = "绉熸埛濂楅", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody SysTenantPackageBo bo) {
+        return toAjax(sysTenantPackageService.insertByBo(bo));
+    }
+
+    /**
+     * 淇敼绉熸埛濂楅
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:edit")
+    @Log(title = "绉熸埛濂楅", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysTenantPackageBo bo) {
+        return toAjax(sysTenantPackageService.updateByBo(bo));
+    }
+
+    /**
+     * 鐘舵�佷慨鏀�
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:edit")
+    @Log(title = "绉熸埛濂楅", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStatus")
+    public R<Void> changeStatus(@RequestBody SysTenantPackageBo bo) {
+        return toAjax(sysTenantPackageService.updatePackageStatus(bo));
+    }
+
+    /**
+     * 鍒犻櫎绉熸埛濂楅
+     *
+     * @param packageIds 涓婚敭涓�
+     */
+    @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
+    @SaCheckPermission("system:tenantPackage:remove")
+    @Log(title = "绉熸埛濂楅", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{packageIds}")
+    public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖")
+                          @PathVariable Long[] packageIds) {
+        return toAjax(sysTenantPackageService.deleteWithValidByIds(List.of(packageIds), true));
+    }
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java
index 0efea3d..1bec7a5 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java
@@ -6,6 +6,7 @@
 import cn.hutool.core.lang.tree.Tree;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.ruoyi.common.core.constant.TenantConstants;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StreamUtils;
@@ -16,16 +17,14 @@
 import com.ruoyi.common.log.enums.BusinessType;
 import com.ruoyi.common.mybatis.core.page.PageQuery;
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
+import com.ruoyi.common.tenant.helper.TenantHelper;
 import com.ruoyi.common.satoken.utils.LoginHelper;
 import com.ruoyi.common.web.core.BaseController;
 import com.ruoyi.system.domain.SysDept;
 import com.ruoyi.system.domain.bo.SysUserBo;
 import com.ruoyi.system.domain.vo.*;
 import com.ruoyi.system.listener.SysUserImportListener;
-import com.ruoyi.system.service.ISysDeptService;
-import com.ruoyi.system.service.ISysPostService;
-import com.ruoyi.system.service.ISysRoleService;
-import com.ruoyi.system.service.ISysUserService;
+import com.ruoyi.system.service.*;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.RequiredArgsConstructor;
 import org.springframework.http.MediaType;
@@ -51,6 +50,7 @@
     private final ISysRoleService roleService;
     private final ISysPostService postService;
     private final ISysDeptService deptService;
+    private final ISysTenantService tenantService;
 
     /**
      * 鑾峰彇鐢ㄦ埛鍒楄〃
@@ -114,7 +114,7 @@
         userService.checkUserDataScope(userId);
         SysUserInfoVo userInfoVo = new SysUserInfoVo();
         List<SysRoleVo> roles = roleService.selectRoleAll();
-        userInfoVo.setRoles(LoginHelper.isAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isAdmin()));
+        userInfoVo.setRoles(LoginHelper.isSuperAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isSuperAdmin()));
         userInfoVo.setPosts(postService.selectPostAll());
         if (ObjectUtil.isNotNull(userId)) {
             SysUserVo sysUser = userService.selectUserById(userId);
@@ -140,6 +140,12 @@
         } else if (StringUtils.isNotEmpty(user.getEmail())
                    && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) {
             return R.fail("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪");
+        }
+        if (TenantHelper.isEnable()) {
+            String status = tenantService.checkAccountBalance(LoginHelper.getTenantId());
+            if (TenantConstants.NOT_PASS.equals(status)) {
+                return R.fail("褰撳墠绉熸埛涓嬬敤鎴峰悕棰濅笉瓒筹紝璇疯仈绯荤鐞嗗憳");
+            }
         }
         user.setPassword(BCrypt.hashpw(user.getPassword()));
         return toAjax(userService.insertUser(user));
@@ -218,7 +224,7 @@
         List<SysRoleVo> roles = roleService.selectRolesByUserId(userId);
         SysUserInfoVo userInfoVo = new SysUserInfoVo();
         userInfoVo.setUser(user);
-        userInfoVo.setRoles(LoginHelper.isAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isAdmin()));
+        userInfoVo.setRoles(LoginHelper.isSuperAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isSuperAdmin()));
         return R.ok(userInfoVo);
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
index 20b902d..3e62171 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java
@@ -2,7 +2,7 @@
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -15,7 +15,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_config")
-public class SysConfig extends BaseEntity {
+public class SysConfig extends TenantEntity {
 
     /**
      * 鍙傛暟涓婚敭
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java
index eb3b1dc..efa67ff 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDept.java
@@ -3,11 +3,7 @@
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
-import jakarta.validation.constraints.Email;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Size;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -22,7 +18,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_dept")
-public class SysDept extends TreeEntity<SysDept> {
+public class SysDept extends TenantEntity {
 
     @Serial
     private static final long serialVersionUID = 1L;
@@ -34,6 +30,11 @@
     private Long deptId;
 
     /**
+     * 鐖堕儴闂↖D
+     */
+    private Long parentId;
+
+    /**
      * 閮ㄩ棬鍚嶇О
      */
     private String deptName;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java
index 14a9cf7..ece40e3 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictData.java
@@ -3,7 +3,7 @@
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -16,7 +16,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_dict_data")
-public class SysDictData extends BaseEntity {
+public class SysDictData extends TenantEntity {
 
     /**
      * 瀛楀吀缂栫爜
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java
index bbab812..96a1f28 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysDictType.java
@@ -2,7 +2,7 @@
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -15,7 +15,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_dict_type")
-public class SysDictType extends BaseEntity {
+public class SysDictType extends TenantEntity {
 
     /**
      * 瀛楀吀涓婚敭
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java
index 047936f..9ee8e62 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java
@@ -1,19 +1,12 @@
 package com.ruoyi.system.domain;
 
-import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.excel.annotation.ExcelDictFormat;
-import com.ruoyi.common.excel.convert.ExcelDictConvert;
 import lombok.Data;
 
 import java.io.Serial;
 import java.io.Serializable;
 import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
 
 /**
  * 绯荤粺璁块棶璁板綍琛� sys_logininfor
@@ -23,7 +16,6 @@
 
 @Data
 @TableName("sys_logininfor")
-@ExcelIgnoreUnannotated
 public class SysLogininfor implements Serializable {
 
     @Serial
@@ -32,63 +24,52 @@
     /**
      * ID
      */
-    @ExcelProperty(value = "搴忓彿")
     @TableId(value = "info_id")
     private Long infoId;
 
     /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
      * 鐢ㄦ埛璐﹀彿
      */
-    @ExcelProperty(value = "鐢ㄦ埛璐﹀彿")
     private String userName;
 
     /**
      * 鐧诲綍鐘舵�� 0鎴愬姛 1澶辫触
      */
-    @ExcelProperty(value = "鐧诲綍鐘舵��", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "sys_common_status")
     private String status;
 
     /**
      * 鐧诲綍IP鍦板潃
      */
-    @ExcelProperty(value = "鐧诲綍鍦板潃")
     private String ipaddr;
 
     /**
      * 鐧诲綍鍦扮偣
      */
-    @ExcelProperty(value = "鐧诲綍鍦扮偣")
     private String loginLocation;
 
     /**
      * 娴忚鍣ㄧ被鍨�
      */
-    @ExcelProperty(value = "娴忚鍣�")
     private String browser;
 
     /**
      * 鎿嶄綔绯荤粺
      */
-    @ExcelProperty(value = "鎿嶄綔绯荤粺")
     private String os;
 
     /**
      * 鎻愮ず娑堟伅
      */
-    @ExcelProperty(value = "鎻愮ず娑堟伅")
     private String msg;
 
     /**
      * 璁块棶鏃堕棿
      */
-    @ExcelProperty(value = "璁块棶鏃堕棿")
     private Date loginTime;
-
-    /**
-     * 璇锋眰鍙傛暟
-     */
-    @TableField(exist = false)
-    private Map<String, Object> params = new HashMap<>();
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java
index 0ba4ab0..b02d74f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysMenu.java
@@ -1,13 +1,17 @@
 package com.ruoyi.system.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.ruoyi.common.core.constant.Constants;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.utils.StringUtils;
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 鑿滃崟鏉冮檺琛� sys_menu
@@ -18,13 +22,18 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_menu")
-public class SysMenu extends TreeEntity<SysMenu> {
+public class SysMenu extends BaseEntity {
 
     /**
      * 鑿滃崟ID
      */
     @TableId(value = "menu_id")
     private Long menuId;
+
+    /**
+     * 鐖惰彍鍗旾D
+     */
+    private Long parentId;
 
     /**
      * 鑿滃崟鍚嶇О
@@ -92,6 +101,18 @@
     private String remark;
 
     /**
+     * 鐖惰彍鍗曞悕绉�
+     */
+    @TableField(exist = false)
+    private String parentName;
+
+    /**
+     * 瀛愯彍鍗�
+     */
+    @TableField(exist = false)
+    private List<SysMenu> children = new ArrayList<>();
+
+    /**
      * 鑾峰彇璺敱鍚嶇О
      */
     public String getRouteName() {
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java
index 21fba9f..f61fd8c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java
@@ -2,7 +2,7 @@
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -15,7 +15,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_notice")
-public class SysNotice extends BaseEntity {
+public class SysNotice extends TenantEntity {
 
     /**
      * 鍏憡ID
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
index 0486569..9cb3588 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java
@@ -1,19 +1,12 @@
 package com.ruoyi.system.domain;
 
-import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.excel.annotation.ExcelDictFormat;
-import com.ruoyi.common.excel.convert.ExcelDictConvert;
 import lombok.Data;
 
 import java.io.Serial;
 import java.io.Serializable;
 import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
 
 /**
  * 鎿嶄綔鏃ュ織璁板綍琛� oper_log
@@ -23,7 +16,6 @@
 
 @Data
 @TableName("sys_oper_log")
-@ExcelIgnoreUnannotated
 public class SysOperLog implements Serializable {
 
     @Serial
@@ -32,113 +24,87 @@
     /**
      * 鏃ュ織涓婚敭
      */
-    @ExcelProperty(value = "鏃ュ織涓婚敭")
     @TableId(value = "oper_id")
     private Long operId;
 
     /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
      * 鎿嶄綔妯″潡
      */
-    @ExcelProperty(value = "鎿嶄綔妯″潡")
     private String title;
 
     /**
      * 涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�
      */
-    @ExcelProperty(value = "涓氬姟绫诲瀷", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "sys_oper_type")
     private Integer businessType;
-
-    /**
-     * 涓氬姟绫诲瀷鏁扮粍
-     */
-    @TableField(exist = false)
-    private Integer[] businessTypes;
 
     /**
      * 璇锋眰鏂规硶
      */
-    @ExcelProperty(value = "璇锋眰鏂规硶")
     private String method;
 
     /**
      * 璇锋眰鏂瑰紡
      */
-    @ExcelProperty(value = "璇锋眰鏂瑰紡")
     private String requestMethod;
 
     /**
      * 鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級
      */
-    @ExcelProperty(value = "鎿嶄綔绫诲埆", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(readConverterExp = "0=鍏跺畠,1=鍚庡彴鐢ㄦ埛,2=鎵嬫満绔敤鎴�")
     private Integer operatorType;
 
     /**
      * 鎿嶄綔浜哄憳
      */
-    @ExcelProperty(value = "鎿嶄綔浜哄憳")
     private String operName;
 
     /**
      * 閮ㄩ棬鍚嶇О
      */
-    @ExcelProperty(value = "閮ㄩ棬鍚嶇О")
     private String deptName;
 
     /**
      * 璇锋眰url
      */
-    @ExcelProperty(value = "璇锋眰鍦板潃")
     private String operUrl;
 
     /**
      * 鎿嶄綔鍦板潃
      */
-    @ExcelProperty(value = "鎿嶄綔鍦板潃")
     private String operIp;
 
     /**
      * 鎿嶄綔鍦扮偣
      */
-    @ExcelProperty(value = "鎿嶄綔鍦扮偣")
     private String operLocation;
 
     /**
      * 璇锋眰鍙傛暟
      */
-    @ExcelProperty(value = "璇锋眰鍙傛暟")
     private String operParam;
 
     /**
      * 杩斿洖鍙傛暟
      */
-    @ExcelProperty(value = "杩斿洖鍙傛暟")
     private String jsonResult;
 
     /**
      * 鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�
      */
-    @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class)
-    @ExcelDictFormat(dictType = "sys_common_status")
     private Integer status;
 
     /**
      * 閿欒娑堟伅
      */
-    @ExcelProperty(value = "閿欒娑堟伅")
     private String errorMsg;
 
     /**
      * 鎿嶄綔鏃堕棿
      */
-    @ExcelProperty(value = "鎿嶄綔鏃堕棿")
     private Date operTime;
-
-    /**
-     * 璇锋眰鍙傛暟
-     */
-    @TableField(exist = false)
-    private Map<String, Object> params = new HashMap<>();
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOss.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOss.java
index 31104a5..1f74be0 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOss.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOss.java
@@ -2,7 +2,7 @@
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -14,7 +14,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_oss")
-public class SysOss extends BaseEntity {
+public class SysOss extends TenantEntity {
 
     /**
      * 瀵硅薄瀛樺偍涓婚敭
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOssConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOssConfig.java
index 36b8293..8623f1a 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOssConfig.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOssConfig.java
@@ -2,7 +2,7 @@
 
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
@@ -14,7 +14,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_oss_config")
-public class SysOssConfig extends BaseEntity {
+public class SysOssConfig extends TenantEntity {
 
     /**
      * 涓诲缓
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
index 9da3cf5..970dd4d 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java
@@ -1,19 +1,10 @@
 package com.ruoyi.system.domain;
 
-import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
-import com.alibaba.excel.annotation.ExcelProperty;
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.excel.annotation.ExcelDictFormat;
-import com.ruoyi.common.excel.convert.ExcelDictConvert;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import jakarta.validation.constraints.Size;
 
 /**
  * 宀椾綅琛� sys_post
@@ -24,7 +15,7 @@
 @Data
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_post")
-public class SysPost extends BaseEntity {
+public class SysPost extends TenantEntity {
 
     /**
      * 宀椾綅搴忓彿
@@ -56,11 +47,5 @@
      * 澶囨敞
      */
     private String remark;
-
-    /**
-     * 鐢ㄦ埛鏄惁瀛樺湪姝ゅ矖浣嶆爣璇� 榛樿涓嶅瓨鍦�
-     */
-    @TableField(exist = false)
-    private boolean flag = false;
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java
index 5c557cc..f4d3f30 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRole.java
@@ -1,15 +1,12 @@
 package com.ruoyi.system.domain;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
-
-import java.util.Set;
 
 /**
  * 瑙掕壊琛� sys_role
@@ -21,7 +18,7 @@
 @NoArgsConstructor
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_role")
-public class SysRole extends BaseEntity {
+public class SysRole extends TenantEntity {
 
     /**
      * 瑙掕壊ID
@@ -74,30 +71,6 @@
      * 澶囨敞
      */
     private String remark;
-
-    /**
-     * 鐢ㄦ埛鏄惁瀛樺湪姝よ鑹叉爣璇� 榛樿涓嶅瓨鍦�
-     */
-    @TableField(exist = false)
-    private boolean flag = false;
-
-    /**
-     * 鑿滃崟缁�
-     */
-    @TableField(exist = false)
-    private Long[] menuIds;
-
-    /**
-     * 閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛�
-     */
-    @TableField(exist = false)
-    private Long[] deptIds;
-
-    /**
-     * 瑙掕壊鑿滃崟鏉冮檺
-     */
-    @TableField(exist = false)
-    private Set<String> permissions;
 
     public SysRole(Long roleId) {
         this.roleId = roleId;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenant.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenant.java
new file mode 100644
index 0000000..e65fdf5
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenant.java
@@ -0,0 +1,103 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.util.Date;
+
+/**
+ * 绉熸埛瀵硅薄 sys_tenant
+ *
+ * @author Michelle.Chung
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_tenant")
+public class SysTenant extends BaseEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
+     * 鑱旂郴浜�
+     */
+    private String contactUserName;
+
+    /**
+     * 鑱旂郴鐢佃瘽
+     */
+    private String contactPhone;
+
+    /**
+     * 浼佷笟鍚嶇О
+     */
+    private String companyName;
+
+    /**
+     * 缁熶竴绀句細淇$敤浠g爜
+     */
+    private String licenseNumber;
+
+    /**
+     * 鍦板潃
+     */
+    private String address;
+
+    /**
+     * 鍩熷悕
+     */
+    private String domain;
+
+    /**
+     * 浼佷笟绠�浠�
+     */
+    private String intro;
+
+    /**
+     * 澶囨敞
+     */
+    private String remark;
+
+    /**
+     * 绉熸埛濂楅缂栧彿
+     */
+    private Long packageId;
+
+    /**
+     * 杩囨湡鏃堕棿
+     */
+    private Date expireTime;
+
+    /**
+     * 鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級
+     */
+    private Long accountCount;
+
+    /**
+     * 绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�
+     */
+    private String status;
+
+    /**
+     * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�
+     */
+    @TableLogic
+    private String delFlag;
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenantPackage.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenantPackage.java
new file mode 100644
index 0000000..c8ceef6
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTenantPackage.java
@@ -0,0 +1,54 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import java.io.Serial;
+
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+
+/**
+ * 绉熸埛濂楅瀵硅薄 sys_tenant_package
+ *
+ * @author Michelle.Chung
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_tenant_package")
+public class SysTenantPackage extends BaseEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 绉熸埛濂楅id
+     */
+    @TableId(value = "package_id")
+    private Long packageId;
+    /**
+     * 濂楅鍚嶇О
+     */
+    private String packageName;
+    /**
+     * 鍏宠仈鑿滃崟id
+     */
+    private String menuIds;
+    /**
+     * 澶囨敞
+     */
+    private String remark;
+    /**
+     * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級
+     */
+    private Boolean menuCheckStrictly;
+    /**
+     * 鐘舵�侊紙0姝e父 1鍋滅敤锛�
+     */
+    private String status;
+    /**
+     * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�
+     */
+    @TableLogic
+    private String delFlag;
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java
index 0338b37..18e11c5 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java
@@ -2,7 +2,7 @@
 
 import com.baomidou.mybatisplus.annotation.*;
 import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
@@ -19,7 +19,7 @@
 @NoArgsConstructor
 @EqualsAndHashCode(callSuper = true)
 @TableName("sys_user")
-public class SysUser extends BaseEntity {
+public class SysUser extends TenantEntity {
 
     /**
      * 鐢ㄦ埛ID
@@ -108,7 +108,7 @@
         this.userId = userId;
     }
 
-    public boolean isAdmin() {
+    public boolean isSuperAdmin() {
         return UserConstants.SUPER_ADMIN_ID.equals(this.userId);
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java
index c66d066..11e9b06 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysDeptBo.java
@@ -2,7 +2,7 @@
 
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 import jakarta.validation.constraints.Email;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
@@ -18,13 +18,18 @@
 
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class SysDeptBo extends TreeEntity<SysDeptBo> {
+public class SysDeptBo extends BaseEntity {
 
     /**
      * 閮ㄩ棬id
      */
     @NotNull(message = "閮ㄩ棬id涓嶈兘涓虹┖", groups = { EditGroup.class })
     private Long deptId;
+
+    /**
+     * 鐖堕儴闂↖D
+     */
+    private Long parentId;
 
     /**
      * 閮ㄩ棬鍚嶇О
@@ -37,7 +42,7 @@
      * 鏄剧ず椤哄簭
      */
     @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖")
-    private Long orderNum;
+    private Integer orderNum;
 
     /**
      * 璐熻矗浜�
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysLogininforBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysLogininforBo.java
new file mode 100644
index 0000000..4bbd355
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysLogininforBo.java
@@ -0,0 +1,74 @@
+package com.ruoyi.system.domain.bo;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 绯荤粺璁块棶璁板綍涓氬姟瀵硅薄 sys_logininfor
+ *
+ * @author Michelle.Chung
+ */
+
+@Data
+public class SysLogininforBo {
+
+    /**
+     * 璁块棶ID
+     */
+    private Long infoId;
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
+     * 鐢ㄦ埛璐﹀彿
+     */
+    private String userName;
+
+    /**
+     * 鐧诲綍IP鍦板潃
+     */
+    private String ipaddr;
+
+    /**
+     * 鐧诲綍鍦扮偣
+     */
+    private String loginLocation;
+
+    /**
+     * 娴忚鍣ㄧ被鍨�
+     */
+    private String browser;
+
+    /**
+     * 鎿嶄綔绯荤粺
+     */
+    private String os;
+
+    /**
+     * 鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�
+     */
+    private String status;
+
+    /**
+     * 鎻愮ず娑堟伅
+     */
+    private String msg;
+
+    /**
+     * 璁块棶鏃堕棿
+     */
+    private Date loginTime;
+
+    /**
+     * 璇锋眰鍙傛暟
+     */
+    private Map<String, Object> params = new HashMap<>();
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java
index a8b1543..9090886 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysMenuBo.java
@@ -3,7 +3,7 @@
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
-import com.ruoyi.common.mybatis.core.domain.TreeEntity;
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import jakarta.validation.constraints.Size;
@@ -18,7 +18,7 @@
 
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class SysMenuBo extends TreeEntity<SysMenuBo> {
+public class SysMenuBo extends BaseEntity {
 
     /**
      * 鑿滃崟ID
@@ -27,6 +27,11 @@
     private Long menuId;
 
     /**
+     * 鐖惰彍鍗旾D
+     */
+    private Long parentId;
+
+    /**
      * 鑿滃崟鍚嶇О
      */
     @NotBlank(message = "鑿滃崟鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOperLogBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOperLogBo.java
new file mode 100644
index 0000000..443ff2b
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOperLogBo.java
@@ -0,0 +1,116 @@
+package com.ruoyi.system.domain.bo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 鎿嶄綔鏃ュ織璁板綍涓氬姟瀵硅薄 sys_oper_log
+ *
+ * @author Michelle.Chung
+ * @date 2023-02-07
+ */
+
+@Data
+public class SysOperLogBo {
+
+    /**
+     * 鏃ュ織涓婚敭
+     */
+    private Long operId;
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
+     * 妯″潡鏍囬
+     */
+    private String title;
+
+    /**
+     * 涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�
+     */
+    private Integer businessType;
+
+    /**
+     * 涓氬姟绫诲瀷鏁扮粍
+     */
+    private Integer[] businessTypes;
+
+    /**
+     * 鏂规硶鍚嶇О
+     */
+    private String method;
+
+    /**
+     * 璇锋眰鏂瑰紡
+     */
+    private String requestMethod;
+
+    /**
+     * 鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級
+     */
+    private Integer operatorType;
+
+    /**
+     * 鎿嶄綔浜哄憳
+     */
+    private String operName;
+
+    /**
+     * 閮ㄩ棬鍚嶇О
+     */
+    private String deptName;
+
+    /**
+     * 璇锋眰URL
+     */
+    private String operUrl;
+
+    /**
+     * 涓绘満鍦板潃
+     */
+    private String operIp;
+
+    /**
+     * 鎿嶄綔鍦扮偣
+     */
+    private String operLocation;
+
+    /**
+     * 璇锋眰鍙傛暟
+     */
+    private String operParam;
+
+    /**
+     * 杩斿洖鍙傛暟
+     */
+    private String jsonResult;
+
+    /**
+     * 鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�
+     */
+    private Integer status;
+
+    /**
+     * 閿欒娑堟伅
+     */
+    private String errorMsg;
+
+    /**
+     * 鎿嶄綔鏃堕棿
+     */
+    private Date operTime;
+
+    /**
+     * 璇锋眰鍙傛暟
+     */
+    @TableField(exist = false)
+    private Map<String, Object> params = new HashMap<>();
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssBo.java
index b0e49ff..c6e0581 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssBo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssBo.java
@@ -1,6 +1,7 @@
 package com.ruoyi.system.domain.bo;
 
 import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssConfigBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssConfigBo.java
index 50886f3..c089d9b 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssConfigBo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysOssConfigBo.java
@@ -3,6 +3,7 @@
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
 import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import jakarta.validation.constraints.Size;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java
index f0f96ad..2281539 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysPostBo.java
@@ -3,6 +3,7 @@
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
 import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import com.ruoyi.common.tenant.core.TenantEntity;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import jakarta.validation.constraints.Size;
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java
index 6459757..c9af4ed 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysRoleBo.java
@@ -3,11 +3,12 @@
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.validate.AddGroup;
 import com.ruoyi.common.core.validate.EditGroup;
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+import jakarta.validation.constraints.NotBlank;
+import jakarta.validation.constraints.NotNull;
+import jakarta.validation.constraints.Size;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import jakarta.validation.constraints.*;
-
-import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 import lombok.NoArgsConstructor;
 
 /**
@@ -72,11 +73,21 @@
      */
     private String remark;
 
+    /**
+     * 鑿滃崟缁�
+     */
+    private Long[] menuIds;
+
+    /**
+     * 閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛�
+     */
+    private Long[] deptIds;
+
     public SysRoleBo(Long roleId) {
         this.roleId = roleId;
     }
 
-    public boolean isAdmin() {
+    public boolean isSuperAdmin() {
         return UserConstants.SUPER_ADMIN_ID.equals(this.roleId);
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantBo.java
new file mode 100644
index 0000000..b9e97af
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantBo.java
@@ -0,0 +1,111 @@
+package com.ruoyi.system.domain.bo;
+
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+import java.util.Date;
+
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+
+/**
+ * 绉熸埛涓氬姟瀵硅薄 sys_tenant
+ *
+ * @author Michelle.Chung
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SysTenantBo extends BaseEntity {
+
+    /**
+     * id
+     */
+    @NotNull(message = "id涓嶈兘涓虹┖", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
+     * 鑱旂郴浜�
+     */
+    @NotBlank(message = "鑱旂郴浜轰笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class })
+    private String contactUserName;
+
+    /**
+     * 鑱旂郴鐢佃瘽
+     */
+    @NotBlank(message = "鑱旂郴鐢佃瘽涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String contactPhone;
+
+    /**
+     * 浼佷笟鍚嶇О
+     */
+    @NotBlank(message = "浼佷笟鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String companyName;
+
+    /**
+     * 鐢ㄦ埛鍚嶏紙鍒涘缓绯荤粺鐢ㄦ埛锛�
+     */
+    @NotBlank(message = "鐢ㄦ埛鍚嶄笉鑳戒负绌�", groups = { AddGroup.class })
+    private String username;
+
+    /**
+     * 瀵嗙爜锛堝垱寤虹郴缁熺敤鎴凤級
+     */
+    @NotBlank(message = "瀵嗙爜涓嶈兘涓虹┖", groups = { AddGroup.class })
+    private String password;
+
+    /**
+     * 缁熶竴绀句細淇$敤浠g爜
+     */
+    private String licenseNumber;
+
+    /**
+     * 鍦板潃
+     */
+    private String address;
+
+    /**
+     * 鍩熷悕
+     */
+    private String domain;
+
+    /**
+     * 浼佷笟绠�浠�
+     */
+    private String intro;
+
+    /**
+     * 澶囨敞
+     */
+    private String remark;
+
+    /**
+     * 绉熸埛濂楅缂栧彿
+     */
+    @NotNull(message = "绉熸埛濂楅涓嶈兘涓虹┖", groups = { AddGroup.class })
+    private Long packageId;
+
+    /**
+     * 杩囨湡鏃堕棿
+     */
+    private Date expireTime;
+
+    /**
+     * 鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級
+     */
+    private Long accountCount;
+
+    /**
+     * 绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�
+     */
+    private String status;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantPackageBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantPackageBo.java
new file mode 100644
index 0000000..b6a5989
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysTenantPackageBo.java
@@ -0,0 +1,54 @@
+package com.ruoyi.system.domain.bo;
+
+import com.ruoyi.common.core.validate.AddGroup;
+import com.ruoyi.common.core.validate.EditGroup;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+import com.ruoyi.common.mybatis.core.domain.BaseEntity;
+
+/**
+ * 绉熸埛濂楅涓氬姟瀵硅薄 sys_tenant_package
+ *
+ * @author Michelle.Chung
+ */
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SysTenantPackageBo extends BaseEntity {
+
+    /**
+     * 绉熸埛濂楅id
+     */
+    @NotNull(message = "绉熸埛濂楅id涓嶈兘涓虹┖", groups = { EditGroup.class })
+    private Long packageId;
+
+    /**
+     * 濂楅鍚嶇О
+     */
+    @NotBlank(message = "濂楅鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class })
+    private String packageName;
+
+    /**
+     * 鍏宠仈鑿滃崟id
+     */
+    private Long[] menuIds;
+
+    /**
+     * 澶囨敞
+     */
+    private String remark;
+
+    /**
+     * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�
+     */
+    private Boolean menuCheckStrictly;
+
+    /**
+     * 鐘舵�侊紙0姝e父 1鍋滅敤锛�
+     */
+    private String status;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java
index cd9dd40..b3a92b5 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/bo/SysUserBo.java
@@ -123,7 +123,7 @@
         this.userId = userId;
     }
 
-    public boolean isAdmin() {
+    public boolean isSuperAdmin() {
         return UserConstants.SUPER_ADMIN_ID.equals(this.userId);
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysDeptVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysDeptVo.java
index 3ecba62..8444444 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysDeptVo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysDeptVo.java
@@ -52,7 +52,7 @@
     /**
      * 鏄剧ず椤哄簭
      */
-    private Long orderNum;
+    private Integer orderNum;
 
     /**
      * 璐熻矗浜�
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysLogininforVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysLogininforVo.java
new file mode 100644
index 0000000..edd3fcc
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysLogininforVo.java
@@ -0,0 +1,90 @@
+package com.ruoyi.system.domain.vo;
+
+import java.util.Date;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.common.excel.annotation.ExcelDictFormat;
+import com.ruoyi.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+
+/**
+ * 绯荤粺璁块棶璁板綍瑙嗗浘瀵硅薄 sys_logininfor
+ *
+ * @author Michelle.Chung
+ * @date 2023-02-07
+ */
+@Data
+@ExcelIgnoreUnannotated
+public class SysLogininforVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 璁块棶ID
+     */
+    @ExcelProperty(value = "搴忓彿")
+    private Long infoId;
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
+     * 鐢ㄦ埛璐﹀彿
+     */
+    @ExcelProperty(value = "鐢ㄦ埛璐﹀彿")
+    private String userName;
+
+    /**
+     * 鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�
+     */
+    @ExcelProperty(value = "鐧诲綍鐘舵��", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_common_status")
+    private String status;
+
+    /**
+     * 鐧诲綍IP鍦板潃
+     */
+    @ExcelProperty(value = "鐧诲綍鍦板潃")
+    private String ipaddr;
+
+    /**
+     * 鐧诲綍鍦扮偣
+     */
+    @ExcelProperty(value = "鐧诲綍鍦扮偣")
+    private String loginLocation;
+
+    /**
+     * 娴忚鍣ㄧ被鍨�
+     */
+    @ExcelProperty(value = "娴忚鍣�")
+    private String browser;
+
+    /**
+     * 鎿嶄綔绯荤粺
+     */
+    @ExcelProperty(value = "鎿嶄綔绯荤粺")
+    private String os;
+
+
+    /**
+     * 鎻愮ず娑堟伅
+     */
+    @ExcelProperty(value = "鎻愮ず娑堟伅")
+    private String msg;
+
+    /**
+     * 璁块棶鏃堕棿
+     */
+    @ExcelProperty(value = "璁块棶鏃堕棿")
+    private Date loginTime;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysOperLogVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysOperLogVo.java
new file mode 100644
index 0000000..816198a
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysOperLogVo.java
@@ -0,0 +1,138 @@
+package com.ruoyi.system.domain.vo;
+
+import java.util.Date;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.common.excel.annotation.ExcelDictFormat;
+import com.ruoyi.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+/**
+ * 鎿嶄綔鏃ュ織璁板綍瑙嗗浘瀵硅薄 sys_oper_log
+ *
+ * @author Michelle.Chung
+ * @date 2023-02-07
+ */
+@Data
+@ExcelIgnoreUnannotated
+public class SysOperLogVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 鏃ュ織涓婚敭
+     */
+    @ExcelProperty(value = "鏃ュ織涓婚敭")
+    private Long operId;
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    private String tenantId;
+
+    /**
+     * 妯″潡鏍囬
+     */
+    @ExcelProperty(value = "鎿嶄綔妯″潡")
+    private String title;
+
+    /**
+     * 涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�
+     */
+    @ExcelProperty(value = "涓氬姟绫诲瀷", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_oper_type")
+    private Integer businessType;
+
+    /**
+     * 涓氬姟绫诲瀷鏁扮粍
+     */
+    private Integer[] businessTypes;
+
+    /**
+     * 鏂规硶鍚嶇О
+     */
+    @ExcelProperty(value = "璇锋眰鏂规硶")
+    private String method;
+
+    /**
+     * 璇锋眰鏂瑰紡
+     */
+    @ExcelProperty(value = "璇锋眰鏂瑰紡")
+    private String requestMethod;
+
+    /**
+     * 鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級
+     */
+    @ExcelProperty(value = "鎿嶄綔绫诲埆", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "0=鍏跺畠,1=鍚庡彴鐢ㄦ埛,2=鎵嬫満绔敤鎴�")
+    private Integer operatorType;
+
+    /**
+     * 鎿嶄綔浜哄憳
+     */
+    @ExcelProperty(value = "鎿嶄綔浜哄憳")
+    private String operName;
+
+    /**
+     * 閮ㄩ棬鍚嶇О
+     */
+    @ExcelProperty(value = "閮ㄩ棬鍚嶇О")
+    private String deptName;
+
+    /**
+     * 璇锋眰URL
+     */
+    @ExcelProperty(value = "璇锋眰鍦板潃")
+    private String operUrl;
+
+    /**
+     * 涓绘満鍦板潃
+     */
+    @ExcelProperty(value = "鎿嶄綔鍦板潃")
+    private String operIp;
+
+    /**
+     * 鎿嶄綔鍦扮偣
+     */
+    @ExcelProperty(value = "鎿嶄綔鍦扮偣")
+    private String operLocation;
+
+    /**
+     * 璇锋眰鍙傛暟
+     */
+    @ExcelProperty(value = "璇锋眰鍙傛暟")
+    private String operParam;
+
+    /**
+     * 杩斿洖鍙傛暟
+     */
+    @ExcelProperty(value = "杩斿洖鍙傛暟")
+    private String jsonResult;
+
+    /**
+     * 鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�
+     */
+    @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_common_status")
+    private Integer status;
+
+    /**
+     * 閿欒娑堟伅
+     */
+    @ExcelProperty(value = "閿欒娑堟伅")
+    private String errorMsg;
+
+    /**
+     * 鎿嶄綔鏃堕棿
+     */
+    @ExcelProperty(value = "鎿嶄綔鏃堕棿")
+    private Date operTime;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java
index 3e04142..0bc71f2 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysRoleVo.java
@@ -10,7 +10,6 @@
 import java.io.Serial;
 import java.io.Serializable;
 import java.util.Date;
-import java.util.Set;
 
 /**
  * 瑙掕壊淇℃伅瑙嗗浘瀵硅薄 sys_role
@@ -91,12 +90,7 @@
      */
     private boolean flag = false;
 
-    /**
-     * 瑙掕壊鑿滃崟鏉冮檺
-     */
-    private Set<String> permissions;
-
-    public boolean isAdmin() {
+    public boolean isSuperAdmin() {
         return UserConstants.SUPER_ADMIN_ID.equals(this.roleId);
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantPackageVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantPackageVo.java
new file mode 100644
index 0000000..d6888ba
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantPackageVo.java
@@ -0,0 +1,63 @@
+package com.ruoyi.system.domain.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.common.excel.annotation.ExcelDictFormat;
+import com.ruoyi.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+/**
+ * 绉熸埛濂楅瑙嗗浘瀵硅薄 sys_tenant_package
+ *
+ * @author Michelle.Chung
+ */
+@Data
+@ExcelIgnoreUnannotated
+public class SysTenantPackageVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 绉熸埛濂楅id
+     */
+    @ExcelProperty(value = "绉熸埛濂楅id")
+    private Long packageId;
+
+    /**
+     * 濂楅鍚嶇О
+     */
+    @ExcelProperty(value = "濂楅鍚嶇О")
+    private String packageName;
+
+    /**
+     * 鍏宠仈鑿滃崟id
+     */
+    @ExcelProperty(value = "鍏宠仈鑿滃崟id")
+    private String menuIds;
+
+    /**
+     * 澶囨敞
+     */
+    @ExcelProperty(value = "澶囨敞")
+    private String remark;
+
+    /**
+     * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�
+     */
+    @ExcelProperty(value = "鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�")
+    private Boolean menuCheckStrictly;
+
+    /**
+     * 鐘舵�侊紙0姝e父 1鍋滅敤锛�
+     */
+    @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "0=姝e父,1=鍋滅敤")
+    private String status;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantVo.java
new file mode 100644
index 0000000..51b573a
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysTenantVo.java
@@ -0,0 +1,112 @@
+package com.ruoyi.system.domain.vo;
+
+import java.util.Date;
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.ruoyi.common.excel.annotation.ExcelDictFormat;
+import com.ruoyi.common.excel.convert.ExcelDictConvert;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+
+/**
+ * 绉熸埛瑙嗗浘瀵硅薄 sys_tenant
+ *
+ * @author Michelle.Chung
+ */
+@Data
+@ExcelIgnoreUnannotated
+public class SysTenantVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    @ExcelProperty(value = "id")
+    private Long id;
+
+    /**
+     * 绉熸埛缂栧彿
+     */
+    @ExcelProperty(value = "绉熸埛缂栧彿")
+    private String tenantId;
+
+    /**
+     * 鑱旂郴浜�
+     */
+    @ExcelProperty(value = "鑱旂郴浜�")
+    private String contactUserName;
+
+    /**
+     * 鑱旂郴鐢佃瘽
+     */
+    @ExcelProperty(value = "鑱旂郴鐢佃瘽")
+    private String contactPhone;
+
+    /**
+     * 浼佷笟鍚嶇О
+     */
+    @ExcelProperty(value = "浼佷笟鍚嶇О")
+    private String companyName;
+
+    /**
+     * 缁熶竴绀句細淇$敤浠g爜
+     */
+    @ExcelProperty(value = "缁熶竴绀句細淇$敤浠g爜")
+    private String licenseNumber;
+
+    /**
+     * 鍦板潃
+     */
+    @ExcelProperty(value = "鍦板潃")
+    private String address;
+
+    /**
+     * 鍩熷悕
+     */
+    @ExcelProperty(value = "鍩熷悕")
+    private String domain;
+
+    /**
+     * 浼佷笟绠�浠�
+     */
+    @ExcelProperty(value = "浼佷笟绠�浠�")
+    private String intro;
+
+    /**
+     * 澶囨敞
+     */
+    @ExcelProperty(value = "澶囨敞")
+    private String remark;
+
+    /**
+     * 绉熸埛濂楅缂栧彿
+     */
+    @ExcelProperty(value = "绉熸埛濂楅缂栧彿")
+    private Long packageId;
+
+    /**
+     * 杩囨湡鏃堕棿
+     */
+    @ExcelProperty(value = "杩囨湡鏃堕棿")
+    private Date expireTime;
+
+    /**
+     * 鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級
+     */
+    @ExcelProperty(value = "鐢ㄦ埛鏁伴噺")
+    private Long accountCount;
+
+    /**
+     * 绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�
+     */
+    @ExcelProperty(value = "绉熸埛鐘舵��", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "0=姝e父,1=鍋滅敤")
+    private String status;
+
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysUserVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysUserVo.java
index 90849b1..0de88f9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysUserVo.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SysUserVo.java
@@ -1,6 +1,5 @@
 package com.ruoyi.system.domain.vo;
 
-import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.translation.annotation.Translation;
 import com.ruoyi.common.translation.constant.TransConstant;
 import lombok.Data;
@@ -26,6 +25,11 @@
      * 鐢ㄦ埛ID
      */
     private Long userId;
+
+    /**
+     * 绉熸埛ID
+     */
+    private String tenantId;
 
     /**
      * 閮ㄩ棬ID
@@ -122,9 +126,5 @@
      * 鏁版嵁鏉冮檺 褰撳墠瑙掕壊ID
      */
     private Long roleId;
-
-    public boolean isAdmin() {
-        return UserConstants.SUPER_ADMIN_ID.equals(this.userId);
-    }
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
index 06c6eff..d21ef87 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java
@@ -2,12 +2,13 @@
 
 import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 import com.ruoyi.system.domain.SysLogininfor;
+import com.ruoyi.system.domain.vo.SysLogininforVo;
 
 /**
  * 绯荤粺璁块棶鏃ュ織鎯呭喌淇℃伅 鏁版嵁灞�
  *
  * @author Lion Li
  */
-public interface SysLogininforMapper extends BaseMapperPlus<SysLogininforMapper, SysLogininfor, SysLogininfor> {
+public interface SysLogininforMapper extends BaseMapperPlus<SysLogininforMapper, SysLogininfor, SysLogininforVo> {
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
index ae719ea..81ea1df 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java
@@ -2,12 +2,13 @@
 
 import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 import com.ruoyi.system.domain.SysOperLog;
+import com.ruoyi.system.domain.vo.SysOperLogVo;
 
 /**
  * 鎿嶄綔鏃ュ織 鏁版嵁灞�
  *
  * @author Lion Li
  */
-public interface SysOperLogMapper extends BaseMapperPlus<SysOperLogMapper, SysOperLog, SysOperLog> {
+public interface SysOperLogMapper extends BaseMapperPlus<SysOperLogMapper, SysOperLog, SysOperLogVo> {
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantMapper.java
new file mode 100644
index 0000000..cc1e54f
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantMapper.java
@@ -0,0 +1,14 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.SysTenant;
+import com.ruoyi.system.domain.vo.SysTenantVo;
+import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 绉熸埛Mapper鎺ュ彛
+ *
+ * @author Michelle.Chung
+ */
+public interface SysTenantMapper extends BaseMapperPlus<SysTenantMapper, SysTenant, SysTenantVo> {
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantPackageMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantPackageMapper.java
new file mode 100644
index 0000000..2f5731e
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTenantPackageMapper.java
@@ -0,0 +1,14 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
+import com.ruoyi.system.domain.SysTenantPackage;
+import com.ruoyi.system.domain.vo.SysTenantPackageVo;
+
+/**
+ * 绉熸埛濂楅Mapper鎺ュ彛
+ *
+ * @author Michelle.Chung
+ */
+public interface SysTenantPackageMapper extends BaseMapperPlus<SysTenantPackageMapper, SysTenantPackage, SysTenantPackageVo> {
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/runner/SystemApplicationRunner.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/runner/SystemApplicationRunner.java
index 36ed651..e44cf87 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/runner/SystemApplicationRunner.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/runner/SystemApplicationRunner.java
@@ -1,8 +1,5 @@
 package com.ruoyi.system.runner;
 
-import com.ruoyi.common.core.config.RuoYiConfig;
-import com.ruoyi.system.service.ISysConfigService;
-import com.ruoyi.system.service.ISysDictTypeService;
 import com.ruoyi.system.service.ISysOssConfigService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -20,22 +17,12 @@
 @Component
 public class SystemApplicationRunner implements ApplicationRunner {
 
-    private final RuoYiConfig ruoyiConfig;
-    private final ISysConfigService configService;
-    private final ISysDictTypeService dictTypeService;
     private final ISysOssConfigService ossConfigService;
 
     @Override
     public void run(ApplicationArguments args) throws Exception {
         ossConfigService.init();
         log.info("鍒濆鍖朞SS閰嶇疆鎴愬姛");
-        if (ruoyiConfig.isCacheLazy()) {
-            return;
-        }
-        configService.loadingConfigCache();
-        log.info("鍔犺浇鍙傛暟缂撳瓨鏁版嵁鎴愬姛");
-        dictTypeService.loadingDictCache();
-        log.info("鍔犺浇瀛楀吀缂撳瓨鏁版嵁鎴愬姛");
     }
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
index a998500..af2ba2a 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
@@ -72,16 +72,6 @@
     void deleteConfigByIds(Long[] configIds);
 
     /**
-     * 鍔犺浇鍙傛暟缂撳瓨鏁版嵁
-     */
-    void loadingConfigCache();
-
-    /**
-     * 娓呯┖鍙傛暟缂撳瓨鏁版嵁
-     */
-    void clearConfigCache();
-
-    /**
      * 閲嶇疆鍙傛暟缂撳瓨鏁版嵁
      */
     void resetConfigCache();
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
index 546e1bf..e51c33e 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java
@@ -65,16 +65,6 @@
     void deleteDictTypeByIds(Long[] dictIds);
 
     /**
-     * 鍔犺浇瀛楀吀缂撳瓨鏁版嵁
-     */
-    void loadingDictCache();
-
-    /**
-     * 娓呯┖瀛楀吀缂撳瓨鏁版嵁
-     */
-    void clearDictCache();
-
-    /**
      * 閲嶇疆瀛楀吀缂撳瓨鏁版嵁
      */
     void resetDictCache();
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java
index d67dfe4..4c5efc1 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java
@@ -2,7 +2,8 @@
 
 import com.ruoyi.common.mybatis.core.page.PageQuery;
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
-import com.ruoyi.system.domain.SysLogininfor;
+import com.ruoyi.system.domain.bo.SysLogininforBo;
+import com.ruoyi.system.domain.vo.SysLogininforVo;
 
 import java.util.List;
 
@@ -14,14 +15,14 @@
 public interface ISysLogininforService {
 
 
-    TableDataInfo<SysLogininfor> selectPageLogininforList(SysLogininfor logininfor, PageQuery pageQuery);
+    TableDataInfo<SysLogininforVo> selectPageLogininforList(SysLogininforBo logininfor, PageQuery pageQuery);
 
     /**
      * 鏂板绯荤粺鐧诲綍鏃ュ織
      *
-     * @param logininfor 璁块棶鏃ュ織瀵硅薄
+     * @param bo 璁块棶鏃ュ織瀵硅薄
      */
-    void insertLogininfor(SysLogininfor logininfor);
+    void insertLogininfor(SysLogininforBo bo);
 
     /**
      * 鏌ヨ绯荤粺鐧诲綍鏃ュ織闆嗗悎
@@ -29,7 +30,7 @@
      * @param logininfor 璁块棶鏃ュ織瀵硅薄
      * @return 鐧诲綍璁板綍闆嗗悎
      */
-    List<SysLogininfor> selectLogininforList(SysLogininfor logininfor);
+    List<SysLogininforVo> selectLogininforList(SysLogininforBo logininfor);
 
     /**
      * 鎵归噺鍒犻櫎绯荤粺鐧诲綍鏃ュ織
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
index 1a97b27..4ca909c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java
@@ -66,6 +66,14 @@
     List<Long> selectMenuListByRoleId(Long roleId);
 
     /**
+     * 鏍规嵁绉熸埛濂楅ID鏌ヨ鑿滃崟鏍戜俊鎭�
+     *
+     * @param packageId 绉熸埛濂楅ID
+     * @return 閫変腑鑿滃崟鍒楄〃
+     */
+    List<Long> selectMenuListByPackageId(Long packageId);
+
+    /**
      * 鏋勫缓鍓嶇璺敱鎵�闇�瑕佺殑鑿滃崟
      *
      * @param menus 鑿滃崟鍒楄〃
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java
index 72e4fe5..edce3a6 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java
@@ -2,7 +2,8 @@
 
 import com.ruoyi.common.mybatis.core.page.PageQuery;
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
-import com.ruoyi.system.domain.SysOperLog;
+import com.ruoyi.system.domain.bo.SysOperLogBo;
+import com.ruoyi.system.domain.vo.SysOperLogVo;
 
 import java.util.List;
 
@@ -13,14 +14,14 @@
  */
 public interface ISysOperLogService {
 
-    TableDataInfo<SysOperLog> selectPageOperLogList(SysOperLog operLog, PageQuery pageQuery);
+    TableDataInfo<SysOperLogVo> selectPageOperLogList(SysOperLogBo operLog, PageQuery pageQuery);
 
     /**
      * 鏂板鎿嶄綔鏃ュ織
      *
-     * @param operLog 鎿嶄綔鏃ュ織瀵硅薄
+     * @param bo 鎿嶄綔鏃ュ織瀵硅薄
      */
-    void insertOperlog(SysOperLog operLog);
+    void insertOperlog(SysOperLogBo bo);
 
     /**
      * 鏌ヨ绯荤粺鎿嶄綔鏃ュ織闆嗗悎
@@ -28,7 +29,7 @@
      * @param operLog 鎿嶄綔鏃ュ織瀵硅薄
      * @return 鎿嶄綔鏃ュ織闆嗗悎
      */
-    List<SysOperLog> selectOperLogList(SysOperLog operLog);
+    List<SysOperLogVo> selectOperLogList(SysOperLogBo operLog);
 
     /**
      * 鎵归噺鍒犻櫎绯荤粺鎿嶄綔鏃ュ織
@@ -44,7 +45,7 @@
      * @param operId 鎿嶄綔ID
      * @return 鎿嶄綔鏃ュ織瀵硅薄
      */
-    SysOperLog selectOperLogById(Long operId);
+    SysOperLogVo selectOperLogById(Long operId);
 
     /**
      * 娓呯┖鎿嶄綔鏃ュ織
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPermissionService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPermissionService.java
new file mode 100644
index 0000000..1e6d2d1
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPermissionService.java
@@ -0,0 +1,28 @@
+package com.ruoyi.system.service;
+
+import java.util.Set;
+
+/**
+ * 鐢ㄦ埛鏉冮檺澶勭悊
+ *
+ * @author Lion Li
+ */
+public interface ISysPermissionService {
+
+    /**
+     * 鑾峰彇瑙掕壊鏁版嵁鏉冮檺
+     *
+     * @param userId  鐢ㄦ埛id
+     * @return 瑙掕壊鏉冮檺淇℃伅
+     */
+    Set<String> getRolePermission(Long userId);
+
+    /**
+     * 鑾峰彇鑿滃崟鏁版嵁鏉冮檺
+     *
+     * @param userId  鐢ㄦ埛id
+     * @return 鑿滃崟鏉冮檺淇℃伅
+     */
+    Set<String> getMenuPermission(Long userId);
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantPackageService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantPackageService.java
new file mode 100644
index 0000000..629e893
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantPackageService.java
@@ -0,0 +1,52 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.vo.SysTenantPackageVo;
+import com.ruoyi.system.domain.bo.SysTenantPackageBo;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 绉熸埛濂楅Service鎺ュ彛
+ *
+ * @author Michelle.Chung
+ */
+public interface ISysTenantPackageService {
+
+    /**
+     * 鏌ヨ绉熸埛濂楅
+     */
+    SysTenantPackageVo queryById(Long packageId);
+
+    /**
+     * 鏌ヨ绉熸埛濂楅鍒楄〃
+     */
+    TableDataInfo<SysTenantPackageVo> queryPageList(SysTenantPackageBo bo, PageQuery pageQuery);
+
+    /**
+     * 鏌ヨ绉熸埛濂楅鍒楄〃
+     */
+    List<SysTenantPackageVo> queryList(SysTenantPackageBo bo);
+
+    /**
+     * 鏂板绉熸埛濂楅
+     */
+    Boolean insertByBo(SysTenantPackageBo bo);
+
+    /**
+     * 淇敼绉熸埛濂楅
+     */
+    Boolean updateByBo(SysTenantPackageBo bo);
+
+    /**
+     * 淇敼濂楅鐘舵��
+     */
+    int updatePackageStatus(SysTenantPackageBo bo);
+
+    /**
+     * 鏍¢獙骞舵壒閲忓垹闄ょ鎴峰椁愪俊鎭�
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantService.java
new file mode 100644
index 0000000..ee70725
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysTenantService.java
@@ -0,0 +1,72 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.vo.SysTenantVo;
+import com.ruoyi.system.domain.bo.SysTenantBo;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 绉熸埛Service鎺ュ彛
+ *
+ * @author Michelle.Chung
+ */
+public interface ISysTenantService {
+
+    /**
+     * 鏌ヨ绉熸埛
+     */
+    SysTenantVo queryById(Long id);
+
+    /**
+     * 鍩轰簬绉熸埛ID鏌ヨ绉熸埛
+     */
+    SysTenantVo queryByTenantId(String tenantId);
+
+    /**
+     * 鏌ヨ绉熸埛鍒楄〃
+     */
+    TableDataInfo<SysTenantVo> queryPageList(SysTenantBo bo, PageQuery pageQuery);
+
+    /**
+     * 鏌ヨ绉熸埛鍒楄〃
+     */
+    List<SysTenantVo> queryList(SysTenantBo bo);
+
+    /**
+     * 鏂板绉熸埛
+     */
+    Boolean insertByBo(SysTenantBo bo);
+
+    /**
+     * 淇敼绉熸埛
+     */
+    Boolean updateByBo(SysTenantBo bo);
+
+    /**
+     * 淇敼绉熸埛鐘舵��
+     */
+    int updateTenantStatus(SysTenantBo bo);
+
+    /**
+     * 鏍¢獙骞舵壒閲忓垹闄ょ鎴蜂俊鎭�
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    /**
+     * 鏍¢獙浼佷笟鍚嶇О鏄惁鍞竴
+     */
+    String checkCompanyNameUnique(SysTenantBo bo);
+
+    /**
+     * 鏍¢獙璐﹀彿浣欓
+     */
+    String checkAccountBalance(String tenantId);
+
+    /**
+     * 鏍¢獙鏈夋晥鏈�
+     */
+    String checkExpireTime(String tenantId);
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
index dd9bccc..b4b4489 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
@@ -133,7 +133,7 @@
      * @param user 鐢ㄦ埛淇℃伅
      * @return 缁撴灉
      */
-    boolean registerUser(SysUserBo user);
+    boolean registerUser(SysUserBo user, String tenantId);
 
     /**
      * 淇敼鐢ㄦ埛淇℃伅
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysPermissionService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysPermissionService.java
deleted file mode 100644
index c457bc0..0000000
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/SysPermissionService.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.ruoyi.system.service;
-
-import cn.hutool.core.collection.CollUtil;
-import com.ruoyi.system.domain.vo.SysRoleVo;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * 鐢ㄦ埛鏉冮檺澶勭悊
- *
- * @author ruoyi
- */
-@RequiredArgsConstructor
-@Service
-public class SysPermissionService {
-
-    private final ISysRoleService roleService;
-    private final ISysMenuService menuService;
-
-    /**
-     * 鑾峰彇瑙掕壊鏁版嵁鏉冮檺
-     *
-     * @param userId  鐢ㄦ埛id
-     * @param isAdmin 鏄惁绠$悊鍛�
-     * @return 瑙掕壊鏉冮檺淇℃伅
-     */
-    public Set<String> getRolePermission(Long userId, boolean isAdmin) {
-        Set<String> roles = new HashSet<>();
-        // 绠$悊鍛樻嫢鏈夋墍鏈夋潈闄�
-        if (isAdmin) {
-            roles.add("admin");
-        } else {
-            roles.addAll(roleService.selectRolePermissionByUserId(userId));
-        }
-        return roles;
-    }
-
-    /**
-     * 鑾峰彇鑿滃崟鏁版嵁鏉冮檺
-     *
-     * @param userId  鐢ㄦ埛id
-     * @param isAdmin 鏄惁绠$悊鍛�
-     * @return 鑿滃崟鏉冮檺淇℃伅
-     */
-    public Set<String> getMenuPermission(Long userId, boolean isAdmin) {
-        Set<String> perms = new HashSet<>();
-        // 绠$悊鍛樻嫢鏈夋墍鏈夋潈闄�
-        if (isAdmin) {
-            perms.add("*:*:*");
-        } else {
-            List<SysRoleVo> roles = roleService.selectRolesByUserId(userId);
-            if (CollUtil.isNotEmpty(roles)) {
-                // 澶氳鑹茶缃畃ermissions灞炴�э紝浠ヤ究鏁版嵁鏉冮檺鍖归厤鏉冮檺
-                for (SysRoleVo role : roles) {
-                    Set<String> rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId());
-                    role.setPermissions(rolePerms);
-                    perms.addAll(rolePerms);
-                }
-            } else {
-                perms.addAll(menuService.selectMenuPermsByUserId(userId));
-            }
-        }
-        return perms;
-    }
-}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
index 3104e15..c70aa22 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
@@ -9,13 +9,13 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.core.constant.CacheNames;
 import com.ruoyi.common.core.constant.UserConstants;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.service.ConfigService;
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.mybatis.core.page.PageQuery;
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
-import com.ruoyi.common.core.service.ConfigService;
-import com.ruoyi.common.core.exception.ServiceException;
-import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.redis.utils.CacheUtils;
-import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.system.domain.SysConfig;
 import com.ruoyi.system.domain.bo.SysConfigBo;
 import com.ruoyi.system.domain.vo.SysConfigVo;
@@ -176,30 +176,11 @@
     }
 
     /**
-     * 鍔犺浇鍙傛暟缂撳瓨鏁版嵁
-     */
-    @Override
-    public void loadingConfigCache() {
-        List<SysConfigVo> configsList = selectConfigList(new SysConfigBo());
-        configsList.forEach(config ->
-            CacheUtils.put(CacheNames.SYS_CONFIG, config.getConfigKey(), config.getConfigValue()));
-    }
-
-    /**
-     * 娓呯┖鍙傛暟缂撳瓨鏁版嵁
-     */
-    @Override
-    public void clearConfigCache() {
-        CacheUtils.clear(CacheNames.SYS_CONFIG);
-    }
-
-    /**
      * 閲嶇疆鍙傛暟缂撳瓨鏁版嵁
      */
     @Override
     public void resetConfigCache() {
-        clearConfigCache();
-        loadingConfigCache();
+        CacheUtils.clear(CacheNames.SYS_CONFIG);
     }
 
     /**
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
index 453d98f..fda7f62 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java
@@ -142,13 +142,13 @@
     @Override
     public String selectDeptNameByIds(String deptIds) {
         List<String> list = new ArrayList<>();
-        for (Long id : Arrays.stream(deptIds.split(",")).map(Long::parseLong).toList()) {
+        for (Long id : StringUtils.splitTo(deptIds, Convert::toLong)) {
             SysDeptVo vo = SpringUtils.getAopProxy(this).selectDeptById(id);
             if (ObjectUtil.isNotNull(vo)) {
                 list.add(vo.getDeptName());
             }
         }
-        return String.join(",", list);
+        return String.join(StringUtils.SEPARATOR, list);
     }
 
     /**
@@ -213,7 +213,7 @@
      */
     @Override
     public void checkDeptDataScope(Long deptId) {
-        if (!LoginHelper.isAdmin()) {
+        if (!LoginHelper.isSuperAdmin()) {
             SysDeptBo dept = new SysDeptBo();
             dept.setDeptId(deptId);
             List<SysDeptVo> depts = this.selectDeptList(dept);
@@ -237,7 +237,7 @@
             throw new ServiceException("閮ㄩ棬鍋滅敤锛屼笉鍏佽鏂板");
         }
         SysDept dept = BeanUtil.toBean(bo, SysDept.class);
-        dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
+        dept.setAncestors(info.getAncestors() + StringUtils.SEPARATOR + dept.getParentId());
         return baseMapper.insert(dept);
     }
 
@@ -254,7 +254,7 @@
         SysDept newParentDept = baseMapper.selectById(dept.getParentId());
         SysDept oldDept = baseMapper.selectById(dept.getDeptId());
         if (ObjectUtil.isNotNull(newParentDept) && ObjectUtil.isNotNull(oldDept)) {
-            String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId();
+            String newAncestors = newParentDept.getAncestors() + StringUtils.SEPARATOR + newParentDept.getDeptId();
             String oldAncestors = oldDept.getAncestors();
             dept.setAncestors(newAncestors);
             updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
index aae3159..8fb48f9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java
@@ -11,16 +11,16 @@
 import com.ruoyi.common.core.constant.CacheConstants;
 import com.ruoyi.common.core.constant.CacheNames;
 import com.ruoyi.common.core.constant.UserConstants;
-import com.ruoyi.common.mybatis.core.page.PageQuery;
-import com.ruoyi.common.core.service.DictService;
-import com.ruoyi.system.domain.SysDictData;
-import com.ruoyi.system.domain.SysDictType;
-import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.service.DictService;
+import com.ruoyi.common.core.utils.SpringUtils;
 import com.ruoyi.common.core.utils.StreamUtils;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 import com.ruoyi.common.redis.utils.CacheUtils;
-import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.system.domain.SysDictData;
+import com.ruoyi.system.domain.SysDictType;
 import com.ruoyi.system.domain.bo.SysDictTypeBo;
 import com.ruoyi.system.domain.vo.SysDictDataVo;
 import com.ruoyi.system.domain.vo.SysDictTypeVo;
@@ -33,7 +33,10 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -146,34 +149,11 @@
     }
 
     /**
-     * 鍔犺浇瀛楀吀缂撳瓨鏁版嵁
-     */
-    @Override
-    public void loadingDictCache() {
-        List<SysDictDataVo> dictDataList = dictDataMapper.selectVoList(
-            new LambdaQueryWrapper<SysDictData>().eq(SysDictData::getStatus, UserConstants.DICT_NORMAL));
-        Map<String, List<SysDictDataVo>> dictDataMap = StreamUtils.groupByKey(dictDataList, SysDictDataVo::getDictType);
-        dictDataMap.forEach((k,v) -> {
-            List<SysDictDataVo> dictList = StreamUtils.sorted(v, Comparator.comparing(SysDictDataVo::getDictSort));
-            CacheUtils.put(CacheNames.SYS_DICT, k, dictList);
-        });
-    }
-
-    /**
-     * 娓呯┖瀛楀吀缂撳瓨鏁版嵁
-     */
-    @Override
-    public void clearDictCache() {
-        CacheUtils.clear(CacheNames.SYS_DICT);
-    }
-
-    /**
      * 閲嶇疆瀛楀吀缂撳瓨鏁版嵁
      */
     @Override
     public void resetDictCache() {
-        clearDictCache();
-        loadingDictCache();
+        CacheUtils.clear(CacheNames.SYS_DICT);
     }
 
     /**
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java
index 492dd1c..c830662 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java
@@ -1,5 +1,6 @@
 package com.ruoyi.system.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.http.useragent.UserAgent;
 import cn.hutool.http.useragent.UserAgentUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -12,6 +13,8 @@
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.utils.ip.AddressUtils;
 import com.ruoyi.system.domain.SysLogininfor;
+import com.ruoyi.system.domain.bo.SysLogininforBo;
+import com.ruoyi.system.domain.vo.SysLogininforVo;
 import com.ruoyi.system.mapper.SysLogininforMapper;
 import com.ruoyi.system.service.ISysLogininforService;
 import lombok.RequiredArgsConstructor;
@@ -64,7 +67,8 @@
         // 鑾峰彇瀹㈡埛绔祻瑙堝櫒
         String browser = userAgent.getBrowser().getName();
         // 灏佽瀵硅薄
-        SysLogininfor logininfor = new SysLogininfor();
+        SysLogininforBo logininfor = new SysLogininforBo();
+        logininfor.setTenantId(logininforEvent.getTenantId());
         logininfor.setUserName(logininforEvent.getUsername());
         logininfor.setIpaddr(ip);
         logininfor.setLoginLocation(address);
@@ -89,7 +93,7 @@
     }
 
     @Override
-    public TableDataInfo<SysLogininfor> selectPageLogininforList(SysLogininfor logininfor, PageQuery pageQuery) {
+    public TableDataInfo<SysLogininforVo> selectPageLogininforList(SysLogininforBo logininfor, PageQuery pageQuery) {
         Map<String, Object> params = logininfor.getParams();
         LambdaQueryWrapper<SysLogininfor> lqw = new LambdaQueryWrapper<SysLogininfor>()
             .like(StringUtils.isNotBlank(logininfor.getIpaddr()), SysLogininfor::getIpaddr, logininfor.getIpaddr())
@@ -101,17 +105,18 @@
             pageQuery.setOrderByColumn("info_id");
             pageQuery.setIsAsc("desc");
         }
-        Page<SysLogininfor> page = baseMapper.selectPage(pageQuery.build(), lqw);
+        Page<SysLogininforVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
         return TableDataInfo.build(page);
     }
 
     /**
      * 鏂板绯荤粺鐧诲綍鏃ュ織
      *
-     * @param logininfor 璁块棶鏃ュ織瀵硅薄
+     * @param bo 璁块棶鏃ュ織瀵硅薄
      */
     @Override
-    public void insertLogininfor(SysLogininfor logininfor) {
+    public void insertLogininfor(SysLogininforBo bo) {
+        SysLogininfor logininfor = BeanUtil.toBean(bo, SysLogininfor.class);
         logininfor.setLoginTime(new Date());
         baseMapper.insert(logininfor);
     }
@@ -123,9 +128,9 @@
      * @return 鐧诲綍璁板綍闆嗗悎
      */
     @Override
-    public List<SysLogininfor> selectLogininforList(SysLogininfor logininfor) {
+    public List<SysLogininforVo> selectLogininforList(SysLogininforBo logininfor) {
         Map<String, Object> params = logininfor.getParams();
-        return baseMapper.selectList(new LambdaQueryWrapper<SysLogininfor>()
+        return baseMapper.selectVoList(new LambdaQueryWrapper<SysLogininfor>()
             .like(StringUtils.isNotBlank(logininfor.getIpaddr()), SysLogininfor::getIpaddr, logininfor.getIpaddr())
             .eq(StringUtils.isNotBlank(logininfor.getStatus()), SysLogininfor::getStatus, logininfor.getStatus())
             .like(StringUtils.isNotBlank(logininfor.getUserName()), SysLogininfor::getUserName, logininfor.getUserName())
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
index ca94151..29cdcb5 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
@@ -2,6 +2,7 @@
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.convert.Convert;
 import cn.hutool.core.lang.tree.Tree;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -16,6 +17,7 @@
 import com.ruoyi.system.domain.SysMenu;
 import com.ruoyi.system.domain.SysRole;
 import com.ruoyi.system.domain.SysRoleMenu;
+import com.ruoyi.system.domain.SysTenantPackage;
 import com.ruoyi.system.domain.bo.SysMenuBo;
 import com.ruoyi.system.domain.vo.MetaVo;
 import com.ruoyi.system.domain.vo.RouterVo;
@@ -23,6 +25,7 @@
 import com.ruoyi.system.mapper.SysMenuMapper;
 import com.ruoyi.system.mapper.SysRoleMapper;
 import com.ruoyi.system.mapper.SysRoleMenuMapper;
+import com.ruoyi.system.mapper.SysTenantPackageMapper;
 import com.ruoyi.system.service.ISysMenuService;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
@@ -41,6 +44,7 @@
     private final SysMenuMapper baseMapper;
     private final SysRoleMapper roleMapper;
     private final SysRoleMenuMapper roleMenuMapper;
+    private final SysTenantPackageMapper sysTenantPackageMapper;
 
     /**
      * 鏍规嵁鐢ㄦ埛鏌ヨ绯荤粺鑿滃崟鍒楄〃
@@ -63,7 +67,7 @@
     public List<SysMenuVo> selectMenuList(SysMenuBo menu, Long userId) {
         List<SysMenuVo> menuList;
         // 绠$悊鍛樻樉绀烘墍鏈夎彍鍗曚俊鎭�
-        if (LoginHelper.isAdmin(userId)) {
+        if (LoginHelper.isSuperAdmin(userId)) {
             menuList = baseMapper.selectVoList(new LambdaQueryWrapper<SysMenu>()
                 .like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName())
                 .eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible())
@@ -96,7 +100,7 @@
         Set<String> permsSet = new HashSet<>();
         for (String perm : perms) {
             if (StringUtils.isNotEmpty(perm)) {
-                permsSet.addAll(Arrays.asList(perm.trim().split(",")));
+                permsSet.addAll(StringUtils.splitList(perm.trim()));
             }
         }
         return permsSet;
@@ -114,7 +118,7 @@
         Set<String> permsSet = new HashSet<>();
         for (String perm : perms) {
             if (StringUtils.isNotEmpty(perm)) {
-                permsSet.addAll(Arrays.asList(perm.trim().split(",")));
+                permsSet.addAll(StringUtils.splitList(perm.trim()));
             }
         }
         return permsSet;
@@ -129,7 +133,7 @@
     @Override
     public List<SysMenu> selectMenuTreeByUserId(Long userId) {
         List<SysMenu> menus;
-        if (LoginHelper.isAdmin(userId)) {
+        if (LoginHelper.isSuperAdmin(userId)) {
             menus = baseMapper.selectMenuTreeAll();
         } else {
             menus = baseMapper.selectMenuTreeByUserId(userId);
@@ -150,6 +154,30 @@
     }
 
     /**
+     * 鏍规嵁绉熸埛濂楅ID鏌ヨ鑿滃崟鏍戜俊鎭�
+     *
+     * @param packageId 绉熸埛濂楅ID
+     * @return 閫変腑鑿滃崟鍒楄〃
+     */
+    @Override
+    public List<Long> selectMenuListByPackageId(Long packageId) {
+        SysTenantPackage tenantPackage = sysTenantPackageMapper.selectById(packageId);
+        List<Long> menuIds = StringUtils.splitTo(tenantPackage.getMenuIds(), Convert::toLong);
+        if (CollUtil.isEmpty(menuIds)) {
+            return List.of();
+        }
+        List<Long> parentIds = null;
+        if (tenantPackage.getMenuCheckStrictly()) {
+            parentIds = baseMapper.selectObjs(new LambdaQueryWrapper<SysMenu>()
+                .select(SysMenu::getParentId)
+                .in(SysMenu::getMenuId, menuIds), Convert::toLong);
+        }
+        return baseMapper.selectObjs(new LambdaQueryWrapper<SysMenu>()
+            .in(SysMenu::getMenuId, menuIds)
+            .notIn(CollUtil.isNotEmpty(parentIds), SysMenu::getMenuId, parentIds), Convert::toLong);
+    }
+
+    /**
      * 鏋勫缓鍓嶇璺敱鎵�闇�瑕佺殑鑿滃崟
      *
      * @param menus 鑿滃崟鍒楄〃
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java
index 2d89d77..671a350 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java
@@ -10,6 +10,8 @@
 import com.ruoyi.common.core.utils.ip.AddressUtils;
 import com.ruoyi.common.log.event.OperLogEvent;
 import com.ruoyi.system.domain.SysOperLog;
+import com.ruoyi.system.domain.bo.SysOperLogBo;
+import com.ruoyi.system.domain.vo.SysOperLogVo;
 import com.ruoyi.system.mapper.SysOperLogMapper;
 import com.ruoyi.system.service.ISysOperLogService;
 import lombok.RequiredArgsConstructor;
@@ -41,14 +43,14 @@
     @Async
     @EventListener
     public void recordOper(OperLogEvent operLogEvent) {
-        SysOperLog operLog = BeanUtil.toBean(operLogEvent, SysOperLog.class);
+        SysOperLogBo operLog = BeanUtil.toBean(operLogEvent, SysOperLogBo.class);
         // 杩滅▼鏌ヨ鎿嶄綔鍦扮偣
         operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp()));
         insertOperlog(operLog);
     }
 
     @Override
-    public TableDataInfo<SysOperLog> selectPageOperLogList(SysOperLog operLog, PageQuery pageQuery) {
+    public TableDataInfo<SysOperLogVo> selectPageOperLogList(SysOperLogBo operLog, PageQuery pageQuery) {
         Map<String, Object> params = operLog.getParams();
         LambdaQueryWrapper<SysOperLog> lqw = new LambdaQueryWrapper<SysOperLog>()
             .like(StringUtils.isNotBlank(operLog.getTitle()), SysOperLog::getTitle, operLog.getTitle())
@@ -68,17 +70,18 @@
             pageQuery.setOrderByColumn("oper_id");
             pageQuery.setIsAsc("desc");
         }
-        Page<SysOperLog> page = baseMapper.selectPage(pageQuery.build(), lqw);
+        Page<SysOperLogVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
         return TableDataInfo.build(page);
     }
 
     /**
      * 鏂板鎿嶄綔鏃ュ織
      *
-     * @param operLog 鎿嶄綔鏃ュ織瀵硅薄
+     * @param bo 鎿嶄綔鏃ュ織瀵硅薄
      */
     @Override
-    public void insertOperlog(SysOperLog operLog) {
+    public void insertOperlog(SysOperLogBo bo) {
+        SysOperLog operLog = BeanUtil.toBean(bo, SysOperLog.class);
         operLog.setOperTime(new Date());
         baseMapper.insert(operLog);
     }
@@ -90,9 +93,9 @@
      * @return 鎿嶄綔鏃ュ織闆嗗悎
      */
     @Override
-    public List<SysOperLog> selectOperLogList(SysOperLog operLog) {
+    public List<SysOperLogVo> selectOperLogList(SysOperLogBo operLog) {
         Map<String, Object> params = operLog.getParams();
-        return baseMapper.selectList(new LambdaQueryWrapper<SysOperLog>()
+        return baseMapper.selectVoList(new LambdaQueryWrapper<SysOperLog>()
             .like(StringUtils.isNotBlank(operLog.getTitle()), SysOperLog::getTitle, operLog.getTitle())
             .eq(operLog.getBusinessType() != null && operLog.getBusinessType() > 0,
                 SysOperLog::getBusinessType, operLog.getBusinessType())
@@ -127,8 +130,8 @@
      * @return 鎿嶄綔鏃ュ織瀵硅薄
      */
     @Override
-    public SysOperLog selectOperLogById(Long operId) {
-        return baseMapper.selectById(operId);
+    public SysOperLogVo selectOperLogById(Long operId) {
+        return baseMapper.selectVoById(operId);
     }
 
     /**
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java
index fe97a9e..61e5c8d 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssConfigServiceImpl.java
@@ -10,15 +10,16 @@
 import com.ruoyi.common.core.constant.CacheNames;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.exception.ServiceException;
-import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.core.utils.StreamUtils;
 import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.json.utils.JsonUtils;
 import com.ruoyi.common.mybatis.core.page.PageQuery;
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 import com.ruoyi.common.oss.constant.OssConstant;
-import com.ruoyi.common.oss.factory.OssFactory;
 import com.ruoyi.common.redis.utils.CacheUtils;
 import com.ruoyi.common.redis.utils.RedisUtils;
+import com.ruoyi.common.tenant.core.TenantEntity;
+import com.ruoyi.common.tenant.helper.TenantHelper;
 import com.ruoyi.system.domain.SysOssConfig;
 import com.ruoyi.system.domain.bo.SysOssConfigBo;
 import com.ruoyi.system.domain.vo.SysOssConfigVo;
@@ -26,12 +27,12 @@
 import com.ruoyi.system.service.ISysOssConfigService;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.context.event.EventListener;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 瀵硅薄瀛樺偍閰嶇疆Service涓氬姟灞傚鐞�
@@ -52,17 +53,23 @@
      */
     @Override
     public void init() {
-        List<SysOssConfig> list = baseMapper.selectList();
-        // 鍔犺浇OSS鍒濆鍖栭厤缃�
-        for (SysOssConfig config : list) {
-            String configKey = config.getConfigKey();
-            if ("0".equals(config.getStatus())) {
-                RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey);
+        TenantHelper.enableIgnore();
+        List<SysOssConfig> list = baseMapper.selectList(
+                new LambdaQueryWrapper<SysOssConfig>().orderByAsc(TenantEntity::getTenantId));
+        TenantHelper.disableIgnore();
+        Map<String, List<SysOssConfig>> map = StreamUtils.groupByKey(list, SysOssConfig::getTenantId);
+        for (String tenantId : map.keySet()) {
+            TenantHelper.setDynamic(tenantId);
+            // 鍔犺浇OSS鍒濆鍖栭厤缃�
+            for (SysOssConfig config : map.get(tenantId)) {
+                String configKey = config.getConfigKey();
+                if ("0".equals(config.getStatus())) {
+                    RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey);
+                }
+                CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config));
             }
-            SpringUtils.context().publishEvent(config);
         }
-        // 鍒濆鍖朞SS宸ュ巶
-        OssFactory.init();
+        TenantHelper.clearDynamic();
     }
 
     @Override
@@ -92,7 +99,7 @@
         validEntityBeforeSave(config);
         boolean flag = baseMapper.insert(config) > 0;
         if (flag) {
-            SpringUtils.context().publishEvent(config);
+            CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config));
         }
         return flag;
     }
@@ -109,7 +116,7 @@
         luw.eq(SysOssConfig::getOssConfigId, config.getOssConfigId());
         boolean flag = baseMapper.update(config, luw) > 0;
         if (flag) {
-            SpringUtils.context().publishEvent(config);
+            CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config));
         }
         return flag;
     }
@@ -174,16 +181,4 @@
         return row;
     }
 
-    /**
-     * 鏇存柊閰嶇疆缂撳瓨
-     *
-     * @param config 閰嶇疆
-     */
-    @EventListener
-    public void updateConfigCache(SysOssConfig config) {
-        CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config));
-        RedisUtils.publish(OssConstant.DEFAULT_CONFIG_KEY, config.getConfigKey(), msg -> {
-            log.info("鍙戝竷鍒锋柊OSS閰嶇疆 => " + msg);
-        });
-    }
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java
index db3b6c9..21d7dd1 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOssServiceImpl.java
@@ -1,5 +1,6 @@
 package com.ruoyi.system.service.impl;
 
+import cn.hutool.core.convert.Convert;
 import cn.hutool.core.io.IoUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -70,13 +71,13 @@
     @Override
     public String selectUrlByIds(String ossIds) {
         List<String> list = new ArrayList<>();
-        for (Long id : Arrays.stream(ossIds.split(",")).map(Long::parseLong).toList()) {
+        for (Long id : StringUtils.splitTo(ossIds, Convert::toLong)) {
             SysOssVo vo = SpringUtils.getAopProxy(this).getById(id);
             if (ObjectUtil.isNotNull(vo)) {
                 list.add(this.matchingUrl(vo).getUrl());
             }
         }
-        return String.join(",", list);
+        return String.join(StringUtils.SEPARATOR, list);
     }
 
     private LambdaQueryWrapper<SysOss> buildQueryWrapper(SysOssBo bo) {
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java
new file mode 100644
index 0000000..ded956c
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPermissionServiceImpl.java
@@ -0,0 +1,61 @@
+package com.ruoyi.system.service.impl;
+
+import com.ruoyi.common.core.constant.TenantConstants;
+import com.ruoyi.common.satoken.utils.LoginHelper;
+import com.ruoyi.system.service.ISysMenuService;
+import com.ruoyi.system.service.ISysPermissionService;
+import com.ruoyi.system.service.ISysRoleService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * 鐢ㄦ埛鏉冮檺澶勭悊
+ *
+ * @author ruoyi
+ */
+@RequiredArgsConstructor
+@Service
+public class SysPermissionServiceImpl implements ISysPermissionService {
+
+    private final ISysRoleService roleService;
+    private final ISysMenuService menuService;
+
+    /**
+     * 鑾峰彇瑙掕壊鏁版嵁鏉冮檺
+     *
+     * @param userId  鐢ㄦ埛id
+     * @return 瑙掕壊鏉冮檺淇℃伅
+     */
+    @Override
+    public Set<String> getRolePermission(Long userId) {
+        Set<String> roles = new HashSet<>();
+        // 绠$悊鍛樻嫢鏈夋墍鏈夋潈闄�
+        if (LoginHelper.isSuperAdmin(userId)) {
+            roles.add(TenantConstants.SUPER_ADMIN_ROLE_KEY);
+        } else {
+            roles.addAll(roleService.selectRolePermissionByUserId(userId));
+        }
+        return roles;
+    }
+
+    /**
+     * 鑾峰彇鑿滃崟鏁版嵁鏉冮檺
+     *
+     * @param userId  鐢ㄦ埛id
+     * @return 鑿滃崟鏉冮檺淇℃伅
+     */
+    @Override
+    public Set<String> getMenuPermission(Long userId) {
+        Set<String> perms = new HashSet<>();
+        // 绠$悊鍛樻嫢鏈夋墍鏈夋潈闄�
+        if (LoginHelper.isSuperAdmin(userId)) {
+            perms.add("*:*:*");
+        } else {
+            perms.addAll(menuService.selectMenuPermsByUserId(userId));
+        }
+        return perms;
+    }
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
index e83a124..a04f81f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
@@ -6,11 +6,11 @@
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.core.constant.UserConstants;
 import com.ruoyi.common.core.utils.StreamUtils;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.mybatis.core.page.PageQuery;
 import com.ruoyi.system.domain.SysRole;
 import com.ruoyi.common.mybatis.core.page.TableDataInfo;
@@ -110,7 +110,7 @@
         Set<String> permsSet = new HashSet<>();
         for (SysRoleVo perm : perms) {
             if (ObjectUtil.isNotNull(perm)) {
-                permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
+                permsSet.addAll(StringUtils.splitList(perm.getRoleKey().trim()));
             }
         }
         return permsSet;
@@ -189,7 +189,7 @@
      */
     @Override
     public void checkRoleAllowed(SysRoleBo role) {
-        if (ObjectUtil.isNotNull(role.getRoleId()) && role.isAdmin()) {
+        if (ObjectUtil.isNotNull(role.getRoleId()) && role.isSuperAdmin()) {
             throw new ServiceException("涓嶅厑璁告搷浣滆秴绾х鐞嗗憳瑙掕壊");
         }
     }
@@ -201,7 +201,7 @@
      */
     @Override
     public void checkRoleDataScope(Long roleId) {
-        if (!LoginHelper.isAdmin()) {
+        if (!LoginHelper.isSuperAdmin()) {
             SysRoleBo role = new SysRoleBo();
             role.setRoleId(roleId);
             List<SysRoleVo> roles = this.selectRoleList(role);
@@ -234,7 +234,7 @@
         SysRole role = BeanUtil.toBean(bo, SysRole.class);
         // 鏂板瑙掕壊淇℃伅
         baseMapper.insert(role);
-        return insertRoleMenu(role);
+        return insertRoleMenu(bo);
     }
 
     /**
@@ -251,7 +251,7 @@
         baseMapper.updateById(role);
         // 鍒犻櫎瑙掕壊涓庤彍鍗曞叧鑱�
         roleMenuMapper.delete(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getRoleId, role.getRoleId()));
-        return insertRoleMenu(role);
+        return insertRoleMenu(bo);
     }
 
     /**
@@ -281,7 +281,7 @@
         // 鍒犻櫎瑙掕壊涓庨儴闂ㄥ叧鑱�
         roleDeptMapper.delete(new LambdaQueryWrapper<SysRoleDept>().eq(SysRoleDept::getRoleId, role.getRoleId()));
         // 鏂板瑙掕壊鍜岄儴闂ㄤ俊鎭紙鏁版嵁鏉冮檺锛�
-        return insertRoleDept(role);
+        return insertRoleDept(bo);
     }
 
     /**
@@ -289,7 +289,7 @@
      *
      * @param role 瑙掕壊瀵硅薄
      */
-    public int insertRoleMenu(SysRole role) {
+    public int insertRoleMenu(SysRoleBo role) {
         int rows = 1;
         // 鏂板鐢ㄦ埛涓庤鑹茬鐞�
         List<SysRoleMenu> list = new ArrayList<SysRoleMenu>();
@@ -310,7 +310,7 @@
      *
      * @param role 瑙掕壊瀵硅薄
      */
-    public int insertRoleDept(SysRole role) {
+    public int insertRoleDept(SysRoleBo role) {
         int rows = 1;
         // 鏂板瑙掕壊涓庨儴闂紙鏁版嵁鏉冮檺锛夌鐞�
         List<SysRoleDept> list = new ArrayList<SysRoleDept>();
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java
index 40123c7..cab1f4c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysSensitiveServiceImpl.java
@@ -20,7 +20,7 @@
      */
     @Override
     public boolean isSensitive() {
-        return !LoginHelper.isAdmin();
+        return !LoginHelper.isSuperAdmin() || !LoginHelper.isTenantAdmin();
     }
 
 }
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantPackageServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantPackageServiceImpl.java
new file mode 100644
index 0000000..211c228
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantPackageServiceImpl.java
@@ -0,0 +1,139 @@
+package com.ruoyi.system.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.system.domain.SysTenant;
+import com.ruoyi.system.mapper.SysTenantMapper;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.domain.bo.SysTenantPackageBo;
+import com.ruoyi.system.domain.vo.SysTenantPackageVo;
+import com.ruoyi.system.domain.SysTenantPackage;
+import com.ruoyi.system.mapper.SysTenantPackageMapper;
+import com.ruoyi.system.service.ISysTenantPackageService;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 绉熸埛濂楅Service涓氬姟灞傚鐞�
+ *
+ * @author Michelle.Chung
+ */
+@RequiredArgsConstructor
+@Service
+public class SysTenantPackageServiceImpl implements ISysTenantPackageService {
+
+    private final SysTenantPackageMapper baseMapper;
+    private final SysTenantMapper tenantMapper;
+
+    /**
+     * 鏌ヨ绉熸埛濂楅
+     */
+    @Override
+    public SysTenantPackageVo queryById(Long packageId){
+        return baseMapper.selectVoById(packageId);
+    }
+
+    /**
+     * 鏌ヨ绉熸埛濂楅鍒楄〃
+     */
+    @Override
+    public TableDataInfo<SysTenantPackageVo> queryPageList(SysTenantPackageBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<SysTenantPackage> lqw = buildQueryWrapper(bo);
+        Page<SysTenantPackageVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 鏌ヨ绉熸埛濂楅鍒楄〃
+     */
+    @Override
+    public List<SysTenantPackageVo> queryList(SysTenantPackageBo bo) {
+        LambdaQueryWrapper<SysTenantPackage> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<SysTenantPackage> buildQueryWrapper(SysTenantPackageBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<SysTenantPackage> lqw = Wrappers.lambdaQuery();
+        lqw.like(StringUtils.isNotBlank(bo.getPackageName()), SysTenantPackage::getPackageName, bo.getPackageName());
+        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysTenantPackage::getStatus, bo.getStatus());
+        return lqw;
+    }
+
+    /**
+     * 鏂板绉熸埛濂楅
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean insertByBo(SysTenantPackageBo bo) {
+        SysTenantPackage add = BeanUtil.toBean(bo, SysTenantPackage.class);
+        // 淇濆瓨鑿滃崟id
+        List<Long> menuIds = Arrays.asList(bo.getMenuIds());
+        if (CollUtil.isNotEmpty(menuIds)) {
+            add.setMenuIds(StringUtils.join(menuIds, ", "));
+        } else {
+            add.setMenuIds("");
+        }
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setPackageId(add.getPackageId());
+        }
+        return flag;
+    }
+
+    /**
+     * 淇敼绉熸埛濂楅
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean updateByBo(SysTenantPackageBo bo) {
+        SysTenantPackage update = BeanUtil.toBean(bo, SysTenantPackage.class);
+        // 淇濆瓨鑿滃崟id
+        List<Long> menuIds = Arrays.asList(bo.getMenuIds());
+        if (CollUtil.isNotEmpty(menuIds)) {
+            update.setMenuIds(StringUtils.join(menuIds, ", "));
+        } else {
+            update.setMenuIds("");
+        }
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 淇敼濂楅鐘舵��
+     *
+     * @param bo 濂楅淇℃伅
+     * @return 缁撴灉
+     */
+    @Override
+    public int updatePackageStatus(SysTenantPackageBo bo) {
+        SysTenantPackage tenantPackage = BeanUtil.toBean(bo, SysTenantPackage.class);
+        return baseMapper.updateById(tenantPackage);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎绉熸埛濂楅
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            boolean exists = tenantMapper.exists(new LambdaQueryWrapper<SysTenant>().in(SysTenant::getPackageId, ids));
+            if (exists) {
+                throw new ServiceException("绉熸埛濂楅宸茶浣跨敤");
+            }
+        }
+        return baseMapper.deleteBatchIds(ids) > 0;
+    }
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java
new file mode 100644
index 0000000..e22f651
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java
@@ -0,0 +1,334 @@
+package com.ruoyi.system.service.impl;
+
+import cn.dev33.satoken.secure.BCrypt;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.RandomUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.core.constant.CacheNames;
+import com.ruoyi.common.core.constant.Constants;
+import com.ruoyi.common.core.constant.TenantConstants;
+import com.ruoyi.common.core.exception.ServiceException;
+import com.ruoyi.common.core.utils.SpringUtils;
+import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.mybatis.core.page.PageQuery;
+import com.ruoyi.common.mybatis.core.page.TableDataInfo;
+import com.ruoyi.common.tenant.helper.TenantHelper;
+import com.ruoyi.system.domain.*;
+import com.ruoyi.system.domain.bo.SysTenantBo;
+import com.ruoyi.system.domain.vo.SysTenantVo;
+import com.ruoyi.system.mapper.*;
+import com.ruoyi.system.service.ISysTenantService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 绉熸埛Service涓氬姟灞傚鐞�
+ *
+ * @author Michelle.Chung
+ */
+@RequiredArgsConstructor
+@Service
+public class SysTenantServiceImpl implements ISysTenantService {
+
+    private final SysTenantMapper baseMapper;
+    private final SysTenantPackageMapper sysTenantPackageMapper;
+    private final SysUserMapper sysUserMapper;
+    private final SysDeptMapper sysDeptMapper;
+    private final SysRoleMapper sysRoleMapper;
+    private final SysRoleMenuMapper sysRoleMenuMapper;
+    private final SysRoleDeptMapper sysRoleDeptMapper;
+    private final SysUserRoleMapper sysUserRoleMapper;
+    private final SysDictTypeMapper sysDictTypeMapper;
+    private final SysDictDataMapper sysDictDataMapper;
+    private final SysConfigMapper sysConfigMapper;
+
+    /**
+     * 鏌ヨ绉熸埛
+     */
+    @Override
+    public SysTenantVo queryById(Long id) {
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 鍩轰簬绉熸埛ID鏌ヨ绉熸埛
+     */
+    @Cacheable(cacheNames = CacheNames.SYS_TENANT, key = "#tenantId")
+    @Override
+    public SysTenantVo queryByTenantId(String tenantId) {
+        return baseMapper.selectVoOne(new LambdaQueryWrapper<SysTenant>().eq(SysTenant::getTenantId, tenantId));
+    }
+
+    /**
+     * 鏌ヨ绉熸埛鍒楄〃
+     */
+    @Override
+    public TableDataInfo<SysTenantVo> queryPageList(SysTenantBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<SysTenant> lqw = buildQueryWrapper(bo);
+        Page<SysTenantVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 鏌ヨ绉熸埛鍒楄〃
+     */
+    @Override
+    public List<SysTenantVo> queryList(SysTenantBo bo) {
+        LambdaQueryWrapper<SysTenant> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<SysTenant> buildQueryWrapper(SysTenantBo bo) {
+        LambdaQueryWrapper<SysTenant> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StringUtils.isNotBlank(bo.getTenantId()), SysTenant::getTenantId, bo.getTenantId());
+        lqw.like(StringUtils.isNotBlank(bo.getContactUserName()), SysTenant::getContactUserName, bo.getContactUserName());
+        lqw.eq(StringUtils.isNotBlank(bo.getContactPhone()), SysTenant::getContactPhone, bo.getContactPhone());
+        lqw.like(StringUtils.isNotBlank(bo.getCompanyName()), SysTenant::getCompanyName, bo.getCompanyName());
+        lqw.eq(StringUtils.isNotBlank(bo.getLicenseNumber()), SysTenant::getLicenseNumber, bo.getLicenseNumber());
+        lqw.eq(StringUtils.isNotBlank(bo.getAddress()), SysTenant::getAddress, bo.getAddress());
+        lqw.eq(StringUtils.isNotBlank(bo.getIntro()), SysTenant::getIntro, bo.getIntro());
+        lqw.like(StringUtils.isNotBlank(bo.getDomain()), SysTenant::getDomain, bo.getDomain());
+        lqw.eq(bo.getPackageId() != null, SysTenant::getPackageId, bo.getPackageId());
+        lqw.eq(bo.getExpireTime() != null, SysTenant::getExpireTime, bo.getExpireTime());
+        lqw.eq(bo.getAccountCount() != null, SysTenant::getAccountCount, bo.getAccountCount());
+        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysTenant::getStatus, bo.getStatus());
+        return lqw;
+    }
+
+    /**
+     * 鏂板绉熸埛
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean insertByBo(SysTenantBo bo) {
+        TenantHelper.enableIgnore();
+
+        SysTenant add = BeanUtil.toBean(bo, SysTenant.class);
+
+        // 鑾峰彇鎵�鏈夌鎴风紪鍙�
+        List<String> tenantIds = baseMapper.selectObjs(
+            new LambdaQueryWrapper<SysTenant>().select(SysTenant::getTenantId), Convert::toStr);
+        String tenantId = generateTenantId(tenantIds);
+        add.setTenantId(tenantId);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (!flag) {
+            throw new ServiceException("鍒涘缓绉熸埛澶辫触");
+        }
+        bo.setId(add.getId());
+
+        // 鏍规嵁濂楅鍒涘缓瑙掕壊
+        Long roleId = createTenantRole(tenantId, bo.getPackageId());
+
+        // 鍒涘缓閮ㄩ棬: 鍏徃鍚嶆槸閮ㄩ棬鍚嶇О
+        SysDept dept = new SysDept();
+        dept.setTenantId(tenantId);
+        dept.setDeptName(bo.getCompanyName());
+        dept.setLeader(bo.getUsername());
+        dept.setParentId(Constants.TOP_PARENT_ID);
+        dept.setAncestors(Constants.TOP_PARENT_ID.toString());
+        sysDeptMapper.insert(dept);
+        Long deptId = dept.getDeptId();
+
+        // 瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃
+        SysRoleDept roleDept = new SysRoleDept();
+        roleDept.setRoleId(roleId);
+        roleDept.setDeptId(deptId);
+        sysRoleDeptMapper.insert(roleDept);
+
+        // 鍒涘缓绯荤粺鐢ㄦ埛
+        SysUser user = new SysUser();
+        user.setTenantId(tenantId);
+        user.setUserName(bo.getUsername());
+        user.setNickName(bo.getUsername());
+        user.setPassword(BCrypt.hashpw(bo.getPassword()));
+        user.setDeptId(deptId);
+        sysUserMapper.insert(user);
+
+        // 鐢ㄦ埛鍜岃鑹插叧鑱旇〃
+        SysUserRole userRole = new SysUserRole();
+        userRole.setUserId(user.getUserId());
+        userRole.setRoleId(roleId);
+        sysUserRoleMapper.insert(userRole);
+
+        String defaultTenantId = TenantConstants.DEFAULT_TENANT_ID;
+        List<SysDictType> dictTypeList = sysDictTypeMapper.selectList(
+            new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getTenantId, defaultTenantId));
+        List<SysDictData> dictDataList = sysDictDataMapper.selectList(
+            new LambdaQueryWrapper<SysDictData>().eq(SysDictData::getTenantId, defaultTenantId));
+        for (SysDictType dictType : dictTypeList) {
+            dictType.setDictId(null);
+            dictType.setTenantId(tenantId);
+        }
+        for (SysDictData dictData : dictDataList) {
+            dictData.setDictCode(null);
+            dictData.setTenantId(tenantId);
+        }
+        sysDictTypeMapper.insertBatch(dictTypeList);
+        sysDictDataMapper.insertBatch(dictDataList);
+
+        List<SysConfig> sysConfigList = sysConfigMapper.selectList(
+            new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getTenantId, defaultTenantId));
+        for (SysConfig config : sysConfigList) {
+            config.setConfigId(null);
+            config.setTenantId(tenantId);
+        }
+        sysConfigMapper.insertBatch(sysConfigList);
+
+        TenantHelper.disableIgnore();
+        return true;
+    }
+
+    /**
+     * 鐢熸垚绉熸埛id
+     *
+     * @param tenantIds 宸叉湁绉熸埛id鍒楄〃
+     * @return 绉熸埛id
+     */
+    private String generateTenantId(List<String> tenantIds) {
+        // 闅忔満鐢熸垚6浣�
+        String numbers = RandomUtil.randomNumbers(6);
+        // 鍒ゆ柇鏄惁瀛樺湪锛屽鏋滃瓨鍦ㄥ垯閲嶆柊鐢熸垚
+        if (tenantIds.contains(numbers)) {
+            generateTenantId(tenantIds);
+        }
+        return numbers;
+    }
+
+    /**
+     * 鏍规嵁绉熸埛鑿滃崟鍒涘缓绉熸埛瑙掕壊
+     *
+     * @param tenantId  绉熸埛缂栧彿
+     * @param packageId 绉熸埛濂楅id
+     * @return 瑙掕壊id
+     */
+    public Long createTenantRole(String tenantId, Long packageId) {
+        // 鑾峰彇绉熸埛濂楅
+        SysTenantPackage tenantPackage = sysTenantPackageMapper.selectById(packageId);
+        if (ObjectUtil.isNull(tenantPackage)) {
+            throw new ServiceException("濂楅涓嶅瓨鍦�");
+        }
+        // 鑾峰彇濂楅鑿滃崟id
+        List<Long> menuIds = StringUtils.splitTo(tenantPackage.getMenuIds(), Convert::toLong);
+
+        // 鍒涘缓瑙掕壊
+        SysRole role = new SysRole();
+        role.setTenantId(tenantId);
+        role.setRoleName(TenantConstants.TENANT_ADMIN_ROLE_NAME);
+        role.setRoleKey(TenantConstants.TENANT_ADMIN_ROLE_KEY);
+        role.setRoleSort(1);
+        role.setStatus(TenantConstants.NORMAL);
+        sysRoleMapper.insert(role);
+        Long roleId = role.getRoleId();
+
+        // 鍒涘缓瑙掕壊鑿滃崟
+        List<SysRoleMenu> roleMenus = new ArrayList<>(menuIds.size());
+        menuIds.forEach(menuId -> {
+            SysRoleMenu roleMenu = new SysRoleMenu();
+            roleMenu.setRoleId(roleId);
+            roleMenu.setMenuId(menuId);
+            roleMenus.add(roleMenu);
+        });
+        sysRoleMenuMapper.insertBatch(roleMenus);
+
+        return roleId;
+    }
+
+    /**
+     * 淇敼绉熸埛
+     */
+    @CacheEvict(cacheNames = CacheNames.SYS_TENANT, key = "#bo.tenantId")
+    @Override
+    public Boolean updateByBo(SysTenantBo bo) {
+        SysTenant tenant = BeanUtil.toBean(bo, SysTenant.class);
+        tenant.setTenantId(null);
+        tenant.setPackageId(null);
+        return baseMapper.updateById(tenant) > 0;
+    }
+
+    /**
+     * 淇敼绉熸埛鐘舵��
+     *
+     * @param bo 绉熸埛淇℃伅
+     * @return 缁撴灉
+     */
+    @CacheEvict(cacheNames = CacheNames.SYS_TENANT, key = "#bo.tenantId")
+    @Override
+    public int updateTenantStatus(SysTenantBo bo) {
+        SysTenant tenant = BeanUtil.toBean(bo, SysTenant.class);
+        return baseMapper.updateById(tenant);
+    }
+
+    /**
+     * 鎵归噺鍒犻櫎绉熸埛
+     */
+    @CacheEvict(cacheNames = CacheNames.SYS_TENANT, allEntries = true)
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if (isValid) {
+            // 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠�
+        }
+        return baseMapper.deleteBatchIds(ids) > 0;
+    }
+
+    /**
+     * 鏍¢獙浼佷笟鍚嶇О鏄惁鍞竴
+     */
+    @Override
+    public String checkCompanyNameUnique(SysTenantBo bo) {
+        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysTenant>()
+            .eq(SysTenant::getCompanyName, bo.getCompanyName())
+            .ne(ObjectUtil.isNotNull(bo.getTenantId()), SysTenant::getTenantId, bo.getTenantId()));
+        if (exist) {
+            return TenantConstants.NOT_PASS;
+        }
+        return TenantConstants.PASS;
+    }
+
+    /**
+     * 鏍¢獙璐﹀彿浣欓
+     */
+    @Override
+    public String checkAccountBalance(String tenantId) {
+        SysTenantVo tenant = SpringUtils.getAopProxy(this).queryByTenantId(tenantId);
+        // 濡傛灉浣欓涓�-1浠h〃涓嶉檺鍒�
+        if (tenant.getAccountCount() == -1) {
+            return TenantConstants.PASS;
+        }
+        Long userNumber = sysUserMapper.selectCount(new LambdaQueryWrapper<>());
+        // 濡傛灉浣欓澶т簬0浠h〃杩樻湁鍙敤鍚嶉
+        if (tenant.getAccountCount() - userNumber > 0) {
+            return TenantConstants.PASS;
+        }
+        return TenantConstants.NOT_PASS;
+    }
+
+    /**
+     * 鏍¢獙鏈夋晥鏈�
+     */
+    @Override
+    public String checkExpireTime(String tenantId) {
+        SysTenantVo tenant = SpringUtils.getAopProxy(this).queryByTenantId(tenantId);
+        // 濡傛灉鏈缃繃鏈熸椂闂翠唬琛ㄤ笉闄愬埗
+        if (ObjectUtil.isNull(tenant.getExpireTime())) {
+            return TenantConstants.PASS;
+        }
+        // 濡傛灉褰撳墠鏃堕棿鍦ㄨ繃鏈熸椂闂翠箣鍓嶅垯閫氳繃
+        if (new Date().before(tenant.getExpireTime())) {
+            return TenantConstants.PASS;
+        }
+        return TenantConstants.NOT_PASS;
+    }
+
+}
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
index ee36fe5..1628d5f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -250,7 +250,7 @@
      */
     @Override
     public void checkUserAllowed(SysUserBo user) {
-        if (ObjectUtil.isNotNull(user.getUserId()) && user.isAdmin()) {
+        if (ObjectUtil.isNotNull(user.getUserId()) && user.isSuperAdmin()) {
             throw new ServiceException("涓嶅厑璁告搷浣滆秴绾х鐞嗗憳鐢ㄦ埛");
         }
     }
@@ -262,7 +262,7 @@
      */
     @Override
     public void checkUserDataScope(Long userId) {
-        if (!LoginHelper.isAdmin()) {
+        if (!LoginHelper.isSuperAdmin()) {
             SysUserBo user = new SysUserBo();
             user.setUserId(userId);
             List<SysUserVo> users = this.selectUserList(user);
@@ -298,10 +298,11 @@
      * @return 缁撴灉
      */
     @Override
-    public boolean registerUser(SysUserBo user) {
+    public boolean registerUser(SysUserBo user, String tenantId) {
         user.setCreateBy(user.getUserId());
         user.setUpdateBy(user.getUserId());
         SysUser sysUser = BeanUtil.copyProperties(user, SysUser.class);
+        sysUser.setTenantId(tenantId);
         return baseMapper.insert(sysUser) > 0;
     }
 
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantMapper.xml
new file mode 100644
index 0000000..f3fa4cb
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantMapper.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.SysTenantMapper">
+
+</mapper>
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantPackageMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantPackageMapper.xml
new file mode 100644
index 0000000..23b46df
--- /dev/null
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysTenantPackageMapper.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.SysTenantPackageMapper">
+
+</mapper>
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index b6ba601..74e41b9 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -22,6 +22,7 @@
 
     <sql id="selectUserVo">
         select u.user_id,
+               u.tenant_id,
                u.dept_id,
                u.user_name,
                u.nick_name,
diff --git a/ruoyi-ui/src/api/login.js b/ruoyi-ui/src/api/login.js
index 3c5bcfe..6b8d857 100644
--- a/ruoyi-ui/src/api/login.js
+++ b/ruoyi-ui/src/api/login.js
@@ -1,8 +1,9 @@
 import request from '@/utils/request'
 
 // 鐧诲綍鏂规硶
-export function login(username, password, code, uuid) {
+export function login(tenantId, username, password, code, uuid) {
   const data = {
+    tenantId,
     username,
     password,
     code,
@@ -69,3 +70,14 @@
     timeout: 20000
   })
 }
+
+// 鑾峰彇绉熸埛鍒楄〃
+export function tenantList() {
+  return request({
+    url: '/tenant/list',
+    headers: {
+      isToken: false
+    },
+    method: 'get'
+  })
+}
diff --git a/ruoyi-ui/src/api/system/menu.js b/ruoyi-ui/src/api/system/menu.js
index f6415c6..b233525 100644
--- a/ruoyi-ui/src/api/system/menu.js
+++ b/ruoyi-ui/src/api/system/menu.js
@@ -33,6 +33,14 @@
   })
 }
 
+// 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟涓嬫媺鏍戠粨鏋�
+export function tenantPackageMenuTreeselect(packageId) {
+  return request({
+    url: '/system/menu/tenantPackageMenuTreeselect/' + packageId,
+    method: 'get'
+  })
+}
+
 // 鏂板鑿滃崟
 export function addMenu(data) {
   return request({
@@ -57,4 +65,4 @@
     url: '/system/menu/' + menuId,
     method: 'delete'
   })
-}
\ No newline at end of file
+}
diff --git a/ruoyi-ui/src/api/system/tenant.js b/ruoyi-ui/src/api/system/tenant.js
new file mode 100644
index 0000000..76ca9ff
--- /dev/null
+++ b/ruoyi-ui/src/api/system/tenant.js
@@ -0,0 +1,74 @@
+import request from '@/utils/request'
+
+// 鏌ヨ绉熸埛鍒楄〃
+export function listTenant(query) {
+  return request({
+    url: '/system/tenant/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ绉熸埛璇︾粏
+export function getTenant(id) {
+  return request({
+    url: '/system/tenant/' + id,
+    method: 'get'
+  })
+}
+
+// 鏂板绉熸埛
+export function addTenant(data) {
+  return request({
+    url: '/system/tenant',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼绉熸埛
+export function updateTenant(data) {
+  return request({
+    url: '/system/tenant',
+    method: 'put',
+    data: data
+  })
+}
+
+// 绉熸埛鐘舵�佷慨鏀�
+export function changeTenantStatus(id, status) {
+  const data = {
+    id,
+    status
+  }
+  return request({
+    url: '/system/tenant/changeStatus',
+    method: 'put',
+    data: data
+  })
+}
+
+// 鍒犻櫎绉熸埛
+export function delTenant(id) {
+  return request({
+    url: '/system/tenant/' + id,
+    method: 'delete'
+  })
+}
+
+// 鍔ㄦ�佸垏鎹㈢鎴�
+export function dynamicTenant(tenantId) {
+  return request({
+    url: '/system/tenant/dynamic/' + tenantId,
+    method: 'get'
+  })
+}
+
+// 娓呴櫎鍔ㄦ�佺鎴�
+export function dynamicClear() {
+  return request({
+    url: '/system/tenant/dynamic/clear',
+    method: 'get'
+  })
+}
+
diff --git a/ruoyi-ui/src/api/system/tenantPackage.js b/ruoyi-ui/src/api/system/tenantPackage.js
new file mode 100644
index 0000000..91ac8f8
--- /dev/null
+++ b/ruoyi-ui/src/api/system/tenantPackage.js
@@ -0,0 +1,58 @@
+import request from '@/utils/request'
+
+// 鏌ヨ绉熸埛濂楅鍒楄〃
+export function listTenantPackage(query) {
+  return request({
+    url: '/system/tenant/package/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 鏌ヨ绉熸埛濂楅璇︾粏
+export function getTenantPackage(packageId) {
+  return request({
+    url: '/system/tenant/package/' + packageId,
+    method: 'get'
+  })
+}
+
+// 鏂板绉熸埛濂楅
+export function addTenantPackage(data) {
+  return request({
+    url: '/system/tenant/package',
+    method: 'post',
+    data: data
+  })
+}
+
+// 淇敼绉熸埛濂楅
+export function updateTenantPackage(data) {
+  return request({
+    url: '/system/tenant/package',
+    method: 'put',
+    data: data
+  })
+}
+
+// 绉熸埛濂楅鐘舵�佷慨鏀�
+export function changePackageStatus(packageId, status) {
+  const data = {
+    packageId,
+    status
+  }
+  return request({
+    url: '/system/tenant/package/changeStatus',
+    method: 'put',
+    data: data
+  })
+}
+
+
+// 鍒犻櫎绉熸埛濂楅
+export function delTenantPackage(packageId) {
+  return request({
+    url: '/system/tenant/package/' + packageId,
+    method: 'delete'
+  })
+}
diff --git a/ruoyi-ui/src/assets/icons/svg/company.svg b/ruoyi-ui/src/assets/icons/svg/company.svg
new file mode 100644
index 0000000..fcf1394
--- /dev/null
+++ b/ruoyi-ui/src/assets/icons/svg/company.svg
@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1675914273096" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2417" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M1001.7 969.6H890.4V399.4c0-27.7-17.4-52.8-43.3-62.5L580 236.7c-14.9-5.6-31.1-5.5-45.7-0.4V76.6c0-21.9-10.7-42.4-28.7-54.9s-41-15.3-61.5-7.6L176.9 114.3c-25.9 9.7-43.3 34.9-43.3 62.5v792.8H22.3C10 969.6 0 979.6 0 991.9s10 22.3 22.3 22.3H1001.8c12.3 0 22.3-10 22.3-22.3s-10.1-22.3-22.4-22.3zM178.1 176.8c0-9.2 5.8-17.6 14.4-20.8L459.7 55.8c7-2.6 14.4-1.7 20.5 2.5s9.6 10.9 9.6 18.3v893H178.1V176.8z m356.2 792.8V299.3c0-7.4 3.5-14.1 9.6-18.3 6.1-4.2 13.6-5.2 20.5-2.5l267.1 100.2c8.6 3.2 14.4 11.6 14.4 20.8v570.2H534.3z" p-id="2418"></path><path d="M391.8 346.3H258.2c-12.3 0-22.3 10-22.3 22.3s10 22.3 22.3 22.3h133.6c12.3 0 22.3-10 22.3-22.3s-10-22.3-22.3-22.3zM748 479.9H614.4c-12.3 0-22.3 10-22.3 22.3s10 22.3 22.3 22.3H748c12.3 0 22.3-10 22.3-22.3s-10-22.3-22.3-22.3zM748 613.4H614.4c-12.3 0-22.3 10-22.3 22.3s10 22.3 22.3 22.3H748c12.3 0 22.3-10 22.3-22.3s-10-22.3-22.3-22.3zM391.8 613.4H258.2c-12.3 0-22.3 10-22.3 22.3s10 22.3 22.3 22.3h133.6c12.3 0 22.3-10 22.3-22.3s-10-22.3-22.3-22.3z" p-id="2419"></path></svg>
\ No newline at end of file
diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue
index 9de102c..85fb1b5 100644
--- a/ruoyi-ui/src/layout/components/Navbar.vue
+++ b/ruoyi-ui/src/layout/components/Navbar.vue
@@ -5,8 +5,25 @@
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
 
-    <div class="right-menu">
-      <template v-if="device!=='mobile'">
+    <div class="right-menu flex align-center">
+      <template v-if="device!=='mobile' ">
+        <el-select v-model="companyName"
+                   clearable
+                   filterable
+                   reserve-keyword
+                   placeholder="璇烽�夋嫨绉熸埛"
+                   v-if="userId === 1"
+                   @change="dynamicTenantEvent"
+                   @clear="dynamicClearEvent">
+          <el-option
+            v-for="item in tenantList"
+            :key="item.tenantId"
+            :label="item.companyName"
+            :value="item.tenantId">
+          </el-option>
+          <svg-icon slot="prefix" icon-class="company" class="el-input__icon input-icon" />
+        </el-select>
+
         <search id="header-search" class="right-menu-item" />
 
         <el-tooltip content="婧愮爜鍦板潃" effect="dark" placement="bottom">
@@ -56,8 +73,19 @@
 import Search from '@/components/HeaderSearch'
 import RuoYiGit from '@/components/RuoYi/Git'
 import RuoYiDoc from '@/components/RuoYi/Doc'
+import { tenantList } from "@/api/login";
+import { dynamicClear, dynamicTenant } from "@/api/system/tenant";
 
 export default {
+  data() {
+    return {
+      userId: this.$store.getters.userId,
+      tenantId: undefined,
+      companyName: undefined,
+      tenantList: [],
+      userList: []
+    }
+  },
   components: {
     Breadcrumb,
     TopNav,
@@ -92,6 +120,27 @@
     }
   },
   methods: {
+    // 鍔ㄦ�佸垏鎹�
+    dynamicTenantEvent(tenantId) {
+      if (this.companyName != null && this.companyName !== '') {
+        dynamicTenant(tenantId).then(res => {
+          this.$tab.closeAllPage()
+          this.$router.push('/')
+        });
+      }
+    },
+    dynamicClearEvent() {
+      dynamicClear().then(res => {
+        this.$tab.closeAllPage()
+        this.$router.push('/')
+      });
+    },
+    // 绉熸埛鍒楄〃
+    getTenantList() {
+      tenantList().then(res => {
+        this.tenantList = res.data;
+      });
+    },
     toggleSideBar() {
       this.$store.dispatch('app/toggleSideBar')
     },
@@ -111,6 +160,15 @@
 </script>
 
 <style lang="scss" scoped>
+
+.flex {
+  display: flex;
+}
+
+.align-center {
+  align-items: center;
+}
+
 .navbar {
   height: 50px;
   overflow: hidden;
diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue
index f048657..1d78939 100644
--- a/ruoyi-ui/src/layout/index.vue
+++ b/ruoyi-ui/src/layout/index.vue
@@ -4,7 +4,7 @@
     <sidebar v-if="!sidebar.hide" class="sidebar-container" />
     <div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
       <div :class="{'fixed-header':fixedHeader}">
-        <navbar />
+        <navbar ref="navbar"/>
         <tags-view v-if="needTagsView" />
       </div>
       <app-main />
@@ -54,6 +54,11 @@
       return variables;
     }
   },
+  created() {
+    this.$nextTick(() => {
+      this.$refs.navbar.getTenantList();
+    });
+  },
   methods: {
     handleClickOutside() {
       this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
diff --git a/ruoyi-ui/src/store/getters.js b/ruoyi-ui/src/store/getters.js
index 8adb1b6..8cf5b32 100644
--- a/ruoyi-ui/src/store/getters.js
+++ b/ruoyi-ui/src/store/getters.js
@@ -7,6 +7,7 @@
   cachedViews: state => state.tagsView.cachedViews,
   token: state => state.user.token,
   avatar: state => state.user.avatar,
+  userId: state => state.user.userId,
   name: state => state.user.name,
   introduction: state => state.user.introduction,
   roles: state => state.user.roles,
diff --git a/ruoyi-ui/src/store/modules/user.js b/ruoyi-ui/src/store/modules/user.js
index d67c9a4..b375adc 100644
--- a/ruoyi-ui/src/store/modules/user.js
+++ b/ruoyi-ui/src/store/modules/user.js
@@ -3,6 +3,7 @@
 
 const user = {
   state: {
+    userId: undefined,
     token: getToken(),
     name: '',
     avatar: '',
@@ -11,6 +12,9 @@
   },
 
   mutations: {
+    SET_USER_ID: (state, userId) => {
+      state.userId = userId
+    },
     SET_TOKEN: (state, token) => {
       state.token = token
     },
@@ -31,12 +35,13 @@
   actions: {
     // 鐧诲綍
     Login({ commit }, userInfo) {
+      const tenantId = userInfo.tenantId.trim()
       const username = userInfo.username.trim()
       const password = userInfo.password
       const code = userInfo.code
       const uuid = userInfo.uuid
       return new Promise((resolve, reject) => {
-        login(username, password, code, uuid).then(res => {
+        login(tenantId, username, password, code, uuid).then(res => {
           setToken(res.data.token)
           commit('SET_TOKEN', res.data.token)
           resolve()
@@ -60,6 +65,7 @@
           }
           commit('SET_NAME', user.userName)
           commit('SET_AVATAR', avatar)
+          commit('SET_USER_ID', user.userId)
           resolve(res)
         }).catch(error => {
           reject(error)
diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue
index ed8d971..2a47e85 100644
--- a/ruoyi-ui/src/views/login.vue
+++ b/ruoyi-ui/src/views/login.vue
@@ -2,6 +2,17 @@
   <div class="login">
     <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
       <h3 class="title">RuoYi-Vue-Plus鍚庡彴绠$悊绯荤粺</h3>
+      <el-form-item prop="tenantId">
+        <el-select v-model="loginForm.tenantId" filterable placeholder="璇烽�夋嫨/杈撳叆鍏徃鍚嶇О" style="width: 100%">
+          <el-option
+            v-for="item in tenantList"
+            :key="item.tenantId"
+            :label="item.companyName"
+            :value="item.tenantId">
+          </el-option>
+          <svg-icon slot="prefix" icon-class="company" class="el-input__icon input-icon" />
+        </el-select>
+      </el-form-item>
       <el-form-item prop="username">
         <el-input
           v-model="loginForm.username"
@@ -62,7 +73,7 @@
 </template>
 
 <script>
-import { getCodeImg } from "@/api/login";
+import { getCodeImg, tenantList } from "@/api/login";
 import Cookies from "js-cookie";
 import { encrypt, decrypt } from '@/utils/jsencrypt'
 
@@ -72,6 +83,7 @@
     return {
       codeUrl: "",
       loginForm: {
+        tenantId: "000000",
         username: "admin",
         password: "admin123",
         rememberMe: false,
@@ -79,6 +91,9 @@
         uuid: ""
       },
       loginRules: {
+        tenantId: [
+          { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勭鎴风紪鍙�" }
+        ],
         username: [
           { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" }
         ],
@@ -92,7 +107,9 @@
       captchaEnabled: true,
       // 娉ㄥ唽寮�鍏�
       register: false,
-      redirect: undefined
+      redirect: undefined,
+      // 绉熸埛鍒楄〃
+      tenantList:[]
     };
   },
   watch: {
@@ -105,6 +122,7 @@
   },
   created() {
     this.getCode();
+    this.getTenantList();
     this.getCookie();
   },
   methods: {
@@ -117,11 +135,18 @@
         }
       });
     },
+    getTenantList() {
+      tenantList().then(res => {
+        this.tenantList = res.data;
+      });
+    },
     getCookie() {
+      const tenantId = Cookies.get("tenantId");
       const username = Cookies.get("username");
       const password = Cookies.get("password");
       const rememberMe = Cookies.get('rememberMe')
       this.loginForm = {
+        tenantId: tenantId === undefined ? this.loginForm.tenantId : tenantId,
         username: username === undefined ? this.loginForm.username : username,
         password: password === undefined ? this.loginForm.password : decrypt(password),
         rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
@@ -132,10 +157,12 @@
         if (valid) {
           this.loading = true;
           if (this.loginForm.rememberMe) {
+            Cookies.set("tenantId", this.loginForm.tenantId, { expires: 30 });
             Cookies.set("username", this.loginForm.username, { expires: 30 });
             Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
             Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
           } else {
+            Cookies.remove("tenantId");
             Cookies.remove("username");
             Cookies.remove("password");
             Cookies.remove('rememberMe');
diff --git a/ruoyi-ui/src/views/monitor/cache/list.vue b/ruoyi-ui/src/views/monitor/cache/list.vue
deleted file mode 100644
index 94307ab..0000000
--- a/ruoyi-ui/src/views/monitor/cache/list.vue
+++ /dev/null
@@ -1,241 +0,0 @@
-<template>
-  <div class="app-container">
-    <el-row :gutter="10">
-      <el-col :span="8">
-        <el-card style="height: calc(100vh - 125px)">
-          <div slot="header">
-            <span>缂撳瓨鍒楄〃</span>
-            <el-button
-              style="float: right; padding: 3px 0"
-              type="text"
-              icon="el-icon-refresh-right"
-              @click="refreshCacheNames()"
-            ></el-button>
-          </div>
-          <el-table
-            v-loading="loading"
-            :data="cacheNames"
-            :height="tableHeight"
-            highlight-current-row
-            @row-click="getCacheKeys"
-            style="width: 100%"
-          >
-            <el-table-column
-              label="搴忓彿"
-              width="60"
-              type="index"
-            ></el-table-column>
-
-            <el-table-column
-              label="缂撳瓨鍚嶇О"
-              align="center"
-              prop="cacheName"
-              :show-overflow-tooltip="true"
-              :formatter="nameFormatter"
-            ></el-table-column>
-
-            <el-table-column
-              label="澶囨敞"
-              align="center"
-              prop="remark"
-              :show-overflow-tooltip="true"
-            />
-            <el-table-column
-              label="鎿嶄綔"
-              width="60"
-              align="center"
-              class-name="small-padding fixed-width"
-            >
-              <template slot-scope="scope">
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-delete"
-                  @click="handleClearCacheName(scope.row)"
-                ></el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-card>
-      </el-col>
-
-      <el-col :span="8">
-        <el-card style="height: calc(100vh - 125px)">
-          <div slot="header">
-            <span>閿悕鍒楄〃</span>
-            <el-button
-              style="float: right; padding: 3px 0"
-              type="text"
-              icon="el-icon-refresh-right"
-              @click="refreshCacheKeys()"
-            ></el-button>
-          </div>
-          <el-table
-            v-loading="subLoading"
-            :data="cacheKeys"
-            :height="tableHeight"
-            highlight-current-row
-            @row-click="handleCacheValue"
-            style="width: 100%"
-          >
-            <el-table-column
-              label="搴忓彿"
-              width="60"
-              type="index"
-            ></el-table-column>
-            <el-table-column
-              label="缂撳瓨閿悕"
-              align="center"
-              :show-overflow-tooltip="true"
-              :formatter="keyFormatter"
-            >
-            </el-table-column>
-            <el-table-column
-              label="鎿嶄綔"
-              width="60"
-              align="center"
-              class-name="small-padding fixed-width"
-            >
-              <template slot-scope="scope">
-                <el-button
-                  size="mini"
-                  type="text"
-                  icon="el-icon-delete"
-                  @click="handleClearCacheKey(scope.row)"
-                ></el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-card>
-      </el-col>
-
-      <el-col :span="8">
-        <el-card :bordered="false" style="height: calc(100vh - 125px)">
-          <div slot="header">
-            <span>缂撳瓨鍐呭</span>
-            <el-button
-              style="float: right; padding: 3px 0"
-              type="text"
-              icon="el-icon-refresh-right"
-              @click="handleClearCacheAll()"
-              >娓呯悊鍏ㄩ儴</el-button
-            >
-          </div>
-          <el-form :model="cacheForm">
-            <el-row :gutter="32">
-              <el-col :offset="1" :span="22">
-                <el-form-item label="缂撳瓨鍚嶇О:" prop="cacheName">
-                  <el-input v-model="cacheForm.cacheName" :readOnly="true" />
-                </el-form-item>
-              </el-col>
-              <el-col :offset="1" :span="22">
-                <el-form-item label="缂撳瓨閿悕:" prop="cacheKey">
-                  <el-input v-model="cacheForm.cacheKey" :readOnly="true" />
-                </el-form-item>
-              </el-col>
-              <el-col :offset="1" :span="22">
-                <el-form-item label="缂撳瓨鍐呭:" prop="cacheValue">
-                  <el-input
-                    v-model="cacheForm.cacheValue"
-                    type="textarea"
-                    :rows="8"
-                    :readOnly="true"
-                  />
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        </el-card>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { listCacheName, listCacheKey, getCacheValue, clearCacheName, clearCacheKey, clearCacheAll } from "@/api/monitor/cache";
-
-export default {
-  name: "CacheList",
-  data() {
-    return {
-      cacheNames: [],
-      cacheKeys: [],
-      cacheForm: {},
-      loading: true,
-      subLoading: false,
-      nowCacheName: "",
-      tableHeight: window.innerHeight - 200
-    };
-  },
-  created() {
-    this.getCacheNames();
-  },
-  methods: {
-    /** 鏌ヨ缂撳瓨鍚嶇О鍒楄〃 */
-    getCacheNames() {
-      this.loading = true;
-      listCacheName().then(response => {
-        this.cacheNames = response.data;
-        this.loading = false;
-      });
-    },
-    /** 鍒锋柊缂撳瓨鍚嶇О鍒楄〃 */
-    refreshCacheNames() {
-      this.getCacheNames();
-      this.$modal.msgSuccess("鍒锋柊缂撳瓨鍒楄〃鎴愬姛");
-    },
-    /** 娓呯悊鎸囧畾鍚嶇О缂撳瓨 */
-    handleClearCacheName(row) {
-      clearCacheName(row.cacheName).then(response => {
-        this.$modal.msgSuccess("娓呯悊缂撳瓨鍚嶇О[" + this.nowCacheName + "]鎴愬姛");
-        this.getCacheKeys();
-      });
-    },
-    /** 鏌ヨ缂撳瓨閿悕鍒楄〃 */
-    getCacheKeys(row) {
-      const cacheName = row !== undefined ? row.cacheName : this.nowCacheName;
-      if (cacheName === "") {
-        return;
-      }
-      this.subLoading = true;
-      listCacheKey(cacheName).then(response => {
-        this.cacheKeys = response.data;
-        this.subLoading = false;
-        this.nowCacheName = cacheName;
-      });
-    },
-    /** 鍒锋柊缂撳瓨閿悕鍒楄〃 */
-    refreshCacheKeys() {
-      this.getCacheKeys();
-      this.$modal.msgSuccess("鍒锋柊閿悕鍒楄〃鎴愬姛");
-    },
-    /** 娓呯悊鎸囧畾閿悕缂撳瓨 */
-    handleClearCacheKey(cacheKey) {
-      clearCacheKey(this.nowCacheName, cacheKey).then(response => {
-        this.$modal.msgSuccess("娓呯悊缂撳瓨閿悕[" + cacheKey + "]鎴愬姛");
-        this.getCacheKeys();
-      });
-    },
-    /** 鍒楄〃鍓嶇紑鍘婚櫎 */
-    nameFormatter(row) {
-      return row.cacheName.replace(":", "");
-    },
-    /** 閿悕鍓嶇紑鍘婚櫎 */
-    keyFormatter(cacheKey) {
-      return cacheKey.replace(this.nowCacheName, "");
-    },
-    /** 鏌ヨ缂撳瓨鍐呭璇︾粏 */
-    handleCacheValue(cacheKey) {
-      getCacheValue(this.nowCacheName, cacheKey).then(response => {
-        this.cacheForm = response.data;
-      });
-    },
-    /** 娓呯悊鍏ㄩ儴缂撳瓨 */
-    handleClearCacheAll() {
-      clearCacheAll().then(response => {
-        this.$modal.msgSuccess("娓呯悊鍏ㄩ儴缂撳瓨鎴愬姛");
-      });
-    }
-  },
-};
-</script>
diff --git a/ruoyi-ui/src/views/register.vue b/ruoyi-ui/src/views/register.vue
index 649c4d8..e8d9f0f 100644
--- a/ruoyi-ui/src/views/register.vue
+++ b/ruoyi-ui/src/views/register.vue
@@ -2,6 +2,16 @@
   <div class="register">
     <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
       <h3 class="title">RuoYi-Vue-Plus鍚庡彴绠$悊绯荤粺</h3>
+      <el-form-item prop="tenantId">
+        <el-input
+            v-model="loginForm.tenantId"
+            type="text"
+            auto-complete="off"
+            placeholder="绉熸埛缂栧彿"
+        >
+          <svg-icon slot="prefix" icon-class="input" class="el-input__icon input-icon" />
+        </el-input>
+      </el-form-item>
       <el-form-item prop="username">
         <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="璐﹀彿">
           <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
@@ -82,6 +92,7 @@
     return {
       codeUrl: "",
       registerForm: {
+        tenantId: "",
         username: "",
         password: "",
         confirmPassword: "",
@@ -90,6 +101,9 @@
         userType: "sys_user"
       },
       registerRules: {
+        tenantId: [
+          { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勭鎴风紪鍙�" }
+        ],
         username: [
           { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" },
           { min: 2, max: 20, message: '鐢ㄦ埛璐﹀彿闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿', trigger: 'blur' }
diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue
index f580b98..30597e3 100644
--- a/ruoyi-ui/src/views/system/config/index.vue
+++ b/ruoyi-ui/src/views/system/config/index.vue
@@ -104,7 +104,7 @@
 
     <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="鍙傛暟涓婚敭" align="center" prop="configId" />
+      <el-table-column label="鍙傛暟涓婚敭" align="center" prop="configId" v-if="false" />
       <el-table-column label="鍙傛暟鍚嶇О" align="center" prop="configName" :show-overflow-tooltip="true" />
       <el-table-column label="鍙傛暟閿悕" align="center" prop="configKey" :show-overflow-tooltip="true" />
       <el-table-column label="鍙傛暟閿��" align="center" prop="configValue" />
diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue
index c36cffc..2421917 100644
--- a/ruoyi-ui/src/views/system/dict/data.vue
+++ b/ruoyi-ui/src/views/system/dict/data.vue
@@ -92,7 +92,7 @@
 
     <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="瀛楀吀缂栫爜" align="center" prop="dictCode" />
+      <el-table-column label="瀛楀吀缂栫爜" align="center" prop="dictCode" v-if="false" />
       <el-table-column label="瀛楀吀鏍囩" align="center" prop="dictLabel">
         <template slot-scope="scope">
           <span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{scope.row.dictLabel}}</span>
diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue
index b6ed788..039ad37 100644
--- a/ruoyi-ui/src/views/system/dict/index.vue
+++ b/ruoyi-ui/src/views/system/dict/index.vue
@@ -109,7 +109,7 @@
 
     <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="瀛楀吀缂栧彿" align="center" prop="dictId" />
+      <el-table-column label="瀛楀吀缂栧彿" align="center" prop="dictId" v-if="false" />
       <el-table-column label="瀛楀吀鍚嶇О" align="center" prop="dictName" :show-overflow-tooltip="true" />
       <el-table-column label="瀛楀吀绫诲瀷" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue
index daf5c46..9022a91 100644
--- a/ruoyi-ui/src/views/system/notice/index.vue
+++ b/ruoyi-ui/src/views/system/notice/index.vue
@@ -71,7 +71,7 @@
 
     <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="搴忓彿" align="center" prop="noticeId" width="100" />
+      <el-table-column label="搴忓彿" align="center" prop="noticeId" width="100" v-if="false" />
       <el-table-column
         label="鍏憡鏍囬"
         align="center"
diff --git a/ruoyi-ui/src/views/system/post/index.vue b/ruoyi-ui/src/views/system/post/index.vue
index 444bf63..b939f71 100644
--- a/ruoyi-ui/src/views/system/post/index.vue
+++ b/ruoyi-ui/src/views/system/post/index.vue
@@ -81,7 +81,7 @@
 
     <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="宀椾綅缂栧彿" align="center" prop="postId" />
+      <el-table-column label="宀椾綅缂栧彿" align="center" prop="postId" v-if="false" />
       <el-table-column label="宀椾綅缂栫爜" align="center" prop="postCode" />
       <el-table-column label="宀椾綅鍚嶇О" align="center" prop="postName" />
       <el-table-column label="宀椾綅鎺掑簭" align="center" prop="postSort" />
diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue
index ca02f3a..319a449 100644
--- a/ruoyi-ui/src/views/system/role/index.vue
+++ b/ruoyi-ui/src/views/system/role/index.vue
@@ -99,7 +99,7 @@
 
     <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="瑙掕壊缂栧彿" prop="roleId" width="120" />
+      <el-table-column label="瑙掕壊缂栧彿" prop="roleId" width="120" v-if="false" />
       <el-table-column label="瑙掕壊鍚嶇О" prop="roleName" :show-overflow-tooltip="true" width="150" />
       <el-table-column label="鏉冮檺瀛楃" prop="roleKey" :show-overflow-tooltip="true" width="150" />
       <el-table-column label="鏄剧ず椤哄簭" prop="roleSort" width="100" />
diff --git a/ruoyi-ui/src/views/system/tenant/index.vue b/ruoyi-ui/src/views/system/tenant/index.vue
new file mode 100644
index 0000000..3aa20f4
--- /dev/null
+++ b/ruoyi-ui/src/views/system/tenant/index.vue
@@ -0,0 +1,419 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="绉熸埛缂栧彿" prop="tenantId">
+        <el-input
+          v-model="queryParams.tenantId"
+          placeholder="璇疯緭鍏ョ鎴风紪鍙�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="鑱旂郴浜�" prop="contactUserName">
+        <el-input
+          v-model="queryParams.contactUserName"
+          placeholder="璇疯緭鍏ヨ仈绯讳汉"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="鑱旂郴鐢佃瘽" prop="contactPhone">
+        <el-input
+          v-model="queryParams.contactPhone"
+          placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="浼佷笟鍚嶇О" prop="companyName">
+        <el-input
+          v-model="queryParams.companyName"
+          placeholder="璇疯緭鍏ヤ紒涓氬悕绉�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:tenant:add']"
+        >鏂板</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['system:tenant:edit']"
+        >淇敼</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['system:tenant:remove']"
+        >鍒犻櫎</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:tenant:export']"
+        >瀵煎嚭</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="tenantList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="id" align="center" prop="id" v-if="false"/>
+      <el-table-column label="绉熸埛缂栧彿" align="center" prop="tenantId" />
+      <el-table-column label="鑱旂郴浜�" align="center" prop="contactUserName" />
+      <el-table-column label="鑱旂郴鐢佃瘽" align="center" prop="contactPhone" />
+      <el-table-column label="浼佷笟鍚嶇О" align="center" prop="companyName" />
+      <el-table-column label="绀句細淇$敤浠g爜" align="center" prop="licenseNumber" />
+      <el-table-column label="杩囨湡鏃堕棿" align="center" prop="expireTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.expireTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="绉熸埛鐘舵��" align="center" prop="status">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.status"
+            active-value="0"
+            inactive-value="1"
+            @change="handleStatusChange(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:tenant:edit']"
+          >淇敼</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:tenant:remove']"
+          >鍒犻櫎</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 娣诲姞鎴栦慨鏀圭鎴峰璇濇 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="浼佷笟鍚嶇О" prop="companyName">
+          <el-input v-model="form.companyName" placeholder="璇疯緭鍏ヤ紒涓氬悕绉�" />
+        </el-form-item>
+        <el-form-item label="鑱旂郴浜�" prop="contactUserName">
+          <el-input v-model="form.contactUserName" placeholder="璇疯緭鍏ヨ仈绯讳汉" />
+        </el-form-item>
+        <el-form-item label="鑱旂郴鐢佃瘽" prop="contactPhone">
+          <el-input v-model="form.contactPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
+        </el-form-item>
+        <el-form-item v-if="form.id == undefined" label="鐢ㄦ埛鍚�" prop="username">
+          <el-input v-model="form.username" placeholder="璇疯緭鍏ョ郴缁熺敤鎴峰悕" maxlength="30"/>
+        </el-form-item>
+        <el-form-item v-if="form.id == undefined" label="鐢ㄦ埛瀵嗙爜" prop="password">
+          <el-input type="password" v-model="form.password" placeholder="璇疯緭鍏ョ郴缁熺敤鎴峰瘑鐮�" maxlength="20"/>
+        </el-form-item>
+        <el-form-item label="绉熸埛濂楅" prop="packageId">
+          <el-select v-model="form.packageId" :disabled="form.tenantId" placeholder="璇烽�夋嫨绉熸埛濂楅" clearable size="small" style="width: 100%">
+            <el-option v-for="item in packageList" :key="item.packageId" :label="item.packageName" :value="item.packageId"/>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="杩囨湡鏃堕棿" prop="expireTime">
+          <el-date-picker clearable
+                          v-model="form.expireTime"
+                          type="datetime"
+                          value-format="yyyy-MM-dd HH:mm:ss"
+                          placeholder="璇烽�夋嫨杩囨湡鏃堕棿">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="鐢ㄦ埛鏁伴噺" prop="accountCount">
+          <el-input v-model="form.accountCount" placeholder="璇疯緭鍏ョ敤鎴锋暟閲�" />
+        </el-form-item>
+        <el-form-item label="鍦板潃" prop="address">
+          <el-input v-model="form.address" placeholder="璇疯緭鍏ュ湴鍧�" />
+        </el-form-item>
+        <el-form-item label="浼佷笟浠g爜" prop="licenseNumber">
+          <el-input v-model="form.licenseNumber" placeholder="璇疯緭鍏ョ粺涓�绀句細淇$敤浠g爜" />
+        </el-form-item>
+        <el-form-item label="浼佷笟绠�浠�" prop="intro">
+          <el-input type="textarea" v-model="form.intro" placeholder="璇疯緭鍏ヤ紒涓氱畝浠�" />
+        </el-form-item>
+        <el-form-item label="澶囨敞" prop="remark">
+          <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button :loading="buttonLoading" type="primary" @click="submitForm">纭� 瀹�</el-button>
+        <el-button @click="cancel">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listTenant, getTenant, delTenant, addTenant, updateTenant, changeTenantStatus } from "@/api/system/tenant";
+import { listTenantPackage } from "@/api/system/tenantPackage";
+
+export default {
+  name: "Tenant",
+  dicts: ['sys_normal_disable'],
+  data() {
+    return {
+      // 鎸夐挳loading
+      buttonLoading: false,
+      // 閬僵灞�
+      loading: true,
+      // 閫変腑鏁扮粍
+      ids: [],
+      // 闈炲崟涓鐢�
+      single: true,
+      // 闈炲涓鐢�
+      multiple: true,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 绉熸埛琛ㄦ牸鏁版嵁
+      tenantList: [],
+      // 寮瑰嚭灞傛爣棰�
+      title: "",
+      // 鏄惁鏄剧ず寮瑰嚭灞�
+      open: false,
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        tenantId: undefined,
+        contactUserName: undefined,
+        contactPhone: undefined,
+        companyName: undefined,
+        licenseNumber: undefined,
+        address: undefined,
+        intro: undefined,
+        packageId: undefined,
+        expireTime: undefined,
+        accountCount: undefined,
+        status: undefined,
+      },
+      // 琛ㄥ崟鍙傛暟
+      form: {},
+      // 绉熸埛濂楅鍒楄〃
+      packageList: [],
+      // 琛ㄥ崟鏍¢獙
+      rules: {
+        id: [
+          { required: true, message: "id涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        tenantId: [
+          { required: true, message: "绉熸埛缂栧彿涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        contactUserName: [
+          { required: true, message: "鑱旂郴浜轰笉鑳戒负绌�", trigger: "blur" }
+        ],
+        contactPhone: [
+          { required: true, message: "鑱旂郴鐢佃瘽涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        companyName: [
+          { required: true, message: "浼佷笟鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        username: [
+          { required: true, message: "鐢ㄦ埛鍚嶄笉鑳戒负绌�", trigger: "blur" },
+          { min: 2, max: 20, message: '鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿', trigger: 'blur' }
+        ],
+        password: [
+          { required: true, message: "瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
+          { min: 5, max: 20, message: '鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿', trigger: 'blur' }
+        ],
+        packageId: [
+          { required: true, message: "绉熸埛濂楅涓嶈兘涓虹┖", trigger: "blur" }
+        ]
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 鏌ヨ鎵�鏈夌鎴峰椁� */
+    getTenantPackage(){
+      listTenantPackage().then(res =>{
+        this.packageList = res.rows;
+      })
+    },
+    /** 鏌ヨ绉熸埛鍒楄〃 */
+    getList() {
+      this.loading = true;
+      listTenant(this.queryParams).then(response => {
+        this.tenantList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 绉熸埛濂楅鐘舵�佷慨鏀�
+    handleStatusChange(row) {
+      let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
+      this.$modal.confirm('纭瑕�"' + text + '""' + row.companyName + '"绉熸埛鍚楋紵').then(function() {
+        return changeTenantStatus(row.id, row.status);
+      }).then(() => {
+        this.$modal.msgSuccess(text + "鎴愬姛");
+      }).catch(function() {
+        row.status = row.status === "0" ? "1" : "0";
+      });
+    },
+    // 鍙栨秷鎸夐挳
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 琛ㄥ崟閲嶇疆
+    reset() {
+      this.form = {
+        id: undefined,
+        tenantId: undefined,
+        contactUserName: undefined,
+        contactPhone: undefined,
+        username: undefined,
+        password: undefined,
+        companyName: undefined,
+        licenseNumber: undefined,
+        address: undefined,
+        intro: undefined,
+        remark: undefined,
+        packageId: undefined,
+        expireTime: undefined,
+        accountCount: undefined,
+        status: undefined,
+        delFlag: undefined,
+        createDept: undefined,
+        createBy: undefined,
+        createTime: undefined,
+        updateBy: undefined,
+        updateTime: undefined
+      };
+      this.resetForm("form");
+    },
+    /** 鎼滅储鎸夐挳鎿嶄綔 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 澶氶�夋閫変腑鏁版嵁
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 鏂板鎸夐挳鎿嶄綔 */
+    handleAdd() {
+      this.reset();
+      this.getTenantPackage();
+      this.open = true;
+      this.title = "娣诲姞绉熸埛";
+    },
+    /** 淇敼鎸夐挳鎿嶄綔 */
+    handleUpdate(row) {
+      this.loading = true;
+      this.reset();
+      const id = row.id || this.ids
+      getTenant(id).then(response => {
+        this.loading = false;
+        this.form = response.data;
+        this.open = true;
+        this.title = "淇敼绉熸埛";
+      });
+    },
+    /** 鎻愪氦鎸夐挳 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.buttonLoading = true;
+          if (this.form.id != null) {
+            updateTenant(this.form).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
+            }).finally(() => {
+              this.buttonLoading = false;
+            });
+          } else {
+            addTenant(this.form).then(response => {
+              this.$modal.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
+            }).finally(() => {
+              this.buttonLoading = false;
+            });
+          }
+        }
+      });
+    },
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('鏄惁纭鍒犻櫎绉熸埛缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(() => {
+        this.loading = true;
+        return delTenant(ids);
+      }).then(() => {
+        this.loading = false;
+        this.getList();
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => {
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      this.download('system/tenant/export', {
+        ...this.queryParams
+      }, `tenant_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>
diff --git a/ruoyi-ui/src/views/system/tenantPackage/index.vue b/ruoyi-ui/src/views/system/tenantPackage/index.vue
new file mode 100644
index 0000000..d20943b
--- /dev/null
+++ b/ruoyi-ui/src/views/system/tenantPackage/index.vue
@@ -0,0 +1,388 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="濂楅鍚嶇О" prop="packageName">
+        <el-input
+          v-model="queryParams.packageName"
+          placeholder="璇疯緭鍏ュ椁愬悕绉�"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:tenantPackage:add']"
+        >鏂板</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['system:tenantPackage:edit']"
+        >淇敼</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['system:tenantPackage:remove']"
+        >鍒犻櫎</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:tenantPackage:export']"
+        >瀵煎嚭</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="tenantPackageList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="绉熸埛濂楅id" align="center" prop="packageId" v-if="false"/>
+      <el-table-column label="濂楅鍚嶇О" align="center" prop="packageName" />
+      <el-table-column label="澶囨敞" align="center" prop="remark" />
+      <el-table-column label="鐘舵��" align="center" prop="status" >
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.status"
+            active-value="0"
+            inactive-value="1"
+            @change="handleStatusChange(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:tenantPackage:edit']"
+          >淇敼</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:tenantPackage:remove']"
+          >鍒犻櫎</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 娣诲姞鎴栦慨鏀圭鎴峰椁愬璇濇 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="濂楅鍚嶇О" prop="packageName">
+          <el-input v-model="form.packageName" placeholder="璇疯緭鍏ュ椁愬悕绉�" />
+        </el-form-item>
+        <el-form-item label="鍏宠仈鑿滃崟">
+          <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">灞曞紑/鎶樺彔</el-checkbox>
+          <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">鍏ㄩ��/鍏ㄤ笉閫�</el-checkbox>
+          <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">鐖跺瓙鑱斿姩</el-checkbox>
+          <el-tree
+            class="tree-border"
+            :data="menuOptions"
+            show-checkbox
+            ref="menu"
+            node-key="id"
+            :check-strictly="!form.menuCheckStrictly"
+            empty-text="鍔犺浇涓紝璇风◢鍊�"
+            :props="defaultProps"
+          ></el-tree>
+        </el-form-item>
+        <el-form-item label="澶囨敞" prop="remark">
+          <el-input v-model="form.remark" placeholder="璇疯緭鍏ュ娉�" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button :loading="buttonLoading" type="primary" @click="submitForm">纭� 瀹�</el-button>
+        <el-button @click="cancel">鍙� 娑�</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listTenantPackage, getTenantPackage, delTenantPackage, addTenantPackage, updateTenantPackage, changePackageStatus } from "@/api/system/tenantPackage";
+import { treeselect as menuTreeselect, tenantPackageMenuTreeselect } from "@/api/system/menu";
+
+export default {
+  name: "TenantPackage",
+  dicts: ['sys_normal_disable'],
+  data() {
+    return {
+      // 鎸夐挳loading
+      buttonLoading: false,
+      // 閬僵灞�
+      loading: true,
+      // 閫変腑鏁扮粍
+      ids: [],
+      // 闈炲崟涓鐢�
+      single: true,
+      // 闈炲涓鐢�
+      multiple: true,
+      // 鏄剧ず鎼滅储鏉′欢
+      showSearch: true,
+      // 鎬绘潯鏁�
+      total: 0,
+      // 绉熸埛濂楅琛ㄦ牸鏁版嵁
+      tenantPackageList: [],
+      // 寮瑰嚭灞傛爣棰�
+      title: "",
+      // 鏄惁鏄剧ず寮瑰嚭灞�
+      open: false,
+      menuExpand: false,
+      menuNodeAll: false,
+      // 鑿滃崟鍒楄〃
+      menuOptions: [],
+      // 鏌ヨ鍙傛暟
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        packageName: undefined,
+        status: undefined,
+      },
+      // 琛ㄥ崟鍙傛暟
+      form: {},
+      defaultProps: {
+        children: "children",
+        label: "label"
+      },
+      // 琛ㄥ崟鏍¢獙
+      rules: {
+        packageId: [
+          { required: true, message: "绉熸埛濂楅id涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+        packageName: [
+          { required: true, message: "濂楅鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 鏌ヨ鑿滃崟鏍戠粨鏋� */
+    getMenuTreeselect() {
+      menuTreeselect().then(response => {
+        this.menuOptions = response.data;
+      });
+    },
+    // 鎵�鏈夎彍鍗曡妭鐐规暟鎹�
+    getMenuAllCheckedKeys() {
+      // 鐩墠琚�変腑鐨勮彍鍗曡妭鐐�
+      let checkedKeys = this.$refs.menu.getCheckedKeys();
+      // 鍗婇�変腑鐨勮彍鍗曡妭鐐�
+      let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
+      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
+      return checkedKeys;
+    },
+    /** 鏍规嵁绉熸埛濂楅ID鏌ヨ鑿滃崟鏍戠粨鏋� */
+    getPackageMenuTreeselect(packageId) {
+      return tenantPackageMenuTreeselect(packageId).then(response => {
+        this.menuOptions = response.data.menus;
+        return response;
+      });
+    },
+    /** 鏌ヨ绉熸埛濂楅鍒楄〃 */
+    getList() {
+      this.loading = true;
+      listTenantPackage(this.queryParams).then(response => {
+        this.tenantPackageList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 绉熸埛濂楅鐘舵�佷慨鏀�
+    handleStatusChange(row) {
+      let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
+      this.$modal.confirm('纭瑕�"' + text + '""' + row.packageName + '"濂楅鍚楋紵').then(function() {
+        return changePackageStatus(row.packageId, row.status);
+      }).then(() => {
+        this.$modal.msgSuccess(text + "鎴愬姛");
+      }).catch(function() {
+        row.status = row.status === "0" ? "1" : "0";
+      });
+    },
+    // 鍙栨秷鎸夐挳
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 琛ㄥ崟閲嶇疆
+    reset() {
+      if (this.$refs.menu != undefined) {
+        this.$refs.menu.setCheckedKeys([]);
+      }
+      this.menuExpand = false;
+      this.menuNodeAll = false;
+      this.form = {
+        packageId: undefined,
+        packageName: undefined,
+        menuIds: undefined,
+        remark: undefined,
+        menuCheckStrictly: true,
+        status: undefined,
+        delFlag: undefined,
+        createDept: undefined,
+        createBy: undefined,
+        createTime: undefined,
+        updateBy: undefined,
+        updateTime: undefined
+      };
+      this.resetForm("form");
+    },
+    /** 鎼滅储鎸夐挳鎿嶄綔 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 閲嶇疆鎸夐挳鎿嶄綔 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 澶氶�夋閫変腑鏁版嵁
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.packageId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    // 鏍戞潈闄愶紙灞曞紑/鎶樺彔锛�
+    handleCheckedTreeExpand(value, type) {
+      if (type == 'menu') {
+        let treeList = this.menuOptions;
+        for (let i = 0; i < treeList.length; i++) {
+          this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value;
+        }
+      }
+    },
+    // 鏍戞潈闄愶紙鍏ㄩ��/鍏ㄤ笉閫夛級
+    handleCheckedTreeNodeAll(value, type) {
+      if (type == 'menu') {
+        this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []);
+      }
+    },
+    // 鏍戞潈闄愶紙鐖跺瓙鑱斿姩锛�
+    handleCheckedTreeConnect(value, type) {
+      if (type == 'menu') {
+        this.form.menuCheckStrictly = value ? true: false;
+      }
+    },
+    /** 鏂板鎸夐挳鎿嶄綔 */
+    handleAdd() {
+      this.reset();
+      this.getMenuTreeselect();
+      this.open = true;
+      this.title = "娣诲姞绉熸埛濂楅";
+    },
+    /** 淇敼鎸夐挳鎿嶄綔 */
+    handleUpdate(row) {
+      this.loading = true;
+      this.reset();
+      const packageId = row.packageId || this.ids
+      const packageMenu = this.getPackageMenuTreeselect(packageId);
+      getTenantPackage(packageId).then(response => {
+        this.loading = false;
+        this.form = response.data;
+        this.open = true;
+        this.$nextTick(() => {
+          packageMenu.then(res => {
+            let checkedKeys = res.data.checkedKeys
+            checkedKeys.forEach((v) => {
+              this.$nextTick(()=>{
+                this.$refs.menu.setChecked(v, true ,false);
+              })
+            })
+          });
+        });
+        this.title = "淇敼绉熸埛濂楅";
+      });
+    },
+    /** 鎻愪氦鎸夐挳 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.buttonLoading = true;
+          if (this.form.packageId != null) {
+            this.form.menuIds = this.getMenuAllCheckedKeys();
+            updateTenantPackage(this.form).then(response => {
+              this.$modal.msgSuccess("淇敼鎴愬姛");
+              this.open = false;
+              this.getList();
+            }).finally(() => {
+              this.buttonLoading = false;
+            });
+          } else {
+            this.form.menuIds = this.getMenuAllCheckedKeys();
+            addTenantPackage(this.form).then(response => {
+              this.$modal.msgSuccess("鏂板鎴愬姛");
+              this.open = false;
+              this.getList();
+            }).finally(() => {
+              this.buttonLoading = false;
+            });
+          }
+        }
+      });
+    },
+    /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+    handleDelete(row) {
+      const packageIds = row.packageId || this.ids;
+      this.$modal.confirm('鏄惁纭鍒犻櫎绉熸埛濂楅缂栧彿涓�"' + packageIds + '"鐨勬暟鎹」锛�').then(() => {
+        this.loading = true;
+        return delTenantPackage(packageIds);
+      }).then(() => {
+        this.loading = false;
+        this.getList();
+        this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+      }).catch(() => {
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+    /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+    handleExport() {
+      this.download('system/tenantPackage/export', {
+        ...this.queryParams
+      }, `tenantPackage_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index b2120e6..0fcb4d9 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -414,7 +414,7 @@
       },
       // 鍒椾俊鎭�
       columns: [
-        { key: 0, label: `鐢ㄦ埛缂栧彿`, visible: true },
+        { key: 0, label: `鐢ㄦ埛缂栧彿`, visible: false },
         { key: 1, label: `鐢ㄦ埛鍚嶇О`, visible: true },
         { key: 2, label: `鐢ㄦ埛鏄电О`, visible: true },
         { key: 3, label: `閮ㄩ棬`, visible: true },
diff --git a/script/sql/oracle/oracle_ry_vue_5.X.sql b/script/sql/oracle/oracle_ry_vue_5.X.sql
index 46e3ba1..63b38ef 100644
--- a/script/sql/oracle/oracle_ry_vue_5.X.sql
+++ b/script/sql/oracle/oracle_ry_vue_5.X.sql
@@ -1,8 +1,98 @@
 -- ----------------------------
+-- 绉熸埛琛�
+-- ----------------------------
+create table sys_tenant (
+    id                number(20)    not null,
+    tenant_id         varchar2(20)  not null,
+    contact_user_name varchar2(20)  default '',
+    contact_phone     varchar2(20)  default '',
+    company_name      varchar2(50)  default '',
+    license_number    varchar2(30)  default '',
+    address           varchar2(200) default '',
+    intro             varchar2(200) default '',
+    domain            varchar2(200) default '',
+    remark            varchar2(200) default '',
+    package_id        number(20)    default null,
+    expire_time       date          default null,
+    account_count     number(4)     default -1,
+    status            char(1)       default '0',
+    del_flag          char(1)       default '0',
+    create_dept       number(20)    default null,
+    create_by         number(20)    default null,
+    create_time       date,
+    update_by         number(20)    default null,
+    update_time       date
+);
+
+alter table sys_tenant add constraint pk_sys_tenant primary key (id);
+
+comment on table   sys_tenant                    is '绉熸埛琛�';
+comment on column  sys_tenant.tenant_id          is '绉熸埛缂栧彿';
+comment on column  sys_tenant.contact_phone      is '鑱旂郴鐢佃瘽';
+comment on column  sys_tenant.company_name       is '浼佷笟鍚嶇О';
+comment on column  sys_tenant.company_name       is '鑱旂郴浜�';
+comment on column  sys_tenant.license_number     is '缁熶竴绀句細淇$敤浠g爜';
+comment on column  sys_tenant.address            is '鍦板潃';
+comment on column  sys_tenant.intro              is '浼佷笟绠�浠�';
+comment on column  sys_tenant.remark             is '澶囨敞';
+comment on column  sys_tenant.package_id         is '绉熸埛濂楅缂栧彿';
+comment on column  sys_tenant.expire_time        is '杩囨湡鏃堕棿';
+comment on column  sys_tenant.account_count      is '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級';
+comment on column  sys_tenant.status             is '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column  sys_tenant.del_flag           is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on column  sys_tenant.create_dept        is '鍒涘缓閮ㄩ棬';
+comment on column  sys_tenant.create_by          is '鍒涘缓鑰�';
+comment on column  sys_tenant.create_time        is '鍒涘缓鏃堕棿';
+comment on column  sys_tenant.update_by          is '鏇存柊鑰�';
+comment on column  sys_tenant.update_time        is '鏇存柊鏃堕棿';
+
+-- ----------------------------
+-- 鍒濆鍖�-绉熸埛琛ㄦ暟鎹�
+-- ----------------------------
+
+insert into sys_tenant values(1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', null, null, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', null, null, null, null, -1, '0', '0', 103, 1, sysdate, null, null);
+
+
+-- ----------------------------
+-- 绉熸埛濂楅琛�
+-- ----------------------------
+create table sys_tenant_package (
+    package_id              number(20)      not null,
+    package_name            varchar2(20)    default '',
+    menu_ids                varchar2(3000)  default '',
+    remark                  varchar2(200)   default '',
+    menu_check_strictly     number(1)       default 1,
+    status                  char(1)         default '0',
+    del_flag                char(1)         default '0',
+    create_dept             number(20)      default null,
+    create_by               number(20)      default null,
+    create_time             date,
+    update_by               number(20)      default null,
+    update_time             date
+);
+
+alter table sys_tenant_package add constraint pk_sys_tenant_package primary key (package_id);
+
+comment on table   sys_tenant_package                    is '绉熸埛濂楅琛�';
+comment on column  sys_tenant_package.package_id         is '绉熸埛濂楅id';
+comment on column  sys_tenant_package.package_name       is '濂楅鍚嶇О';
+comment on column  sys_tenant_package.menu_ids           is '鍏宠仈鑿滃崟id';
+comment on column  sys_tenant_package.remark             is '澶囨敞';
+comment on column  sys_tenant_package.status             is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column  sys_tenant_package.del_flag           is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on column  sys_tenant_package.create_dept        is '鍒涘缓閮ㄩ棬';
+comment on column  sys_tenant_package.create_by          is '鍒涘缓鑰�';
+comment on column  sys_tenant_package.create_time        is '鍒涘缓鏃堕棿';
+comment on column  sys_tenant_package.update_by          is '鏇存柊鑰�';
+comment on column  sys_tenant_package.update_time        is '鏇存柊鏃堕棿';
+
+
+-- ----------------------------
 -- 1銆侀儴闂ㄨ〃
 -- ----------------------------
 create table sys_dept (
   dept_id           number(20)      not null,
+  tenant_id         varchar2(20)    not null,
   parent_id         number(20)      default 0,
   ancestors         varchar2(500)   default '',
   dept_name         varchar2(30)    default '',
@@ -23,6 +113,7 @@
 
 comment on table  sys_dept              is '閮ㄩ棬琛�';
 comment on column sys_dept.dept_id      is '閮ㄩ棬id';
+comment on column sys_dept.tenant_id    is '绉熸埛缂栧彿';
 comment on column sys_dept.parent_id    is '鐖堕儴闂╥d';
 comment on column sys_dept.ancestors    is '绁栫骇鍒楄〃';
 comment on column sys_dept.dept_name    is '閮ㄩ棬鍚嶇О';
@@ -41,16 +132,16 @@
 -- ----------------------------
 -- 鍒濆鍖�-閮ㄩ棬琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_dept values(100,  0,   '0',          '鑻ヤ緷绉戞妧',   0, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(101,  100, '0,100',      '娣卞湷鎬诲叕鍙�', 1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(102,  100, '0,100',      '闀挎矙鍒嗗叕鍙�', 2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(103,  101, '0,100,101',  '鐮斿彂閮ㄩ棬',   1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(104,  101, '0,100,101',  '甯傚満閮ㄩ棬',   2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(105,  101, '0,100,101',  '娴嬭瘯閮ㄩ棬',   3, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(106,  101, '0,100,101',  '璐㈠姟閮ㄩ棬',   4, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(107,  101, '0,100,101',  '杩愮淮閮ㄩ棬',   5, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(108,  102, '0,100,102',  '甯傚満閮ㄩ棬',   1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
-insert into sys_dept values(109,  102, '0,100,102',  '璐㈠姟閮ㄩ棬',   2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(100, '000000', 0,   '0',          'XXX绉戞妧',   0, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(101, '000000', 100, '0,100',      '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(102, '000000', 100, '0,100',      '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(103, '000000', 101, '0,100,101',  '鐮斿彂閮ㄩ棬',   1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(104, '000000', 101, '0,100,101',  '甯傚満閮ㄩ棬',   2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(105, '000000', 101, '0,100,101',  '娴嬭瘯閮ㄩ棬',   3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(106, '000000', 101, '0,100,101',  '璐㈠姟閮ㄩ棬',   4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(107, '000000', 101, '0,100,101',  '杩愮淮閮ㄩ棬',   5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(108, '000000', 102, '0,100,102',  '甯傚満閮ㄩ棬',   1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
+insert into sys_dept values(109, '000000', 102, '0,100,102',  '璐㈠姟閮ㄩ棬',   2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
 
 
 -- ----------------------------
@@ -58,6 +149,7 @@
 -- ----------------------------
 create table sys_user (
   user_id           number(20)      not null,
+  tenant_id         varchar2(20)    not null,
   dept_id           number(20)      default null,
   user_name         varchar2(40)    not null,
   nick_name         varchar2(40)    not null,
@@ -83,6 +175,7 @@
 
 comment on table  sys_user              is '鐢ㄦ埛淇℃伅琛�';
 comment on column sys_user.user_id      is '鐢ㄦ埛ID';
+comment on column sys_user.tenant_id    is '绉熸埛缂栧彿';
 comment on column sys_user.dept_id      is '閮ㄩ棬ID';
 comment on column sys_user.user_name    is '鐢ㄦ埛璐﹀彿';
 comment on column sys_user.nick_name    is '鐢ㄦ埛鏄电О';
@@ -106,8 +199,8 @@
 -- ----------------------------
 -- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_user values(1,  103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '绠$悊鍛�');
-insert into sys_user values(2,  105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com',  '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '娴嬭瘯鍛�');
+insert into sys_user values(1, '000000', 103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '绠$悊鍛�');
+insert into sys_user values(2, '000000', 105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com',  '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '娴嬭瘯鍛�');
 
 
 -- ----------------------------
@@ -115,6 +208,7 @@
 -- ----------------------------
 create table sys_post (
   post_id           number(20)      not null,
+  tenant_id         varchar2(20)    not null,
   post_code         varchar2(64)    not null,
   post_name         varchar2(50)    not null,
   post_sort         number(4)       not null,
@@ -131,6 +225,7 @@
 
 comment on table  sys_post              is '宀椾綅淇℃伅琛�';
 comment on column sys_post.post_id      is '宀椾綅ID';
+comment on column sys_post.tenant_id    is '绉熸埛缂栧彿';
 comment on column sys_post.post_code    is '宀椾綅缂栫爜';
 comment on column sys_post.post_name    is '宀椾綅鍚嶇О';
 comment on column sys_post.post_sort    is '鏄剧ず椤哄簭';
@@ -145,10 +240,10 @@
 -- ----------------------------
 -- 鍒濆鍖�-宀椾綅淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_post values(1, 'ceo',  '钁d簨闀�',    1, '0', 103, 1, sysdate, null, null, '');
-insert into sys_post values(2, 'se',   '椤圭洰缁忕悊',  2, '0', 103, 1, sysdate, null, null, '');
-insert into sys_post values(3, 'hr',   '浜哄姏璧勬簮',  3, '0', 103, 1, sysdate, null, null, '');
-insert into sys_post values(4, 'user', '鏅�氬憳宸�',  4, '0', 103, 1, sysdate, null, null, '');
+insert into sys_post values(1, '000000', 'ceo',  '钁d簨闀�',    1, '0', 103, 1, sysdate, null, null, '');
+insert into sys_post values(2, '000000', 'se',   '椤圭洰缁忕悊',  2, '0', 103, 1, sysdate, null, null, '');
+insert into sys_post values(3, '000000', 'hr',   '浜哄姏璧勬簮',  3, '0', 103, 1, sysdate, null, null, '');
+insert into sys_post values(4, '000000', 'user', '鏅�氬憳宸�',  4, '0', 103, 1, sysdate, null, null, '');
 
 
 -- ----------------------------
@@ -156,6 +251,7 @@
 -- ----------------------------
 create table sys_role (
   role_id              number(20)      not null,
+  tenant_id            varchar2(20)    not null,
   role_name            varchar2(30)    not null,
   role_key             varchar2(100)   not null,
   role_sort            number(4)       not null,
@@ -176,6 +272,7 @@
 
 comment on table  sys_role                       is '瑙掕壊淇℃伅琛�';
 comment on column sys_role.role_id               is '瑙掕壊ID';
+comment on column sys_role.tenant_id             is '绉熸埛缂栧彿';
 comment on column sys_role.role_name             is '瑙掕壊鍚嶇О';
 comment on column sys_role.role_key              is '瑙掕壊鏉冮檺瀛楃涓�';
 comment on column sys_role.role_sort             is '鏄剧ず椤哄簭';
@@ -194,8 +291,8 @@
 -- ----------------------------
 -- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_role values('1', '瓒呯骇绠$悊鍛�',  'admin',  1, 1, 1, 1, '0', '0', 103, 1, sysdate, null, null, '瓒呯骇绠$悊鍛�');
-insert into sys_role values('2', '鏅�氳鑹�',    'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate, null, null, '鏅�氳鑹�');
+insert into sys_role values('1', '000000', '瓒呯骇绠$悊鍛�',  'superadmin',  1, 1, 1, 1, '0', '0', 103, 1, sysdate, null, null, '瓒呯骇绠$悊鍛�');
+insert into sys_role values('2', '000000', '鏅�氳鑹�',    'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate, null, null, '鏅�氳鑹�');
 
 
 -- ----------------------------
@@ -253,30 +350,32 @@
 -- ----------------------------
 -- 涓�绾ц彍鍗�
 insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system',           null, '', 1, 0, 'M', '0', '0', '', 'system',   103, 1, sysdate, null, null, '绯荤粺绠$悊鐩綍');
-insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '2', 'monitor',          null, '', 1, 0, 'M', '0', '0', '', 'monitor',  103, 1, sysdate, null, null, '绯荤粺鐩戞帶鐩綍');
-insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '3', 'tool',             null, '', 1, 0, 'M', '0', '0', '', 'tool',     103, 1, sysdate, null, null, '绯荤粺宸ュ叿鐩綍');
-insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '4', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide',    103, 1, sysdate, null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
+insert into sys_menu values('6', '绉熸埛绠$悊', '0', '2', 'tenant',           null, '', 1, 0, 'M', '0', '0', '', 'chart',    103, 1, sysdate, null, null, '绉熸埛绠$悊鐩綍');
+insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '3', 'monitor',          null, '', 1, 0, 'M', '0', '0', '', 'monitor',  103, 1, sysdate, null, null, '绯荤粺鐩戞帶鐩綍');
+insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '4', 'tool',             null, '', 1, 0, 'M', '0', '0', '', 'tool',     103, 1, sysdate, null, null, '绯荤粺宸ュ叿鐩綍');
+insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide',    103, 1, sysdate, null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
 -- 浜岀骇鑿滃崟
-insert into sys_menu values('100',  '鐢ㄦ埛绠$悊', '1',   '1', 'user',       'system/user/index',        '', 1, 0, 'C', '0', '0', 'system:user:list',        'user',          103, 1, sysdate, null, null, '鐢ㄦ埛绠$悊鑿滃崟');
-insert into sys_menu values('101',  '瑙掕壊绠$悊', '1',   '2', 'role',       'system/role/index',        '', 1, 0, 'C', '0', '0', 'system:role:list',        'peoples',       103, 1, sysdate, null, null, '瑙掕壊绠$悊鑿滃崟');
-insert into sys_menu values('102',  '鑿滃崟绠$悊', '1',   '3', 'menu',       'system/menu/index',        '', 1, 0, 'C', '0', '0', 'system:menu:list',        'tree-table',    103, 1, sysdate, null, null, '鑿滃崟绠$悊鑿滃崟');
-insert into sys_menu values('103',  '閮ㄩ棬绠$悊', '1',   '4', 'dept',       'system/dept/index',        '', 1, 0, 'C', '0', '0', 'system:dept:list',        'tree',          103, 1, sysdate, null, null, '閮ㄩ棬绠$悊鑿滃崟');
-insert into sys_menu values('104',  '宀椾綅绠$悊', '1',   '5', 'post',       'system/post/index',        '', 1, 0, 'C', '0', '0', 'system:post:list',        'post',          103, 1, sysdate, null, null, '宀椾綅绠$悊鑿滃崟');
-insert into sys_menu values('105',  '瀛楀吀绠$悊', '1',   '6', 'dict',       'system/dict/index',        '', 1, 0, 'C', '0', '0', 'system:dict:list',        'dict',          103, 1, sysdate, null, null, '瀛楀吀绠$悊鑿滃崟');
-insert into sys_menu values('106',  '鍙傛暟璁剧疆', '1',   '7', 'config',     'system/config/index',      '', 1, 0, 'C', '0', '0', 'system:config:list',      'edit',          103, 1, sysdate, null, null, '鍙傛暟璁剧疆鑿滃崟');
-insert into sys_menu values('107',  '閫氱煡鍏憡', '1',   '8', 'notice',     'system/notice/index',      '', 1, 0, 'C', '0', '0', 'system:notice:list',      'message',       103, 1, sysdate, null, null, '閫氱煡鍏憡鑿滃崟');
-insert into sys_menu values('108',  '鏃ュ織绠$悊', '1',   '9', 'log',        '',                         '', 1, 0, 'M', '0', '0', '',                        'log',           103, 1, sysdate, null, null, '鏃ュ織绠$悊鑿滃崟');
-insert into sys_menu values('109',  '鍦ㄧ嚎鐢ㄦ埛', '2',   '1', 'online',     'monitor/online/index',     '', 1, 0, 'C', '0', '0', 'monitor:online:list',     'online',        103, 1, sysdate, null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
-insert into sys_menu values('112',  '缂撳瓨鍒楄〃', '2',   '6', 'cacheList',  'monitor/cache/list',       '', 1, 0, 'C', '0', '0', 'monitor:cache:list',      'redis-list',    103, 1, sysdate, null, null, '缂撳瓨鍒楄〃鑿滃崟');
-insert into sys_menu values('113',  '缂撳瓨鐩戞帶', '2',   '5', 'cache',      'monitor/cache/index',      '', 1, 0, 'C', '0', '0', 'monitor:cache:list',      'redis',         103, 1, sysdate, null, null, '缂撳瓨鐩戞帶鑿滃崟');
-insert into sys_menu values('114',  '琛ㄥ崟鏋勫缓', '3',   '1', 'build',      'tool/build/index',         '', 1, 0, 'C', '0', '0', 'tool:build:list',         'build',         103, 1, sysdate, null, null, '琛ㄥ崟鏋勫缓鑿滃崟');
-insert into sys_menu values('115',  '浠g爜鐢熸垚', '3',   '2', 'gen',        'tool/gen/index',           '', 1, 0, 'C', '0', '0', 'tool:gen:list',           'code',          103, 1, sysdate, null, null, '浠g爜鐢熸垚鑿滃崟');
+insert into sys_menu values('100',  '鐢ㄦ埛绠$悊',     '1',   '1', 'user',             'system/user/index',            '', 1, 0, 'C', '0', '0', 'system:user:list',            'user',          103, 1, sysdate, null, null, '鐢ㄦ埛绠$悊鑿滃崟');
+insert into sys_menu values('101',  '瑙掕壊绠$悊',     '1',   '2', 'role',             'system/role/index',            '', 1, 0, 'C', '0', '0', 'system:role:list',            'peoples',       103, 1, sysdate, null, null, '瑙掕壊绠$悊鑿滃崟');
+insert into sys_menu values('102',  '鑿滃崟绠$悊',     '1',   '3', 'menu',             'system/menu/index',            '', 1, 0, 'C', '0', '0', 'system:menu:list',            'tree-table',    103, 1, sysdate, null, null, '鑿滃崟绠$悊鑿滃崟');
+insert into sys_menu values('103',  '閮ㄩ棬绠$悊',     '1',   '4', 'dept',             'system/dept/index',            '', 1, 0, 'C', '0', '0', 'system:dept:list',            'tree',          103, 1, sysdate, null, null, '閮ㄩ棬绠$悊鑿滃崟');
+insert into sys_menu values('104',  '宀椾綅绠$悊',     '1',   '5', 'post',             'system/post/index',            '', 1, 0, 'C', '0', '0', 'system:post:list',            'post',          103, 1, sysdate, null, null, '宀椾綅绠$悊鑿滃崟');
+insert into sys_menu values('105',  '瀛楀吀绠$悊',     '1',   '6', 'dict',             'system/dict/index',            '', 1, 0, 'C', '0', '0', 'system:dict:list',            'dict',          103, 1, sysdate, null, null, '瀛楀吀绠$悊鑿滃崟');
+insert into sys_menu values('106',  '鍙傛暟璁剧疆',     '1',   '7', 'config',           'system/config/index',          '', 1, 0, 'C', '0', '0', 'system:config:list',          'edit',          103, 1, sysdate, null, null, '鍙傛暟璁剧疆鑿滃崟');
+insert into sys_menu values('107',  '閫氱煡鍏憡',     '1',   '8', 'notice',           'system/notice/index',          '', 1, 0, 'C', '0', '0', 'system:notice:list',          'message',       103, 1, sysdate, null, null, '閫氱煡鍏憡鑿滃崟');
+insert into sys_menu values('108',  '鏃ュ織绠$悊',     '1',   '9', 'log',              '',                             '', 1, 0, 'M', '0', '0', '',                            'log',           103, 1, sysdate, null, null, '鏃ュ織绠$悊鑿滃崟');
+insert into sys_menu values('109',  '鍦ㄧ嚎鐢ㄦ埛',     '2',   '1', 'online',           'monitor/online/index',         '', 1, 0, 'C', '0', '0', 'monitor:online:list',         'online',        103, 1, sysdate, null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
+insert into sys_menu values('113',  '缂撳瓨鐩戞帶',     '2',   '5', 'cache',            'monitor/cache/index',          '', 1, 0, 'C', '0', '0', 'monitor:cache:list',          'redis',         103, 1, sysdate, null, null, '缂撳瓨鐩戞帶鑿滃崟');
+insert into sys_menu values('114',  '琛ㄥ崟鏋勫缓',     '3',   '1', 'build',            'tool/build/index',             '', 1, 0, 'C', '0', '0', 'tool:build:list',             'build',         103, 1, sysdate, null, null, '琛ㄥ崟鏋勫缓鑿滃崟');
+insert into sys_menu values('115',  '浠g爜鐢熸垚',     '3',   '2', 'gen',              'tool/gen/index',               '', 1, 0, 'C', '0', '0', 'tool:gen:list',               'code',          103, 1, sysdate, null, null, '浠g爜鐢熸垚鑿滃崟');
+insert into sys_menu values('121',  '绉熸埛绠$悊',     '6',   '1', 'tenant',           'system/tenant/index',          '', 1, 0, 'C', '0', '0', 'system:tenant:list',          'list',          103, 1, sysdate, null, null, '绉熸埛绠$悊鑿滃崟');
+insert into sys_menu values('122',  '绉熸埛濂楅绠$悊',  '6',   '2', 'tenantPackage',    'system/tenantPackage/index',   '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list',   'form',          103, 1, sysdate, null, null, '绉熸埛濂楅绠$悊鑿滃崟');
 -- springboot-admin鐩戞帶
-insert into sys_menu values('117',  'Admin鐩戞帶', '2',  '5', 'Admin',      'monitor/admin/index',      '', 1, 0, 'C', '0', '0', 'monitor:admin:list',      'dashboard',     103, 1, sysdate, null, null, 'Admin鐩戞帶鑿滃崟');
+insert into sys_menu values('117',  'Admin鐩戞帶',   '2',    '5', 'Admin',            'monitor/admin/index',         '', 1, 0, 'C', '0', '0', 'monitor:admin:list',          'dashboard',     103, 1, sysdate, null, null, 'Admin鐩戞帶鑿滃崟');
 -- oss鑿滃崟
-insert into sys_menu values('118',  '鏂囦欢绠$悊', '1', '10', 'oss', 'system/oss/index', '', 1, 0, 'C', '0', '0', 'system:oss:list', 'upload', 103, 1, sysdate, null, null, '鏂囦欢绠$悊鑿滃崟');
+insert into sys_menu values('118',  '鏂囦欢绠$悊',     '1',    '10', 'oss',             'system/oss/index',            '', 1, 0, 'C', '0', '0', 'system:oss:list',             'upload',        103, 1, sysdate, null, null, '鏂囦欢绠$悊鑿滃崟');
 -- xxl-job-admin鎺у埗鍙�
-insert into sys_menu values('120',  '浠诲姟璋冨害涓績', '2',  '5', 'XxlJob',      'monitor/xxljob/index',      '', 1, 0, 'C', '0', '0', 'monitor:xxljob:list',      'job',     103, 1, sysdate, null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�');
+insert into sys_menu values('120',  '浠诲姟璋冨害涓績',  '2',    '5', 'XxlJob',           'monitor/xxljob/index',        '', 1, 0, 'C', '0', '0', 'monitor:xxljob:list',         'job',           103, 1, sysdate, null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�');
 
 -- 涓夌骇鑿滃崟
 insert into sys_menu values('500',  '鎿嶄綔鏃ュ織', '108', '1', 'operlog',    'monitor/operlog/index',    '', 1, 0, 'C', '0', '0', 'monitor:operlog:list',    'form',          103, 1, sysdate, null, null, '鎿嶄綔鏃ュ織鑿滃崟');
@@ -355,6 +454,18 @@
 insert into sys_menu values('1603', '鏂囦欢鍒犻櫎', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove',       '#', 103, 1, sysdate, null, null, '');
 insert into sys_menu values('1604', '閰嶇疆娣诲姞', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add',          '#', 103, 1, sysdate, null, null, '');
 insert into sys_menu values('1605', '閰嶇疆缂栬緫', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit',         '#', 103, 1, sysdate, null, null, '');
+-- 绉熸埛绠$悊鐩稿叧鎸夐挳
+insert into sys_menu values('1606', '绉熸埛鏌ヨ', '121', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query',   '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1607', '绉熸埛鏂板', '121', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add',     '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1608', '绉熸埛淇敼', '121', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:edit',    '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1609', '绉熸埛鍒犻櫎', '121', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:remove',  '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1610', '绉熸埛瀵煎嚭', '121', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:export',  '#', 103, 1, sysdate, null, null, '');
+-- 绉熸埛濂楅绠$悊鐩稿叧鎸夐挳
+insert into sys_menu values('1611', '绉熸埛濂楅鏌ヨ', '122', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:query',   '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1612', '绉熸埛濂楅鏂板', '122', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:add',     '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1613', '绉熸埛濂楅淇敼', '122', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit',    '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1614', '绉熸埛濂楅鍒犻櫎', '122', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove',  '#', 103, 1, sysdate, null, null, '');
+insert into sys_menu values('1615', '绉熸埛濂楅瀵煎嚭', '122', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export',  '#', 103, 1, sysdate, null, null, '');
 
 
 -- ----------------------------
@@ -522,7 +633,8 @@
 -- 10銆佹搷浣滄棩蹇楄褰�
 -- ----------------------------
 create table sys_oper_log (
-  oper_id           number(20)      not null ,
+  oper_id           number(20)      not null,
+  tenant_id         varchar2(20)    not null,
   title             varchar2(50)    default '',
   business_type     number(2)       default 0,
   method            varchar2(100)   default '',
@@ -536,7 +648,7 @@
   oper_param        varchar2(2100)  default '',
   json_result       varchar2(2100)  default '',
   status            number(1)       default 0,
-  error_msg         varchar2(2100)  default '' ,
+  error_msg         varchar2(2100)  default '',
   oper_time         date
 );
 
@@ -544,6 +656,7 @@
 
 comment on table  sys_oper_log                is '鎿嶄綔鏃ュ織璁板綍';
 comment on column sys_oper_log.oper_id        is '鏃ュ織涓婚敭';
+comment on column sys_oper_log.tenant_id      is '绉熸埛缂栧彿';
 comment on column sys_oper_log.title          is '妯″潡鏍囬';
 comment on column sys_oper_log.business_type  is '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�';
 comment on column sys_oper_log.method         is '鏂规硶鍚嶇О';
@@ -566,6 +679,7 @@
 -- ----------------------------
 create table sys_dict_type (
   dict_id           number(20)      not null,
+  tenant_id         varchar2(20)    not null,
   dict_name         varchar2(100)   default '',
   dict_type         varchar2(100)   default '',
   status            char(1)         default '0',
@@ -578,10 +692,11 @@
 );
 
 alter table sys_dict_type add constraint pk_sys_dict_type primary key (dict_id);
-create unique index sys_dict_type_index1 on sys_dict_type (dict_type);
+create unique index sys_dict_type_index1 on sys_dict_type (tenant_id, dict_type);
 
 comment on table  sys_dict_type               is '瀛楀吀绫诲瀷琛�';
 comment on column sys_dict_type.dict_id       is '瀛楀吀涓婚敭';
+comment on column sys_dict_type.tenant_id     is '绉熸埛缂栧彿';
 comment on column sys_dict_type.dict_name     is '瀛楀吀鍚嶇О';
 comment on column sys_dict_type.dict_type     is '瀛楀吀绫诲瀷';
 comment on column sys_dict_type.status        is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
@@ -592,14 +707,14 @@
 comment on column sys_dict_type.update_time   is '鏇存柊鏃堕棿';
 comment on column sys_dict_type.remark        is '澶囨敞';
 
-insert into sys_dict_type values(1,  '鐢ㄦ埛鎬у埆', 'sys_user_sex',        '0', 103, 1, sysdate, null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
-insert into sys_dict_type values(2,  '鑿滃崟鐘舵��', 'sys_show_hide',       '0', 103, 1, sysdate, null, null, '鑿滃崟鐘舵�佸垪琛�');
-insert into sys_dict_type values(3,  '绯荤粺寮�鍏�', 'sys_normal_disable',  '0', 103, 1, sysdate, null, null, '绯荤粺寮�鍏冲垪琛�');
-insert into sys_dict_type values(6,  '绯荤粺鏄惁', 'sys_yes_no',          '0', 103, 1, sysdate, null, null, '绯荤粺鏄惁鍒楄〃');
-insert into sys_dict_type values(7,  '閫氱煡绫诲瀷', 'sys_notice_type',     '0', 103, 1, sysdate, null, null, '閫氱煡绫诲瀷鍒楄〃');
-insert into sys_dict_type values(8,  '閫氱煡鐘舵��', 'sys_notice_status',   '0', 103, 1, sysdate, null, null, '閫氱煡鐘舵�佸垪琛�');
-insert into sys_dict_type values(9,  '鎿嶄綔绫诲瀷', 'sys_oper_type',       '0', 103, 1, sysdate, null, null, '鎿嶄綔绫诲瀷鍒楄〃');
-insert into sys_dict_type values(10, '绯荤粺鐘舵��', 'sys_common_status',   '0', 103, 1, sysdate, null, null, '鐧诲綍鐘舵�佸垪琛�');
+insert into sys_dict_type values(1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex',        '0', 103, 1, sysdate, null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
+insert into sys_dict_type values(2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide',       '0', 103, 1, sysdate, null, null, '鑿滃崟鐘舵�佸垪琛�');
+insert into sys_dict_type values(3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable',  '0', 103, 1, sysdate, null, null, '绯荤粺寮�鍏冲垪琛�');
+insert into sys_dict_type values(6, '000000', '绯荤粺鏄惁', 'sys_yes_no',          '0', 103, 1, sysdate, null, null, '绯荤粺鏄惁鍒楄〃');
+insert into sys_dict_type values(7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type',     '0', 103, 1, sysdate, null, null, '閫氱煡绫诲瀷鍒楄〃');
+insert into sys_dict_type values(8, '000000', '閫氱煡鐘舵��', 'sys_notice_status',   '0', 103, 1, sysdate, null, null, '閫氱煡鐘舵�佸垪琛�');
+insert into sys_dict_type values(9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type',       '0', 103, 1, sysdate, null, null, '鎿嶄綔绫诲瀷鍒楄〃');
+insert into sys_dict_type values(10, '000000', '绯荤粺鐘舵��', 'sys_common_status',   '0', 103, 1, sysdate, null, null, '鐧诲綍鐘舵�佸垪琛�');
 
 
 -- ----------------------------
@@ -607,6 +722,7 @@
 -- ----------------------------
 create table sys_dict_data (
   dict_code        number(20)      not null,
+  tenant_id        varchar2(20)    not null,
   dict_sort        number(4)       default 0,
   dict_label       varchar2(100)   default '',
   dict_value       varchar2(100)   default '',
@@ -627,6 +743,7 @@
 
 comment on table  sys_dict_data               is '瀛楀吀鏁版嵁琛�';
 comment on column sys_dict_data.dict_code     is '瀛楀吀涓婚敭';
+comment on column sys_dict_data.tenant_id     is '绉熸埛缂栧彿';
 comment on column sys_dict_data.dict_sort     is '瀛楀吀鎺掑簭';
 comment on column sys_dict_data.dict_label    is '瀛楀吀鏍囩';
 comment on column sys_dict_data.dict_value    is '瀛楀吀閿��';
@@ -642,31 +759,31 @@
 comment on column sys_dict_data.update_time   is '鏇存柊鏃堕棿';
 comment on column sys_dict_data.remark        is '澶囨敞';
 
-insert into sys_dict_data values(1,  1,  '鐢�',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 103, 1, sysdate, null, null, '鎬у埆鐢�');
-insert into sys_dict_data values(2,  2,  '濂�',       '1',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate, null, null, '鎬у埆濂�');
-insert into sys_dict_data values(3,  3,  '鏈煡',     '2',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate, null, null, '鎬у埆鏈煡');
-insert into sys_dict_data values(4,  1,  '鏄剧ず',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '鏄剧ず鑿滃崟');
-insert into sys_dict_data values(5,  2,  '闅愯棌',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '闅愯棌鑿滃崟');
-insert into sys_dict_data values(6,  1,  '姝e父',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(7,  2,  '鍋滅敤',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍋滅敤鐘舵��');
-insert into sys_dict_data values(12, 1,  '鏄�',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '绯荤粺榛樿鏄�');
-insert into sys_dict_data values(13, 2,  '鍚�',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '绯荤粺榛樿鍚�');
-insert into sys_dict_data values(14, 1,  '閫氱煡',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 103, 1, sysdate, null, null, '閫氱煡');
-insert into sys_dict_data values(15, 2,  '鍏憡',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 103, 1, sysdate, null, null, '鍏憡');
-insert into sys_dict_data values(16, 1,  '姝e父',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(17, 2,  '鍏抽棴',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍏抽棴鐘舵��');
-insert into sys_dict_data values(29, 99, '鍏朵粬',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate, null, null, '鍏朵粬鎿嶄綔');
-insert into sys_dict_data values(18, 1,  '鏂板',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate, null, null, '鏂板鎿嶄綔');
-insert into sys_dict_data values(19, 2,  '淇敼',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate, null, null, '淇敼鎿嶄綔');
-insert into sys_dict_data values(20, 3,  '鍒犻櫎',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍒犻櫎鎿嶄綔');
-insert into sys_dict_data values(21, 4,  '鎺堟潈',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 103, 1, sysdate, null, null, '鎺堟潈鎿嶄綔');
-insert into sys_dict_data values(22, 5,  '瀵煎嚭',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate, null, null, '瀵煎嚭鎿嶄綔');
-insert into sys_dict_data values(23, 6,  '瀵煎叆',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate, null, null, '瀵煎叆鎿嶄綔');
-insert into sys_dict_data values(24, 7,  '寮洪��',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '寮洪��鎿嶄綔');
-insert into sys_dict_data values(25, 8,  '鐢熸垚浠g爜', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate, null, null, '鐢熸垚鎿嶄綔');
-insert into sys_dict_data values(26, 9,  '娓呯┖鏁版嵁', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '娓呯┖鎿嶄綔');
-insert into sys_dict_data values(27, 1,  '鎴愬姛',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(28, 2,  '澶辫触',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data values(1, '000000', 1,  '鐢�',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 103, 1, sysdate, null, null, '鎬у埆鐢�');
+insert into sys_dict_data values(2, '000000', 2,  '濂�',       '1',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate, null, null, '鎬у埆濂�');
+insert into sys_dict_data values(3, '000000', 3,  '鏈煡',     '2',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate, null, null, '鎬у埆鏈煡');
+insert into sys_dict_data values(4, '000000', 1,  '鏄剧ず',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '鏄剧ず鑿滃崟');
+insert into sys_dict_data values(5, '000000', 2,  '闅愯棌',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '闅愯棌鑿滃崟');
+insert into sys_dict_data values(6, '000000', 1,  '姝e父',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(7, '000000', 2,  '鍋滅敤',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data values(12, '000000', 1,  '鏄�',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '绯荤粺榛樿鏄�');
+insert into sys_dict_data values(13, '000000', 2,  '鍚�',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '绯荤粺榛樿鍚�');
+insert into sys_dict_data values(14, '000000', 1,  '閫氱煡',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 103, 1, sysdate, null, null, '閫氱煡');
+insert into sys_dict_data values(15, '000000', 2,  '鍏憡',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 103, 1, sysdate, null, null, '鍏憡');
+insert into sys_dict_data values(16, '000000', 1,  '姝e父',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(17, '000000', 2,  '鍏抽棴',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍏抽棴鐘舵��');
+insert into sys_dict_data values(29, '000000', 99, '鍏朵粬',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate, null, null, '鍏朵粬鎿嶄綔');
+insert into sys_dict_data values(18, '000000', 1,  '鏂板',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate, null, null, '鏂板鎿嶄綔');
+insert into sys_dict_data values(19, '000000', 2,  '淇敼',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate, null, null, '淇敼鎿嶄綔');
+insert into sys_dict_data values(20, '000000', 3,  '鍒犻櫎',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍒犻櫎鎿嶄綔');
+insert into sys_dict_data values(21, '000000', 4,  '鎺堟潈',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 103, 1, sysdate, null, null, '鎺堟潈鎿嶄綔');
+insert into sys_dict_data values(22, '000000', 5,  '瀵煎嚭',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate, null, null, '瀵煎嚭鎿嶄綔');
+insert into sys_dict_data values(23, '000000', 6,  '瀵煎叆',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate, null, null, '瀵煎叆鎿嶄綔');
+insert into sys_dict_data values(24, '000000', 7,  '寮洪��',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '寮洪��鎿嶄綔');
+insert into sys_dict_data values(25, '000000', 8,  '鐢熸垚浠g爜', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate, null, null, '鐢熸垚鎿嶄綔');
+insert into sys_dict_data values(26, '000000', 9,  '娓呯┖鏁版嵁', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '娓呯┖鎿嶄綔');
+insert into sys_dict_data values(27, '000000', 1,  '鎴愬姛',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(28, '000000', 2,  '澶辫触',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 103, 1, sysdate, null, null, '鍋滅敤鐘舵��');
 
 
 -- ----------------------------
@@ -674,6 +791,7 @@
 -- ----------------------------
 create table sys_config (
   config_id         number(20)     not null,
+  tenant_id         varchar2(20)   not null,
   config_name       varchar2(100)  default '',
   config_key        varchar2(100)  default '',
   config_value      varchar2(100)  default '',
@@ -689,6 +807,7 @@
 
 comment on table  sys_config               is '鍙傛暟閰嶇疆琛�';
 comment on column sys_config.config_id     is '鍙傛暟涓婚敭';
+comment on column sys_config.tenant_id     is '绉熸埛缂栧彿';
 comment on column sys_config.config_name   is '鍙傛暟鍚嶇О';
 comment on column sys_config.config_key    is '鍙傛暟閿悕';
 comment on column sys_config.config_value  is '鍙傛暟閿��';
@@ -700,12 +819,11 @@
 comment on column sys_config.update_time   is '鏇存柊鏃堕棿';
 comment on column sys_config.remark        is '澶囨敞';
 
-insert into sys_config values(1, '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',      'sys.index.skinName',            'skin-blue',     'Y', 103, 1, sysdate, null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' );
-insert into sys_config values(2, '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',         'sys.user.initPassword',         '123456',        'Y', 103, 1, sysdate, null, null, '鍒濆鍖栧瘑鐮� 123456' );
-insert into sys_config values(3, '涓绘鏋堕〉-渚ц竟鏍忎富棰�',           'sys.index.sideTheme',           'theme-dark',    'Y', 103, 1, sysdate, null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' );
-insert into sys_config values(4, '璐﹀彿鑷姪-楠岃瘉鐮佸紑鍏�',           'sys.account.captchaEnabled',    'true',          'Y', 103, 1, sysdate, null, null, '鏄惁寮�鍚獙璇佺爜鍔熻兘锛坱rue寮�鍚紝false鍏抽棴锛�');
-insert into sys_config values(5, '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�',   'sys.account.registerUser',      'false',         'Y', 103, 1, sysdate, null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
-insert into sys_config values(11, 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',          'sys.oss.previewListResource',   'true',          'Y', 103, 1, sysdate, null, null, 'true:寮�鍚�, false:鍏抽棴');
+insert into sys_config values(1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',      'sys.index.skinName',            'skin-blue',     'Y', 103, 1, sysdate, null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' );
+insert into sys_config values(2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',         'sys.user.initPassword',         '123456',        'Y', 103, 1, sysdate, null, null, '鍒濆鍖栧瘑鐮� 123456' );
+insert into sys_config values(3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�',           'sys.index.sideTheme',           'theme-dark',    'Y', 103, 1, sysdate, null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' );
+insert into sys_config values(5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�',   'sys.account.registerUser',      'false',         'Y', 103, 1, sysdate, null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
+insert into sys_config values(11, '000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',          'sys.oss.previewListResource',   'true',          'Y', 103, 1, sysdate, null, null, 'true:寮�鍚�, false:鍏抽棴');
 
 
 -- ----------------------------
@@ -713,6 +831,7 @@
 -- ----------------------------
 create table sys_logininfor (
   info_id         number(20)     not null,
+  tenant_id       varchar2(20)   not null,
   user_name       varchar2(50)   default '',
   ipaddr          varchar2(128)  default '',
   login_location  varchar2(255)  default '',
@@ -727,6 +846,7 @@
 
 comment on table  sys_logininfor                is '绯荤粺璁块棶璁板綍';
 comment on column sys_logininfor.info_id        is '璁块棶ID';
+comment on column sys_logininfor.tenant_id      is '绉熸埛缂栧彿';
 comment on column sys_logininfor.user_name      is '鐧诲綍璐﹀彿';
 comment on column sys_logininfor.ipaddr         is '鐧诲綍IP鍦板潃';
 comment on column sys_logininfor.login_location is '鐧诲綍鍦扮偣';
@@ -742,6 +862,7 @@
 -- ----------------------------
 create table sys_notice (
   notice_id         number(20)      not null,
+  tenant_id         varchar2(20)    not null,
   notice_title      varchar2(50)    not null,
   notice_type       char(1)         not null,
   notice_content    clob            default null,
@@ -758,6 +879,7 @@
 
 comment on table  sys_notice                   is '閫氱煡鍏憡琛�';
 comment on column sys_notice.notice_id         is '鍏憡涓婚敭';
+comment on column sys_notice.tenant_id         is '绉熸埛缂栧彿';
 comment on column sys_notice.notice_title      is '鍏憡鏍囬';
 comment on column sys_notice.notice_type       is '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�';
 comment on column sys_notice.notice_content    is '鍏憡鍐呭';
@@ -772,8 +894,8 @@
 -- ----------------------------
 -- 鍒濆鍖�-鍏憡淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_notice values('1', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, sysdate, null, null, '绠$悊鍛�');
-insert into sys_notice values('2', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭',   '0', 103, 1, sysdate, null, null, '绠$悊鍛�');
+insert into sys_notice values('1', '000000', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, sysdate, null, null, '绠$悊鍛�');
+insert into sys_notice values('2', '000000', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭',   '0', 103, 1, sysdate, null, null, '绠$悊鍛�');
 
 
 -- ----------------------------
@@ -890,33 +1012,35 @@
 -- OSS瀵硅薄瀛樺偍琛�
 -- ----------------------------
 create table sys_oss (
-  oss_id          number(20)   not null,
+  oss_id          number(20)    not null,
+  tenant_id       varchar2(20)  not null,
   file_name       varchar(255)  not null,
   original_name   varchar(255)  not null,
-  file_suffix     varchar(10)  not null,
-  url             varchar(500) not null,
-  service         varchar(20)  default 'minio' not null,
-  create_dept     number(20)   default null,
-  create_by       number(20)   default null,
+  file_suffix     varchar(10)   not null,
+  url             varchar(500)  not null,
+  service         varchar(20)   default 'minio' not null,
+  create_dept     number(20)    default null,
+  create_by       number(20)    default null,
   create_time     date,
-  update_by       number(20)   default null,
+  update_by       number(20)    default null,
   update_time     date
 );
 
 alter table sys_oss add constraint pk_sys_oss primary key (oss_id);
 
-comment on table sys_oss is 'OSS瀵硅薄瀛樺偍琛�';
-comment on column sys_oss.oss_id is '瀵硅薄瀛樺偍涓婚敭';
-comment on column sys_oss.file_name is '鏂囦欢鍚�';
-comment on column sys_oss.original_name is '鍘熷悕';
-comment on column sys_oss.file_suffix is '鏂囦欢鍚庣紑鍚�';
-comment on column sys_oss.url is 'URL鍦板潃';
-comment on column sys_oss.service is '鏈嶅姟鍟�';
-comment on column sys_oss.create_dept  is '鍒涘缓閮ㄩ棬';
-comment on column sys_oss.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_oss.create_by is '涓婁紶鑰�';
-comment on column sys_oss.update_time is '鏇存柊鏃堕棿';
-comment on column sys_oss.update_by is '鏇存柊鑰�';
+comment on table sys_oss                    is 'OSS瀵硅薄瀛樺偍琛�';
+comment on column sys_oss.oss_id            is '瀵硅薄瀛樺偍涓婚敭';
+comment on column sys_oss.tenant_id         is '绉熸埛缂栫爜';
+comment on column sys_oss.file_name         is '鏂囦欢鍚�';
+comment on column sys_oss.original_name     is '鍘熷悕';
+comment on column sys_oss.file_suffix       is '鏂囦欢鍚庣紑鍚�';
+comment on column sys_oss.url               is 'URL鍦板潃';
+comment on column sys_oss.service           is '鏈嶅姟鍟�';
+comment on column sys_oss.create_dept       is '鍒涘缓閮ㄩ棬';
+comment on column sys_oss.create_time       is '鍒涘缓鏃堕棿';
+comment on column sys_oss.create_by         is '涓婁紶鑰�';
+comment on column sys_oss.update_time       is '鏇存柊鏃堕棿';
+comment on column sys_oss.update_by         is '鏇存柊鑰�';
 
 
 -- ----------------------------
@@ -924,6 +1048,7 @@
 -- ----------------------------
 create table sys_oss_config (
   oss_config_id   number(20)    not null,
+  tenant_id       varchar2(20)  not null,
   config_key      varchar(20)   not null,
   access_key      varchar(255)  default '',
   secret_key      varchar(255)  default '',
@@ -946,32 +1071,33 @@
 
 alter table sys_oss_config add constraint pk_sys_oss_config primary key (oss_config_id);
 
-comment on table sys_oss_config is '瀵硅薄瀛樺偍閰嶇疆琛�';
-comment on column sys_oss_config.oss_config_id is '涓诲缓';
-comment on column sys_oss_config.config_key is '閰嶇疆key';
-comment on column sys_oss_config.access_key is 'accesskey';
-comment on column sys_oss_config.secret_key is '绉橀挜';
-comment on column sys_oss_config.bucket_name is '妗跺悕绉�';
-comment on column sys_oss_config.prefix is '鍓嶇紑';
-comment on column sys_oss_config.endpoint is '璁块棶绔欑偣';
-comment on column sys_oss_config.domain is '鑷畾涔夊煙鍚�';
-comment on column sys_oss_config.is_https is '鏄惁https锛圷=鏄�,N=鍚︼級';
-comment on column sys_oss_config.region is '鍩�';
-comment on column sys_oss_config.access_policy is '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)';
-comment on column sys_oss_config.status is '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�';
-comment on column sys_oss_config.ext1 is '鎵╁睍瀛楁';
-comment on column sys_oss_config.remark is '澶囨敞';
-comment on column sys_oss_config.create_dept  is '鍒涘缓閮ㄩ棬';
-comment on column sys_oss_config.create_by is '鍒涘缓鑰�';
-comment on column sys_oss_config.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_oss_config.update_by is '鏇存柊鑰�';
-comment on column sys_oss_config.update_time is '鏇存柊鏃堕棿';
+comment on table sys_oss_config                 is '瀵硅薄瀛樺偍閰嶇疆琛�';
+comment on column sys_oss_config.oss_config_id  is '涓诲缓';
+comment on column sys_oss_config.tenant_id      is '绉熸埛缂栫爜';
+comment on column sys_oss_config.config_key     is '閰嶇疆key';
+comment on column sys_oss_config.access_key     is 'accesskey';
+comment on column sys_oss_config.secret_key     is '绉橀挜';
+comment on column sys_oss_config.bucket_name    is '妗跺悕绉�';
+comment on column sys_oss_config.prefix         is '鍓嶇紑';
+comment on column sys_oss_config.endpoint       is '璁块棶绔欑偣';
+comment on column sys_oss_config.domain         is '鑷畾涔夊煙鍚�';
+comment on column sys_oss_config.is_https       is '鏄惁https锛圷=鏄�,N=鍚︼級';
+comment on column sys_oss_config.region         is '鍩�';
+comment on column sys_oss_config.access_policy  is '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)';
+comment on column sys_oss_config.status         is '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�';
+comment on column sys_oss_config.ext1           is '鎵╁睍瀛楁';
+comment on column sys_oss_config.remark         is '澶囨敞';
+comment on column sys_oss_config.create_dept    is '鍒涘缓閮ㄩ棬';
+comment on column sys_oss_config.create_by      is '鍒涘缓鑰�';
+comment on column sys_oss_config.create_time    is '鍒涘缓鏃堕棿';
+comment on column sys_oss_config.update_by      is '鏇存柊鑰�';
+comment on column sys_oss_config.update_time    is '鏇存柊鏃堕棿';
 
-insert into sys_oss_config values (1, 'minio',  'ruoyi',            'ruoyi123',        'ruoyi',             '', '127.0.0.1:9000',                '','N', '',            '1', '0', '', NULL, 103, 1, sysdate, 1, sysdate);
-insert into sys_oss_config values (2, 'qiniu',  'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 's3-cn-north-1.qiniucs.com',     '','N', '',            '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
-insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 'oss-cn-beijing.aliyuncs.com',   '','N', '',            '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
-insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',   '','N', 'ap-beijing',  '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
-insert into sys_oss_config values (5, 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',           '','N', '',            '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
+insert into sys_oss_config values (1, '000000', 'minio',  'ruoyi',            'ruoyi123',        'ruoyi',             '', '127.0.0.1:9000',                '','N', '',            '1', '0', '', NULL, 103, 1, sysdate, 1, sysdate);
+insert into sys_oss_config values (2, '000000', 'qiniu',  'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 's3-cn-north-1.qiniucs.com',     '','N', '',            '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
+insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 'oss-cn-beijing.aliyuncs.com',   '','N', '',            '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
+insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',   '','N', 'ap-beijing',  '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
+insert into sys_oss_config values (5, '000000', 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',           '','N', '',            '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
 
 
 -- ----------------------------
diff --git a/script/sql/oracle/oracle_test.sql b/script/sql/oracle/oracle_test.sql
index ae0c9ff..f9bda8a 100644
--- a/script/sql/oracle/oracle_test.sql
+++ b/script/sql/oracle/oracle_test.sql
@@ -62,8 +62,8 @@
 comment on column test_tree.update_by    is '鏇存柊浜�';
 comment on column test_tree.del_flag     is '鍒犻櫎鏍囧織';
 
-insert into sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) values (3, 108, 'test', '鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', 'sys_user', '', '', '0', '', '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate, 103, sysdate, 1, sysdate, 3, sysdate, null);
-insert into sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) values (4, 102, 'test1', '浠呮湰浜� 瀵嗙爜666666', 'sys_user', '', '', '0', '', '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate, 103, sysdate, 1, sysdate, 4, sysdate, null);
+insert into sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) values (3, 108, 'test', '鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate, 103, sysdate, 1, sysdate, 3, sysdate, null);
+insert into sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) values (4, 102, 'test1', '浠呮湰浜� 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate, 103, sysdate, 1, sysdate, 4, sysdate, null);
 
 insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (5, '娴嬭瘯鑿滃崟', 0, 5, 'demo', null, 1, 0, 'M', '0', '0', null, 'star', 103, 1, sysdate, 1, sysdate, '');
 
diff --git a/script/sql/postgres/postgres_ry_vue_5.X.sql b/script/sql/postgres/postgres_ry_vue_5.X.sql
index a50251f..4ad90df 100644
--- a/script/sql/postgres/postgres_ry_vue_5.X.sql
+++ b/script/sql/postgres/postgres_ry_vue_5.X.sql
@@ -1,10 +1,106 @@
 -- ----------------------------
+-- 绉熸埛琛�
+-- ----------------------------
+drop table if exists sys_tenant;
+create table if not exists sys_tenant
+(
+    id                int8,
+    tenant_id         varchar(20)   not null,
+    contact_user_name varchar(20)   default null::varchar,
+    contact_phone     varchar(20)   default null::varchar,
+    company_name      varchar(50)   default null::varchar,
+    license_number    varchar(30)   default null::varchar,
+    address           varchar(200)  default null::varchar,
+    intro             varchar(200)  default null::varchar,
+    domain            varchar(200)  default null::varchar,
+    remark            varchar(200)  default null::varchar,
+    package_id        int8,
+    expire_time       timestamp,
+    account_count     int4          default -1,
+    status            char          default '0'::bpchar,
+    del_flag          char          default '0'::bpchar,
+    create_dept       int8,
+    create_by         int8,
+    create_time       timestamp,
+    update_by         int8,
+    update_time       timestamp,
+    constraint "pk_sys_tenant" primary key (id)
+);
+
+
+comment on table   sys_tenant                    is '绉熸埛琛�';
+comment on column  sys_tenant.tenant_id          is '绉熸埛缂栧彿';
+comment on column  sys_tenant.contact_phone      is '鑱旂郴鐢佃瘽';
+comment on column  sys_tenant.company_name       is '浼佷笟鍚嶇О';
+comment on column  sys_tenant.company_name       is '鑱旂郴浜�';
+comment on column  sys_tenant.license_number     is '缁熶竴绀句細淇$敤浠g爜';
+comment on column  sys_tenant.address            is '鍦板潃';
+comment on column  sys_tenant.intro              is '浼佷笟绠�浠�';
+comment on column  sys_tenant.domain             is '鍩熷悕';
+comment on column  sys_tenant.remark             is '澶囨敞';
+comment on column  sys_tenant.package_id         is '绉熸埛濂楅缂栧彿';
+comment on column  sys_tenant.expire_time        is '杩囨湡鏃堕棿';
+comment on column  sys_tenant.account_count      is '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級';
+comment on column  sys_tenant.status             is '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column  sys_tenant.del_flag           is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on column  sys_tenant.create_dept        is '鍒涘缓閮ㄩ棬';
+comment on column  sys_tenant.create_by          is '鍒涘缓鑰�';
+comment on column  sys_tenant.create_time        is '鍒涘缓鏃堕棿';
+comment on column  sys_tenant.update_by          is '鏇存柊鑰�';
+comment on column  sys_tenant.update_time        is '鏇存柊鏃堕棿';
+
+
+-- ----------------------------
+-- 鍒濆鍖�-绉熸埛琛ㄦ暟鎹�
+-- ----------------------------
+
+insert into sys_tenant values(1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', null, null, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', null, null, null, null, -1, '0', '0', 103, 1, now(), null, null);
+
+
+-- ----------------------------
+-- 绉熸埛濂楅琛�
+-- ----------------------------
+drop table if exists sys_tenant_package;
+create table if not exists sys_tenant_package
+(
+    package_id          int8,
+    package_name        varchar(20)     default ''::varchar,
+    menu_ids            varchar(3000)   default ''::varchar,
+    remark              varchar(200)    default ''::varchar,
+    menu_check_strictly bool            default true,
+    status              char            default '0'::bpchar,
+    del_flag            char            default '0'::bpchar,
+    create_dept         int8,
+    create_by           int8,
+    create_time         timestamp,
+    update_by           int8,
+    update_time         timestamp,
+    constraint "pk_sys_tenant_package" primary key (package_id)
+);
+
+
+comment on table   sys_tenant_package                    is '绉熸埛濂楅琛�';
+comment on column  sys_tenant_package.package_id         is '绉熸埛濂楅id';
+comment on column  sys_tenant_package.package_name       is '濂楅鍚嶇О';
+comment on column  sys_tenant_package.menu_ids           is '鍏宠仈鑿滃崟id';
+comment on column  sys_tenant_package.remark             is '澶囨敞';
+comment on column  sys_tenant_package.status             is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column  sys_tenant_package.del_flag           is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on column  sys_tenant_package.create_dept        is '鍒涘缓閮ㄩ棬';
+comment on column  sys_tenant_package.create_by          is '鍒涘缓鑰�';
+comment on column  sys_tenant_package.create_time        is '鍒涘缓鏃堕棿';
+comment on column  sys_tenant_package.update_by          is '鏇存柊鑰�';
+comment on column  sys_tenant_package.update_time        is '鏇存柊鏃堕棿';
+
+
+-- ----------------------------
 -- 1銆侀儴闂ㄨ〃
 -- ----------------------------
 drop table if exists sys_dept;
 create table if not exists sys_dept
 (
     dept_id     int8,
+    tenant_id   varchar(20) not null,
     parent_id   int8        default 0,
     ancestors   varchar(500)default ''::varchar,
     dept_name   varchar(30) default ''::varchar,
@@ -22,36 +118,37 @@
     constraint "sys_dept_pk" primary key (dept_id)
 );
 
-comment on table sys_dept is '閮ㄩ棬琛�';
-comment on column sys_dept.dept_id is '閮ㄩ棬ID';
-comment on column sys_dept.parent_id is '鐖堕儴闂↖D';
-comment on column sys_dept.ancestors is '绁栫骇鍒楄〃';
-comment on column sys_dept.dept_name is '閮ㄩ棬鍚嶇О';
-comment on column sys_dept.order_num is '鏄剧ず椤哄簭';
-comment on column sys_dept.leader is '璐熻矗浜�';
-comment on column sys_dept.phone is '鑱旂郴鐢佃瘽';
-comment on column sys_dept.email is '閭';
-comment on column sys_dept.status is '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�';
-comment on column sys_dept.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on table sys_dept               is '閮ㄩ棬琛�';
+comment on column sys_dept.dept_id      is '閮ㄩ棬ID';
+comment on column sys_dept.tenant_id    is '绉熸埛缂栧彿';
+comment on column sys_dept.parent_id    is '鐖堕儴闂↖D';
+comment on column sys_dept.ancestors    is '绁栫骇鍒楄〃';
+comment on column sys_dept.dept_name    is '閮ㄩ棬鍚嶇О';
+comment on column sys_dept.order_num    is '鏄剧ず椤哄簭';
+comment on column sys_dept.leader       is '璐熻矗浜�';
+comment on column sys_dept.phone        is '鑱旂郴鐢佃瘽';
+comment on column sys_dept.email        is '閭';
+comment on column sys_dept.status       is '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column sys_dept.del_flag     is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
 comment on column sys_dept.create_dept  is '鍒涘缓閮ㄩ棬';
-comment on column sys_dept.create_by is '鍒涘缓鑰�';
-comment on column sys_dept.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_dept.update_by is '鏇存柊鑰�';
-comment on column sys_dept.update_time is '鏇存柊鏃堕棿';
+comment on column sys_dept.create_by    is '鍒涘缓鑰�';
+comment on column sys_dept.create_time  is '鍒涘缓鏃堕棿';
+comment on column sys_dept.update_by    is '鏇存柊鑰�';
+comment on column sys_dept.update_time  is '鏇存柊鏃堕棿';
 
 -- ----------------------------
 -- 鍒濆鍖�-閮ㄩ棬琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_dept values(100,  0,   '0',          '鑻ヤ緷绉戞妧',   0, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(101,  100, '0,100',      '娣卞湷鎬诲叕鍙�', 1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(102,  100, '0,100',      '闀挎矙鍒嗗叕鍙�', 2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(103,  101, '0,100,101',  '鐮斿彂閮ㄩ棬',   1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(104,  101, '0,100,101',  '甯傚満閮ㄩ棬',   2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(105,  101, '0,100,101',  '娴嬭瘯閮ㄩ棬',   3, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(106,  101, '0,100,101',  '璐㈠姟閮ㄩ棬',   4, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(107,  101, '0,100,101',  '杩愮淮閮ㄩ棬',   5, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(108,  102, '0,100,102',  '甯傚満閮ㄩ棬',   1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
-insert into sys_dept values(109,  102, '0,100,102',  '璐㈠姟閮ㄩ棬',   2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(100, '000000', 0,   '0',          'XXX绉戞妧',   0, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(101, '000000', 100, '0,100',      '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(102, '000000', 100, '0,100',      '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(103, '000000', 101, '0,100,101',  '鐮斿彂閮ㄩ棬',   1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(104, '000000', 101, '0,100,101',  '甯傚満閮ㄩ棬',   2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(105, '000000', 101, '0,100,101',  '娴嬭瘯閮ㄩ棬',   3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(106, '000000', 101, '0,100,101',  '璐㈠姟閮ㄩ棬',   4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(107, '000000', 101, '0,100,101',  '杩愮淮閮ㄩ棬',   5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(108, '000000', 102, '0,100,102',  '甯傚満閮ㄩ棬',   1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
+insert into sys_dept values(109, '000000', 102, '0,100,102',  '璐㈠姟閮ㄩ棬',   2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
 
 -- ----------------------------
 -- 2銆佺敤鎴蜂俊鎭〃
@@ -60,9 +157,10 @@
 create table if not exists sys_user
 (
     user_id     int8,
+    tenant_id   varchar(20)  not null,
     dept_id     int8,
-    user_name   varchar(30) not null,
-    nick_name   varchar(30) not null,
+    user_name   varchar(30)  not null,
+    nick_name   varchar(30)  not null,
     user_type   varchar(10)  default 'sys_user'::varchar,
     email       varchar(50)  default ''::varchar,
     phonenumber varchar(11)  default ''::varchar,
@@ -82,34 +180,35 @@
     constraint "sys_user_pk" primary key (user_id)
 );
 
-comment on table sys_user is '鐢ㄦ埛淇℃伅琛�';
-comment on column sys_user.user_id is '鐢ㄦ埛ID';
-comment on column sys_user.dept_id is '閮ㄩ棬ID';
-comment on column sys_user.user_name is '鐢ㄦ埛璐﹀彿';
-comment on column sys_user.nick_name is '鐢ㄦ埛鏄电О';
-comment on column sys_user.user_type is '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�';
-comment on column sys_user.email is '鐢ㄦ埛閭';
-comment on column sys_user.phonenumber is '鎵嬫満鍙风爜';
-comment on column sys_user.sex is '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�';
-comment on column sys_user.avatar is '澶村儚鍦板潃';
-comment on column sys_user.password is '瀵嗙爜';
-comment on column sys_user.status is '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�';
-comment on column sys_user.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
-comment on column sys_user.login_ip is '鏈�鍚庣櫥闄咺P';
-comment on column sys_user.login_date is '鏈�鍚庣櫥闄嗘椂闂�';
+comment on table sys_user               is '鐢ㄦ埛淇℃伅琛�';
+comment on column sys_user.user_id      is '鐢ㄦ埛ID';
+comment on column sys_user.tenant_id    is '绉熸埛缂栧彿';
+comment on column sys_user.dept_id      is '閮ㄩ棬ID';
+comment on column sys_user.user_name    is '鐢ㄦ埛璐﹀彿';
+comment on column sys_user.nick_name    is '鐢ㄦ埛鏄电О';
+comment on column sys_user.user_type    is '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�';
+comment on column sys_user.email        is '鐢ㄦ埛閭';
+comment on column sys_user.phonenumber  is '鎵嬫満鍙风爜';
+comment on column sys_user.sex          is '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�';
+comment on column sys_user.avatar       is '澶村儚鍦板潃';
+comment on column sys_user.password     is '瀵嗙爜';
+comment on column sys_user.status       is '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column sys_user.del_flag     is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on column sys_user.login_ip     is '鏈�鍚庣櫥闄咺P';
+comment on column sys_user.login_date   is '鏈�鍚庣櫥闄嗘椂闂�';
 comment on column sys_user.create_dept  is '鍒涘缓閮ㄩ棬';
-comment on column sys_user.create_by is '鍒涘缓鑰�';
-comment on column sys_user.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_user.update_by is '鏇存柊鑰�';
-comment on column sys_user.update_time is '鏇存柊鏃堕棿';
-comment on column sys_user.remark is '澶囨敞';
+comment on column sys_user.create_by    is '鍒涘缓鑰�';
+comment on column sys_user.create_time  is '鍒涘缓鏃堕棿';
+comment on column sys_user.update_by    is '鏇存柊鑰�';
+comment on column sys_user.update_time  is '鏇存柊鏃堕棿';
+comment on column sys_user.remark       is '澶囨敞';
 
 -- ----------------------------
 
 -- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_user values(1,  103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '绠$悊鍛�');
-insert into sys_user values(2,  105, 'ry',    '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com',  '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '娴嬭瘯鍛�');
+insert into sys_user values(1, '000000', 103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '绠$悊鍛�');
+insert into sys_user values(2, '000000', 105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com',  '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '娴嬭瘯鍛�');
 
 
 -- ----------------------------
@@ -119,6 +218,7 @@
 create table if not exists sys_post
 (
     post_id     int8,
+    tenant_id   varchar(20) not null,
     post_code   varchar(64) not null,
     post_name   varchar(50) not null,
     post_sort   int4        not null,
@@ -132,26 +232,27 @@
     constraint "sys_post_pk" primary key (post_id)
 );
 
-comment on table sys_post is '宀椾綅淇℃伅琛�';
-comment on column sys_post.post_id is '宀椾綅ID';
-comment on column sys_post.post_code is '宀椾綅缂栫爜';
-comment on column sys_post.post_name is '宀椾綅鍚嶇О';
-comment on column sys_post.post_sort is '鏄剧ず椤哄簭';
-comment on column sys_post.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on table sys_post               is '宀椾綅淇℃伅琛�';
+comment on column sys_post.post_id      is '宀椾綅ID';
+comment on column sys_post.tenant_id    is '绉熸埛缂栧彿';
+comment on column sys_post.post_code    is '宀椾綅缂栫爜';
+comment on column sys_post.post_name    is '宀椾綅鍚嶇О';
+comment on column sys_post.post_sort    is '鏄剧ず椤哄簭';
+comment on column sys_post.status       is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
 comment on column sys_post.create_dept  is '鍒涘缓閮ㄩ棬';
-comment on column sys_post.create_by is '鍒涘缓鑰�';
-comment on column sys_post.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_post.update_by is '鏇存柊鑰�';
-comment on column sys_post.update_time is '鏇存柊鏃堕棿';
-comment on column sys_post.remark is '澶囨敞';
+comment on column sys_post.create_by    is '鍒涘缓鑰�';
+comment on column sys_post.create_time  is '鍒涘缓鏃堕棿';
+comment on column sys_post.update_by    is '鏇存柊鑰�';
+comment on column sys_post.update_time  is '鏇存柊鏃堕棿';
+comment on column sys_post.remark       is '澶囨敞';
 
 -- ----------------------------
 -- 鍒濆鍖�-宀椾綅淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_post values(1, 'ceo',  '钁d簨闀�',    1, '0', 103, 1, now(), null, null, '');
-insert into sys_post values(2, 'se',   '椤圭洰缁忕悊',  2, '0', 103, 1, now(), null, null, '');
-insert into sys_post values(3, 'hr',   '浜哄姏璧勬簮',  3, '0', 103, 1, now(), null, null, '');
-insert into sys_post values(4, 'user', '鏅�氬憳宸�',  4, '0', 103, 1, now(), null, null, '');
+insert into sys_post values(1, '000000', 'ceo',  '钁d簨闀�',    1, '0', 103, 1, now(), null, null, '');
+insert into sys_post values(2, '000000', 'se',   '椤圭洰缁忕悊',  2, '0', 103, 1, now(), null, null, '');
+insert into sys_post values(3, '000000', 'hr',   '浜哄姏璧勬簮',  3, '0', 103, 1, now(), null, null, '');
+insert into sys_post values(4, '000000', 'user', '鏅�氬憳宸�',  4, '0', 103, 1, now(), null, null, '');
 
 -- ----------------------------
 -- 4銆佽鑹蹭俊鎭〃
@@ -160,6 +261,7 @@
 create table if not exists sys_role
 (
     role_id             int8,
+    tenant_id           varchar(20)  not null,
     role_name           varchar(30)  not null,
     role_key            varchar(100) not null,
     role_sort           int4         not null,
@@ -177,28 +279,29 @@
     constraint "sys_role_pk" primary key (role_id)
 );
 
-comment on table sys_role is '瑙掕壊淇℃伅琛�';
-comment on column sys_role.role_id is '瑙掕壊ID';
-comment on column sys_role.role_name is '瑙掕壊鍚嶇О';
-comment on column sys_role.role_key is '瑙掕壊鏉冮檺瀛楃涓�';
-comment on column sys_role.role_sort is '鏄剧ず椤哄簭';
-comment on column sys_role.data_scope is '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級';
-comment on column sys_role.menu_check_strictly is '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�';
-comment on column sys_role.dept_check_strictly is '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�';
-comment on column sys_role.status is '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�';
-comment on column sys_role.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
-comment on column sys_role.create_dept is '鍒涘缓閮ㄩ棬';
-comment on column sys_role.create_by is '鍒涘缓鑰�';
-comment on column sys_role.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_role.update_by is '鏇存柊鑰�';
-comment on column sys_role.update_time is '鏇存柊鏃堕棿';
-comment on column sys_role.remark is '澶囨敞';
+comment on table sys_role                       is '瑙掕壊淇℃伅琛�';
+comment on column sys_role.role_id              is '瑙掕壊ID';
+comment on column sys_role.tenant_id            is '绉熸埛缂栧彿';
+comment on column sys_role.role_name            is '瑙掕壊鍚嶇О';
+comment on column sys_role.role_key             is '瑙掕壊鏉冮檺瀛楃涓�';
+comment on column sys_role.role_sort            is '鏄剧ず椤哄簭';
+comment on column sys_role.data_scope           is '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級';
+comment on column sys_role.menu_check_strictly  is '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�';
+comment on column sys_role.dept_check_strictly  is '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�';
+comment on column sys_role.status               is '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column sys_role.del_flag             is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�';
+comment on column sys_role.create_dept          is '鍒涘缓閮ㄩ棬';
+comment on column sys_role.create_by            is '鍒涘缓鑰�';
+comment on column sys_role.create_time          is '鍒涘缓鏃堕棿';
+comment on column sys_role.update_by            is '鏇存柊鑰�';
+comment on column sys_role.update_time          is '鏇存柊鏃堕棿';
+comment on column sys_role.remark               is '澶囨敞';
 
 -- ----------------------------
 -- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_role values('1', '瓒呯骇绠$悊鍛�',  'admin',  1, '1', 't', 't', '0', '0', 103, 1, now(), null, null, '瓒呯骇绠$悊鍛�');
-insert into sys_role values('2', '鏅�氳鑹�',    'common', 2, '2', 't', 't', '0', '0', 103, 1, now(), null, null, '鏅�氳鑹�');
+insert into sys_role values('1', '000000', '瓒呯骇绠$悊鍛�',  'superadmin',  1, '1', 't', 't', '0', '0', 103, 1, now(), null, null, '瓒呯骇绠$悊鍛�');
+insert into sys_role values('2', '000000', '鏅�氳鑹�',    'common', 2, '2', 't', 't', '0', '0', 103, 1, now(), null, null, '鏅�氳鑹�');
 
 
 -- ----------------------------
@@ -230,57 +333,60 @@
     constraint "sys_menu_pk" primary key (menu_id)
 );
 
-comment on table sys_menu is '鑿滃崟鏉冮檺琛�';
-comment on column sys_menu.menu_id is '鑿滃崟ID';
-comment on column sys_menu.menu_name is '鑿滃崟鍚嶇О';
-comment on column sys_menu.parent_id is '鐖惰彍鍗旾D';
-comment on column sys_menu.order_num is '鏄剧ず椤哄簭';
-comment on column sys_menu.path is '璺敱鍦板潃';
-comment on column sys_menu.component is '缁勪欢璺緞';
-comment on column sys_menu.query_param is '璺敱鍙傛暟';
-comment on column sys_menu.is_frame is '鏄惁涓哄閾撅紙0鏄� 1鍚︼級';
-comment on column sys_menu.is_cache is '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級';
-comment on column sys_menu.menu_type is '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�';
-comment on column sys_menu.visible is '鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�';
-comment on column sys_menu.status is '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�';
-comment on column sys_menu.perms is '鏉冮檺鏍囪瘑';
-comment on column sys_menu.icon is '鑿滃崟鍥炬爣';
-comment on column sys_menu.create_dept is '鍒涘缓閮ㄩ棬';
-comment on column sys_menu.create_by is '鍒涘缓鑰�';
-comment on column sys_menu.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_menu.update_by is '鏇存柊鑰�';
-comment on column sys_menu.update_time is '鏇存柊鏃堕棿';
-comment on column sys_menu.remark is '澶囨敞';
+comment on table sys_menu               is '鑿滃崟鏉冮檺琛�';
+comment on column sys_menu.menu_id      is '鑿滃崟ID';
+comment on column sys_menu.menu_name    is '鑿滃崟鍚嶇О';
+comment on column sys_menu.parent_id    is '鐖惰彍鍗旾D';
+comment on column sys_menu.order_num    is '鏄剧ず椤哄簭';
+comment on column sys_menu.path         is '璺敱鍦板潃';
+comment on column sys_menu.component    is '缁勪欢璺緞';
+comment on column sys_menu.query_param  is '璺敱鍙傛暟';
+comment on column sys_menu.is_frame     is '鏄惁涓哄閾撅紙0鏄� 1鍚︼級';
+comment on column sys_menu.is_cache     is '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級';
+comment on column sys_menu.menu_type    is '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�';
+comment on column sys_menu.visible      is '鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�';
+comment on column sys_menu.status       is '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column sys_menu.perms        is '鏉冮檺鏍囪瘑';
+comment on column sys_menu.icon         is '鑿滃崟鍥炬爣';
+comment on column sys_menu.create_dept  is '鍒涘缓閮ㄩ棬';
+comment on column sys_menu.create_by    is '鍒涘缓鑰�';
+comment on column sys_menu.create_time  is '鍒涘缓鏃堕棿';
+comment on column sys_menu.update_by    is '鏇存柊鑰�';
+comment on column sys_menu.update_time  is '鏇存柊鏃堕棿';
+comment on column sys_menu.remark       is '澶囨敞';
 
 -- ----------------------------
 -- 鍒濆鍖�-鑿滃崟淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
 -- 涓�绾ц彍鍗�
 insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system',           null, '', '1', '0', 'M', '0', '0', '', 'system',   103, 1, now(), null, null, '绯荤粺绠$悊鐩綍');
-insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '2', 'monitor',          null, '', '1', '0', 'M', '0', '0', '', 'monitor',  103, 1, now(), null, null, '绯荤粺鐩戞帶鐩綍');
-insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '3', 'tool',             null, '', '1', '0', 'M', '0', '0', '', 'tool',     103, 1, now(), null, null, '绯荤粺宸ュ叿鐩綍');
-insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '4', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', '0', '0', 'M', '0', '0', '', 'guide',    103, 1, now(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
+insert into sys_menu values('6', '绯荤粺绠$悊', '0', '2', 'tenant',           null, '', '1', '0', 'M', '0', '0', '', 'chart',    103, 1, now(), null, null, '绉熸埛绠$悊鐩綍');
+insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '3', 'monitor',          null, '', '1', '0', 'M', '0', '0', '', 'monitor',  103, 1, now(), null, null, '绯荤粺鐩戞帶鐩綍');
+insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '4', 'tool',             null, '', '1', '0', 'M', '0', '0', '', 'tool',     103, 1, now(), null, null, '绯荤粺宸ュ叿鐩綍');
+insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', '0', '0', 'M', '0', '0', '', 'guide',    103, 1, now(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
 -- 浜岀骇鑿滃崟
-insert into sys_menu values('100',  '鐢ㄦ埛绠$悊', '1',   '1', 'user',       'system/user/index',        '', '1', '0', 'C', '0', '0', 'system:user:list',        'user',          103, 1, now(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
-insert into sys_menu values('101',  '瑙掕壊绠$悊', '1',   '2', 'role',       'system/role/index',        '', '1', '0', 'C', '0', '0', 'system:role:list',        'peoples',       103, 1, now(), null, null, '瑙掕壊绠$悊鑿滃崟');
-insert into sys_menu values('102',  '鑿滃崟绠$悊', '1',   '3', 'menu',       'system/menu/index',        '', '1', '0', 'C', '0', '0', 'system:menu:list',        'tree-table',    103, 1, now(), null, null, '鑿滃崟绠$悊鑿滃崟');
-insert into sys_menu values('103',  '閮ㄩ棬绠$悊', '1',   '4', 'dept',       'system/dept/index',        '', '1', '0', 'C', '0', '0', 'system:dept:list',        'tree',          103, 1, now(), null, null, '閮ㄩ棬绠$悊鑿滃崟');
-insert into sys_menu values('104',  '宀椾綅绠$悊', '1',   '5', 'post',       'system/post/index',        '', '1', '0', 'C', '0', '0', 'system:post:list',        'post',          103, 1, now(), null, null, '宀椾綅绠$悊鑿滃崟');
-insert into sys_menu values('105',  '瀛楀吀绠$悊', '1',   '6', 'dict',       'system/dict/index',        '', '1', '0', 'C', '0', '0', 'system:dict:list',        'dict',          103, 1, now(), null, null, '瀛楀吀绠$悊鑿滃崟');
-insert into sys_menu values('106',  '鍙傛暟璁剧疆', '1',   '7', 'config',     'system/config/index',      '', '1', '0', 'C', '0', '0', 'system:config:list',      'edit',          103, 1, now(), null, null, '鍙傛暟璁剧疆鑿滃崟');
-insert into sys_menu values('107',  '閫氱煡鍏憡', '1',   '8', 'notice',     'system/notice/index',      '', '1', '0', 'C', '0', '0', 'system:notice:list',      'message',       103, 1, now(), null, null, '閫氱煡鍏憡鑿滃崟');
-insert into sys_menu values('108',  '鏃ュ織绠$悊', '1',   '9', 'log',        '',                         '', '1', '0', 'M', '0', '0', '',                        'log',           103, 1, now(), null, null, '鏃ュ織绠$悊鑿滃崟');
-insert into sys_menu values('109',  '鍦ㄧ嚎鐢ㄦ埛', '2',   '1', 'online',     'monitor/online/index',     '', '1', '0', 'C', '0', '0', 'monitor:online:list',     'online',        103, 1, now(), null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
-insert into sys_menu values('112',  '缂撳瓨鍒楄〃', '2',   '6', 'cacheList',  'monitor/cache/list',       '', '1', '0', 'C', '0', '0', 'monitor:cache:list',      'redis-list',    103, 1, now(), null, null, '缂撳瓨鍒楄〃鑿滃崟');
-insert into sys_menu values('113',  '缂撳瓨鐩戞帶', '2',   '5', 'cache',      'monitor/cache/index',      '', '1', '0', 'C', '0', '0', 'monitor:cache:list',      'redis',         103, 1, now(), null, null, '缂撳瓨鐩戞帶鑿滃崟');
-insert into sys_menu values('114',  '琛ㄥ崟鏋勫缓', '3',   '1', 'build',      'tool/build/index',         '', '1', '0', 'C', '0', '0', 'tool:build:list',         'build',         103, 1, now(), null, null, '琛ㄥ崟鏋勫缓鑿滃崟');
-insert into sys_menu values('115',  '浠g爜鐢熸垚', '3',   '2', 'gen',        'tool/gen/index',           '', '1', '0', 'C', '0', '0', 'tool:gen:list',           'code',          103, 1, now(), null, null, '浠g爜鐢熸垚鑿滃崟');
+insert into sys_menu values('100',  '鐢ㄦ埛绠$悊',     '1',   '1', 'user',             'system/user/index',            '', '1', '0', 'C', '0', '0', 'system:user:list',            'user',          103, 1, now(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
+insert into sys_menu values('101',  '瑙掕壊绠$悊',     '1',   '2', 'role',             'system/role/index',            '', '1', '0', 'C', '0', '0', 'system:role:list',            'peoples',       103, 1, now(), null, null, '瑙掕壊绠$悊鑿滃崟');
+insert into sys_menu values('102',  '鑿滃崟绠$悊',     '1',   '3', 'menu',             'system/menu/index',            '', '1', '0', 'C', '0', '0', 'system:menu:list',            'tree-table',    103, 1, now(), null, null, '鑿滃崟绠$悊鑿滃崟');
+insert into sys_menu values('103',  '閮ㄩ棬绠$悊',     '1',   '4', 'dept',             'system/dept/index',            '', '1', '0', 'C', '0', '0', 'system:dept:list',            'tree',          103, 1, now(), null, null, '閮ㄩ棬绠$悊鑿滃崟');
+insert into sys_menu values('104',  '宀椾綅绠$悊',     '1',   '5', 'post',             'system/post/index',            '', '1', '0', 'C', '0', '0', 'system:post:list',            'post',          103, 1, now(), null, null, '宀椾綅绠$悊鑿滃崟');
+insert into sys_menu values('105',  '瀛楀吀绠$悊',     '1',   '6', 'dict',             'system/dict/index',            '', '1', '0', 'C', '0', '0', 'system:dict:list',            'dict',          103, 1, now(), null, null, '瀛楀吀绠$悊鑿滃崟');
+insert into sys_menu values('106',  '鍙傛暟璁剧疆',     '1',   '7', 'config',           'system/config/index',          '', '1', '0', 'C', '0', '0', 'system:config:list',          'edit',          103, 1, now(), null, null, '鍙傛暟璁剧疆鑿滃崟');
+insert into sys_menu values('107',  '閫氱煡鍏憡',     '1',   '8', 'notice',           'system/notice/index',          '', '1', '0', 'C', '0', '0', 'system:notice:list',          'message',       103, 1, now(), null, null, '閫氱煡鍏憡鑿滃崟');
+insert into sys_menu values('108',  '鏃ュ織绠$悊',     '1',   '9', 'log',              '',                             '', '1', '0', 'M', '0', '0', '',                            'log',           103, 1, now(), null, null, '鏃ュ織绠$悊鑿滃崟');
+insert into sys_menu values('109',  '鍦ㄧ嚎鐢ㄦ埛',     '2',   '1', 'online',           'monitor/online/index',         '', '1', '0', 'C', '0', '0', 'monitor:online:list',         'online',        103, 1, now(), null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
+insert into sys_menu values('113',  '缂撳瓨鐩戞帶',     '2',   '5', 'cache',            'monitor/cache/index',          '', '1', '0', 'C', '0', '0', 'monitor:cache:list',          'redis',         103, 1, now(), null, null, '缂撳瓨鐩戞帶鑿滃崟');
+insert into sys_menu values('114',  '琛ㄥ崟鏋勫缓',     '3',   '1', 'build',            'tool/build/index',             '', '1', '0', 'C', '0', '0', 'tool:build:list',             'build',         103, 1, now(), null, null, '琛ㄥ崟鏋勫缓鑿滃崟');
+insert into sys_menu values('115',  '浠g爜鐢熸垚',     '3',   '2', 'gen',              'tool/gen/index',               '', '1', '0', 'C', '0', '0', 'tool:gen:list',               'code',          103, 1, now(), null, null, '浠g爜鐢熸垚鑿滃崟');
+insert into sys_menu values('121',  '绉熸埛绠$悊',     '6',   '1', 'tenant',           'system/tenant/index',          '', '1', '0', 'C', '0', '0', 'system:tenant:list',          'list',          103, 1, now(), null, null, '绉熸埛绠$悊鑿滃崟');
+insert into sys_menu values('122',  '绉熸埛濂楅绠$悊',  '6',   '2', 'tenantPackage',    'system/tenantPackage/index',   '', '1', '0', 'C', '0', '0', 'system:tenantPackage:list',   'form',          103, 1, now(), null, null, '绉熸埛濂楅绠$悊鑿滃崟');
+
 -- springboot-admin鐩戞帶
-insert into sys_menu values('117',  'Admin鐩戞帶', '2',  '5', 'Admin',      'monitor/admin/index',      '', '1', '0', 'C', '0', '0', 'monitor:admin:list',      'dashboard',     103, 1, now(), null, null, 'Admin鐩戞帶鑿滃崟');
+insert into sys_menu values('117',  'Admin鐩戞帶',   '2',   '5',  'Admin',            'monitor/admin/index',         '', '1', '0', 'C', '0', '0', 'monitor:admin:list',          'dashboard',     103, 1, now(), null, null, 'Admin鐩戞帶鑿滃崟');
 -- oss鑿滃崟
-insert into sys_menu values('118',  '鏂囦欢绠$悊', '1', '10', 'oss', 'system/oss/index', '', '1', '0', 'C', '0', '0', 'system:oss:list', 'upload', 103, 1, now(), null, null, '鏂囦欢绠$悊鑿滃崟');
+insert into sys_menu values('118',  '鏂囦欢绠$悊',     '1',   '10', 'oss',              'system/oss/index',            '', '1', '0', 'C', '0', '0', 'system:oss:list',             'upload',        103, 1, now(), null, null, '鏂囦欢绠$悊鑿滃崟');
 -- xxl-job-admin鎺у埗鍙�
-insert into sys_menu values('120',  '浠诲姟璋冨害涓績', '2',  '5', 'XxlJob',      'monitor/xxljob/index',      '', '1', '0', 'C', '0', '0', 'monitor:xxljob:list',      'job',     103, 1, now(), null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�');
+insert into sys_menu values('120',  '浠诲姟璋冨害涓績',  '2',   '5',  'XxlJob',           'monitor/xxljob/index',        '', '1', '0', 'C', '0', '0', 'monitor:xxljob:list',         'job',           103, 1, now(), null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�');
 
 -- 涓夌骇鑿滃崟
 insert into sys_menu values('500',  '鎿嶄綔鏃ュ織', '108', '1', 'operlog',    'monitor/operlog/index',    '', '1', '0', 'C', '0', '0', 'monitor:operlog:list',    'form',          103, 1, now(), null, null, '鎿嶄綔鏃ュ織鑿滃崟');
@@ -359,6 +465,18 @@
 insert into sys_menu values('1603', '鏂囦欢鍒犻櫎', '118', '4', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:remove',       '#', 103, 1, now(), null, null, '');
 insert into sys_menu values('1604', '閰嶇疆娣诲姞', '118', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:add',          '#', 103, 1, now(), null, null, '');
 insert into sys_menu values('1605', '閰嶇疆缂栬緫', '118', '6', '#', '', '', '1', '0', 'F', '0', '0', 'system:oss:edit',         '#', 103, 1, now(), null, null, '');
+-- 绉熸埛绠$悊鐩稿叧鎸夐挳
+insert into sys_menu values('1606', '绉熸埛鏌ヨ', '121', '1', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:query',   '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1607', '绉熸埛鏂板', '121', '2', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:add',     '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1608', '绉熸埛淇敼', '121', '3', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:edit',    '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1609', '绉熸埛鍒犻櫎', '121', '4', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:remove',  '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1610', '绉熸埛瀵煎嚭', '121', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenant:export',  '#', 103, 1, now(), null, null, '');
+-- 绉熸埛濂楅绠$悊鐩稿叧鎸夐挳
+insert into sys_menu values('1611', '绉熸埛濂楅鏌ヨ', '122', '1', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:query',   '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1612', '绉熸埛濂楅鏂板', '122', '2', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:add',     '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1613', '绉熸埛濂楅淇敼', '122', '3', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:edit',    '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1614', '绉熸埛濂楅鍒犻櫎', '122', '4', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:remove',  '#', 103, 1, now(), null, null, '');
+insert into sys_menu values('1615', '绉熸埛濂楅瀵煎嚭', '122', '5', '#', '', '', '1', '0', 'F', '0', '0', 'system:tenantPackage:export',  '#', 103, 1, now(), null, null, '');
 
 
 -- ----------------------------
@@ -372,9 +490,9 @@
     constraint sys_user_role_pk primary key (user_id, role_id)
 );
 
-comment on table sys_user_role is '鐢ㄦ埛鍜岃鑹插叧鑱旇〃';
-comment on column sys_user_role.user_id is '鐢ㄦ埛ID';
-comment on column sys_user_role.role_id is '瑙掕壊ID';
+comment on table sys_user_role              is '鐢ㄦ埛鍜岃鑹插叧鑱旇〃';
+comment on column sys_user_role.user_id     is '鐢ㄦ埛ID';
+comment on column sys_user_role.role_id     is '瑙掕壊ID';
 
 -- ----------------------------
 -- 鍒濆鍖�-鐢ㄦ埛鍜岃鑹插叧鑱旇〃鏁版嵁
@@ -394,9 +512,9 @@
     constraint sys_role_menu_pk primary key (role_id, menu_id)
 );
 
-comment on table sys_role_menu is '瑙掕壊鍜岃彍鍗曞叧鑱旇〃';
-comment on column sys_role_menu.role_id is '瑙掕壊ID';
-comment on column sys_role_menu.menu_id is '鑿滃崟ID';
+comment on table sys_role_menu              is '瑙掕壊鍜岃彍鍗曞叧鑱旇〃';
+comment on column sys_role_menu.role_id     is '瑙掕壊ID';
+comment on column sys_role_menu.menu_id     is '鑿滃崟ID';
 
 -- ----------------------------
 -- 鍒濆鍖�-瑙掕壊鍜岃彍鍗曞叧鑱旇〃鏁版嵁
@@ -492,9 +610,9 @@
     constraint sys_role_dept_pk primary key (role_id, dept_id)
 );
 
-comment on table sys_role_dept is '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃';
-comment on column sys_role_dept.role_id is '瑙掕壊ID';
-comment on column sys_role_dept.dept_id is '閮ㄩ棬ID';
+comment on table sys_role_dept              is '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃';
+comment on column sys_role_dept.role_id     is '瑙掕壊ID';
+comment on column sys_role_dept.dept_id     is '閮ㄩ棬ID';
 
 -- ----------------------------
 -- 鍒濆鍖�-瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃鏁版嵁
@@ -515,9 +633,9 @@
     constraint sys_user_post_pk primary key (user_id, post_id)
 );
 
-comment on table sys_user_post is '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃';
-comment on column sys_user_post.user_id is '鐢ㄦ埛ID';
-comment on column sys_user_post.post_id is '宀椾綅ID';
+comment on table sys_user_post              is '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃';
+comment on column sys_user_post.user_id     is '鐢ㄦ埛ID';
+comment on column sys_user_post.post_id     is '宀椾綅ID';
 
 -- ----------------------------
 -- 鍒濆鍖�-鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃鏁版嵁
@@ -533,6 +651,7 @@
 create table if not exists sys_oper_log
 (
     oper_id        int8,
+    tenant_id      varchar(20)   not null,
     title          varchar(50)   default ''::varchar,
     business_type  int4          default 0,
     method         varchar(100)  default ''::varchar,
@@ -551,23 +670,24 @@
     constraint sys_oper_log_pk primary key (oper_id)
 );
 
-comment on table sys_oper_log is '鎿嶄綔鏃ュ織璁板綍';
-comment on column sys_oper_log.oper_id is '鏃ュ織涓婚敭';
-comment on column sys_oper_log.title is '妯″潡鏍囬';
-comment on column sys_oper_log.business_type is '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�';
-comment on column sys_oper_log.method is '鏂规硶鍚嶇О';
-comment on column sys_oper_log.request_method is '璇锋眰鏂瑰紡';
-comment on column sys_oper_log.operator_type is '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級';
-comment on column sys_oper_log.oper_name is '鎿嶄綔浜哄憳';
-comment on column sys_oper_log.dept_name is '閮ㄩ棬鍚嶇О';
-comment on column sys_oper_log.oper_url is '璇锋眰URL';
-comment on column sys_oper_log.oper_ip is '涓绘満鍦板潃';
-comment on column sys_oper_log.oper_location is '鎿嶄綔鍦扮偣';
-comment on column sys_oper_log.oper_param is '璇锋眰鍙傛暟';
-comment on column sys_oper_log.json_result is '杩斿洖鍙傛暟';
-comment on column sys_oper_log.status is '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�';
-comment on column sys_oper_log.error_msg is '閿欒娑堟伅';
-comment on column sys_oper_log.oper_time is '鎿嶄綔鏃堕棿';
+comment on table sys_oper_log                   is '鎿嶄綔鏃ュ織璁板綍';
+comment on column sys_oper_log.oper_id          is '鏃ュ織涓婚敭';
+comment on column sys_oper_log.tenant_id        is '绉熸埛缂栧彿';
+comment on column sys_oper_log.title            is '妯″潡鏍囬';
+comment on column sys_oper_log.business_type    is '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�';
+comment on column sys_oper_log.method           is '鏂规硶鍚嶇О';
+comment on column sys_oper_log.request_method   is '璇锋眰鏂瑰紡';
+comment on column sys_oper_log.operator_type    is '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級';
+comment on column sys_oper_log.oper_name        is '鎿嶄綔浜哄憳';
+comment on column sys_oper_log.dept_name        is '閮ㄩ棬鍚嶇О';
+comment on column sys_oper_log.oper_url         is '璇锋眰URL';
+comment on column sys_oper_log.oper_ip          is '涓绘満鍦板潃';
+comment on column sys_oper_log.oper_location    is '鎿嶄綔鍦扮偣';
+comment on column sys_oper_log.oper_param       is '璇锋眰鍙傛暟';
+comment on column sys_oper_log.json_result      is '杩斿洖鍙傛暟';
+comment on column sys_oper_log.status           is '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�';
+comment on column sys_oper_log.error_msg        is '閿欒娑堟伅';
+comment on column sys_oper_log.oper_time        is '鎿嶄綔鏃堕棿';
 
 -- ----------------------------
 -- 11銆佸瓧鍏哥被鍨嬭〃
@@ -576,6 +696,7 @@
 create table if not exists sys_dict_type
 (
     dict_id     int8,
+    tenant_id   varchar(20)  not null,
     dict_name   varchar(100) default ''::varchar,
     dict_type   varchar(100) default ''::varchar,
     status      char         default '0'::bpchar,
@@ -588,26 +709,29 @@
     constraint sys_dict_type_pk primary key (dict_id)
 );
 
-comment on table sys_dict_type is '瀛楀吀绫诲瀷琛�';
-comment on column sys_dict_type.dict_id is '瀛楀吀涓婚敭';
-comment on column sys_dict_type.dict_name is '瀛楀吀鍚嶇О';
-comment on column sys_dict_type.dict_type is '瀛楀吀绫诲瀷';
-comment on column sys_dict_type.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
-comment on column sys_dict_type.create_dept is '鍒涘缓閮ㄩ棬';
-comment on column sys_dict_type.create_by is '鍒涘缓鑰�';
-comment on column sys_dict_type.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_dict_type.update_by is '鏇存柊鑰�';
-comment on column sys_dict_type.update_time is '鏇存柊鏃堕棿';
-comment on column sys_dict_type.remark is '澶囨敞';
+CREATE UNIQUE INDEX sys_dict_type_index1 ON sys_dict_type (tenant_id, dict_type);
 
-insert into sys_dict_type values(1,  '鐢ㄦ埛鎬у埆', 'sys_user_sex',        '0', 103, 1, now(), null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
-insert into sys_dict_type values(2,  '鑿滃崟鐘舵��', 'sys_show_hide',       '0', 103, 1, now(), null, null, '鑿滃崟鐘舵�佸垪琛�');
-insert into sys_dict_type values(3,  '绯荤粺寮�鍏�', 'sys_normal_disable',  '0', 103, 1, now(), null, null, '绯荤粺寮�鍏冲垪琛�');
-insert into sys_dict_type values(6,  '绯荤粺鏄惁', 'sys_yes_no',          '0', 103, 1, now(), null, null, '绯荤粺鏄惁鍒楄〃');
-insert into sys_dict_type values(7,  '閫氱煡绫诲瀷', 'sys_notice_type',     '0', 103, 1, now(), null, null, '閫氱煡绫诲瀷鍒楄〃');
-insert into sys_dict_type values(8,  '閫氱煡鐘舵��', 'sys_notice_status',   '0', 103, 1, now(), null, null, '閫氱煡鐘舵�佸垪琛�');
-insert into sys_dict_type values(9,  '鎿嶄綔绫诲瀷', 'sys_oper_type',       '0', 103, 1, now(), null, null, '鎿嶄綔绫诲瀷鍒楄〃');
-insert into sys_dict_type values(10, '绯荤粺鐘舵��', 'sys_common_status',   '0', 103, 1, now(), null, null, '鐧诲綍鐘舵�佸垪琛�');
+comment on table sys_dict_type                  is '瀛楀吀绫诲瀷琛�';
+comment on column sys_dict_type.dict_id         is '瀛楀吀涓婚敭';
+comment on column sys_dict_type.tenant_id       is '绉熸埛缂栧彿';
+comment on column sys_dict_type.dict_name       is '瀛楀吀鍚嶇О';
+comment on column sys_dict_type.dict_type       is '瀛楀吀绫诲瀷';
+comment on column sys_dict_type.status          is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column sys_dict_type.create_dept     is '鍒涘缓閮ㄩ棬';
+comment on column sys_dict_type.create_by       is '鍒涘缓鑰�';
+comment on column sys_dict_type.create_time     is '鍒涘缓鏃堕棿';
+comment on column sys_dict_type.update_by       is '鏇存柊鑰�';
+comment on column sys_dict_type.update_time     is '鏇存柊鏃堕棿';
+comment on column sys_dict_type.remark          is '澶囨敞';
+
+insert into sys_dict_type values(1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex',        '0', 103, 1, now(), null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
+insert into sys_dict_type values(2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide',       '0', 103, 1, now(), null, null, '鑿滃崟鐘舵�佸垪琛�');
+insert into sys_dict_type values(3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable',  '0', 103, 1, now(), null, null, '绯荤粺寮�鍏冲垪琛�');
+insert into sys_dict_type values(6, '000000', '绯荤粺鏄惁', 'sys_yes_no',          '0', 103, 1, now(), null, null, '绯荤粺鏄惁鍒楄〃');
+insert into sys_dict_type values(7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type',     '0', 103, 1, now(), null, null, '閫氱煡绫诲瀷鍒楄〃');
+insert into sys_dict_type values(8, '000000', '閫氱煡鐘舵��', 'sys_notice_status',   '0', 103, 1, now(), null, null, '閫氱煡鐘舵�佸垪琛�');
+insert into sys_dict_type values(9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type',       '0', 103, 1, now(), null, null, '鎿嶄綔绫诲瀷鍒楄〃');
+insert into sys_dict_type values(10, '000000', '绯荤粺鐘舵��', 'sys_common_status',   '0', 103, 1, now(), null, null, '鐧诲綍鐘舵�佸垪琛�');
 
 
 -- ----------------------------
@@ -617,6 +741,7 @@
 create table if not exists sys_dict_data
 (
     dict_code   int8,
+    tenant_id   varchar(20)  not null,
     dict_sort   int4         default 0,
     dict_label  varchar(100) default ''::varchar,
     dict_value  varchar(100) default ''::varchar,
@@ -634,48 +759,49 @@
     constraint sys_dict_data_pk primary key (dict_code)
 );
 
-comment on table sys_dict_data is '瀛楀吀鏁版嵁琛�';
-comment on column sys_dict_data.dict_code is '瀛楀吀缂栫爜';
-comment on column sys_dict_data.dict_sort is '瀛楀吀鎺掑簭';
-comment on column sys_dict_data.dict_label is '瀛楀吀鏍囩';
-comment on column sys_dict_data.dict_value is '瀛楀吀閿��';
-comment on column sys_dict_data.dict_type is '瀛楀吀绫诲瀷';
-comment on column sys_dict_data.css_class is '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�';
-comment on column sys_dict_data.list_class is '琛ㄦ牸鍥炴樉鏍峰紡';
-comment on column sys_dict_data.is_default is '鏄惁榛樿锛圷鏄� N鍚︼級';
-comment on column sys_dict_data.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
-comment on column sys_dict_data.create_dept is '鍒涘缓閮ㄩ棬';
-comment on column sys_dict_data.create_by is '鍒涘缓鑰�';
-comment on column sys_dict_data.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_dict_data.update_by is '鏇存柊鑰�';
-comment on column sys_dict_data.update_time is '鏇存柊鏃堕棿';
-comment on column sys_dict_data.remark is '澶囨敞';
+comment on table sys_dict_data                  is '瀛楀吀鏁版嵁琛�';
+comment on column sys_dict_data.dict_code       is '瀛楀吀缂栫爜';
+comment on column sys_dict_type.tenant_id       is '绉熸埛缂栧彿';
+comment on column sys_dict_data.dict_sort       is '瀛楀吀鎺掑簭';
+comment on column sys_dict_data.dict_label      is '瀛楀吀鏍囩';
+comment on column sys_dict_data.dict_value      is '瀛楀吀閿��';
+comment on column sys_dict_data.dict_type       is '瀛楀吀绫诲瀷';
+comment on column sys_dict_data.css_class       is '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�';
+comment on column sys_dict_data.list_class      is '琛ㄦ牸鍥炴樉鏍峰紡';
+comment on column sys_dict_data.is_default      is '鏄惁榛樿锛圷鏄� N鍚︼級';
+comment on column sys_dict_data.status          is '鐘舵�侊紙0姝e父 1鍋滅敤锛�';
+comment on column sys_dict_data.create_dept     is '鍒涘缓閮ㄩ棬';
+comment on column sys_dict_data.create_by       is '鍒涘缓鑰�';
+comment on column sys_dict_data.create_time     is '鍒涘缓鏃堕棿';
+comment on column sys_dict_data.update_by       is '鏇存柊鑰�';
+comment on column sys_dict_data.update_time     is '鏇存柊鏃堕棿';
+comment on column sys_dict_data.remark          is '澶囨敞';
 
-insert into sys_dict_data values(1,  1,  '鐢�',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 103, 1, now(), null, null, '鎬у埆鐢�');
-insert into sys_dict_data values(2,  2,  '濂�',       '1',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, now(), null, null, '鎬у埆濂�');
-insert into sys_dict_data values(3,  3,  '鏈煡',     '2',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, now(), null, null, '鎬у埆鏈煡');
-insert into sys_dict_data values(4,  1,  '鏄剧ず',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 103, 1, now(), null, null, '鏄剧ず鑿滃崟');
-insert into sys_dict_data values(5,  2,  '闅愯棌',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '闅愯棌鑿滃崟');
-insert into sys_dict_data values(6,  1,  '姝e父',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 103, 1, now(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(7,  2,  '鍋滅敤',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍋滅敤鐘舵��');
-insert into sys_dict_data values(12, 1,  '鏄�',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 103, 1, now(), null, null, '绯荤粺榛樿鏄�');
-insert into sys_dict_data values(13, 2,  '鍚�',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 103, 1, now(), null, null, '绯荤粺榛樿鍚�');
-insert into sys_dict_data values(14, 1,  '閫氱煡',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 103, 1, now(), null, null, '閫氱煡');
-insert into sys_dict_data values(15, 2,  '鍏憡',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 103, 1, now(), null, null, '鍏憡');
-insert into sys_dict_data values(16, 1,  '姝e父',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 103, 1, now(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(17, 2,  '鍏抽棴',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍏抽棴鐘舵��');
-insert into sys_dict_data values(29, 99, '鍏朵粬',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, now(), null, null, '鍏朵粬鎿嶄綔');
-insert into sys_dict_data values(18, 1,  '鏂板',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, now(), null, null, '鏂板鎿嶄綔');
-insert into sys_dict_data values(19, 2,  '淇敼',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, now(), null, null, '淇敼鎿嶄綔');
-insert into sys_dict_data values(20, 3,  '鍒犻櫎',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍒犻櫎鎿嶄綔');
-insert into sys_dict_data values(21, 4,  '鎺堟潈',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 103, 1, now(), null, null, '鎺堟潈鎿嶄綔');
-insert into sys_dict_data values(22, 5,  '瀵煎嚭',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, now(), null, null, '瀵煎嚭鎿嶄綔');
-insert into sys_dict_data values(23, 6,  '瀵煎叆',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, now(), null, null, '瀵煎叆鎿嶄綔');
-insert into sys_dict_data values(24, 7,  '寮洪��',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '寮洪��鎿嶄綔');
-insert into sys_dict_data values(25, 8,  '鐢熸垚浠g爜', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, now(), null, null, '鐢熸垚鎿嶄綔');
-insert into sys_dict_data values(26, 9,  '娓呯┖鏁版嵁', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '娓呯┖鎿嶄綔');
-insert into sys_dict_data values(27, 1,  '鎴愬姛',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 103, 1, now(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(28, 2,  '澶辫触',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data values(1, '000000', 1,  '鐢�',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 103, 1, now(), null, null, '鎬у埆鐢�');
+insert into sys_dict_data values(2, '000000', 2,  '濂�',       '1',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, now(), null, null, '鎬у埆濂�');
+insert into sys_dict_data values(3, '000000', 3,  '鏈煡',     '2',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, now(), null, null, '鎬у埆鏈煡');
+insert into sys_dict_data values(4, '000000', 1,  '鏄剧ず',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 103, 1, now(), null, null, '鏄剧ず鑿滃崟');
+insert into sys_dict_data values(5, '000000', 2,  '闅愯棌',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '闅愯棌鑿滃崟');
+insert into sys_dict_data values(6, '000000', 1,  '姝e父',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 103, 1, now(), null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(7, '000000', 2,  '鍋滅敤',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data values(12, '000000', 1,  '鏄�',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 103, 1, now(), null, null, '绯荤粺榛樿鏄�');
+insert into sys_dict_data values(13, '000000', 2,  '鍚�',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 103, 1, now(), null, null, '绯荤粺榛樿鍚�');
+insert into sys_dict_data values(14, '000000', 1,  '閫氱煡',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 103, 1, now(), null, null, '閫氱煡');
+insert into sys_dict_data values(15, '000000', 2,  '鍏憡',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 103, 1, now(), null, null, '鍏憡');
+insert into sys_dict_data values(16, '000000', 1,  '姝e父',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 103, 1, now(), null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(17, '000000', 2,  '鍏抽棴',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍏抽棴鐘舵��');
+insert into sys_dict_data values(29, '000000', 99, '鍏朵粬',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, now(), null, null, '鍏朵粬鎿嶄綔');
+insert into sys_dict_data values(18, '000000', 1,  '鏂板',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, now(), null, null, '鏂板鎿嶄綔');
+insert into sys_dict_data values(19, '000000', 2,  '淇敼',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, now(), null, null, '淇敼鎿嶄綔');
+insert into sys_dict_data values(20, '000000', 3,  '鍒犻櫎',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍒犻櫎鎿嶄綔');
+insert into sys_dict_data values(21, '000000', 4,  '鎺堟潈',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 103, 1, now(), null, null, '鎺堟潈鎿嶄綔');
+insert into sys_dict_data values(22, '000000', 5,  '瀵煎嚭',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, now(), null, null, '瀵煎嚭鎿嶄綔');
+insert into sys_dict_data values(23, '000000', 6,  '瀵煎叆',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, now(), null, null, '瀵煎叆鎿嶄綔');
+insert into sys_dict_data values(24, '000000', 7,  '寮洪��',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '寮洪��鎿嶄綔');
+insert into sys_dict_data values(25, '000000', 8,  '鐢熸垚浠g爜', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, now(), null, null, '鐢熸垚鎿嶄綔');
+insert into sys_dict_data values(26, '000000', 9,  '娓呯┖鏁版嵁', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, now(), null, null, '娓呯┖鎿嶄綔');
+insert into sys_dict_data values(27, '000000', 1,  '鎴愬姛',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 103, 1, now(), null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(28, '000000', 2,  '澶辫触',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 103, 1, now(), null, null, '鍋滅敤鐘舵��');
 
 
 -- ----------------------------
@@ -685,6 +811,7 @@
 create table if not exists sys_config
 (
     config_id    int8,
+    tenant_id    varchar(20)  not null,
     config_name  varchar(100) default ''::varchar,
     config_key   varchar(100) default ''::varchar,
     config_value varchar(500) default ''::varchar,
@@ -698,25 +825,25 @@
     constraint sys_config_pk primary key (config_id)
 );
 
-comment on table sys_config is '鍙傛暟閰嶇疆琛�';
-comment on column sys_config.config_id is '鍙傛暟涓婚敭';
-comment on column sys_config.config_name is '鍙傛暟鍚嶇О';
-comment on column sys_config.config_key is '鍙傛暟閿悕';
-comment on column sys_config.config_value is '鍙傛暟閿��';
-comment on column sys_config.config_type is '绯荤粺鍐呯疆锛圷鏄� N鍚︼級';
-comment on column sys_config.create_dept   is '鍒涘缓閮ㄩ棬';
-comment on column sys_config.create_by is '鍒涘缓鑰�';
-comment on column sys_config.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_config.update_by is '鏇存柊鑰�';
-comment on column sys_config.update_time is '鏇存柊鏃堕棿';
-comment on column sys_config.remark is '澶囨敞';
+comment on table sys_config                 is '鍙傛暟閰嶇疆琛�';
+comment on column sys_config.config_id      is '鍙傛暟涓婚敭';
+comment on column sys_config.tenant_id      is '绉熸埛缂栧彿';
+comment on column sys_config.config_name    is '鍙傛暟鍚嶇О';
+comment on column sys_config.config_key     is '鍙傛暟閿悕';
+comment on column sys_config.config_value   is '鍙傛暟閿��';
+comment on column sys_config.config_type    is '绯荤粺鍐呯疆锛圷鏄� N鍚︼級';
+comment on column sys_config.create_dept    is '鍒涘缓閮ㄩ棬';
+comment on column sys_config.create_by      is '鍒涘缓鑰�';
+comment on column sys_config.create_time    is '鍒涘缓鏃堕棿';
+comment on column sys_config.update_by      is '鏇存柊鑰�';
+comment on column sys_config.update_time    is '鏇存柊鏃堕棿';
+comment on column sys_config.remark         is '澶囨敞';
 
-insert into sys_config values(1, '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',     'sys.index.skinName',            'skin-blue',     'Y', 103, 1, now(), null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' );
-insert into sys_config values(2, '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',         'sys.user.initPassword',         '123456',        'Y', 103, 1, now(), null, null, '鍒濆鍖栧瘑鐮� 123456' );
-insert into sys_config values(3, '涓绘鏋堕〉-渚ц竟鏍忎富棰�',           'sys.index.sideTheme',           'theme-dark',    'Y', 103, 1, now(), null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' );
-insert into sys_config values(4, '璐﹀彿鑷姪-楠岃瘉鐮佸紑鍏�',           'sys.account.captchaEnabled',    'true',          'Y', 103, 1, now(), null, null, '鏄惁寮�鍚獙璇佺爜鍔熻兘锛坱rue寮�鍚紝false鍏抽棴锛�');
-insert into sys_config values(5, '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�',   'sys.account.registerUser',      'false',         'Y', 103, 1, now(), null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
-insert into sys_config values(11, 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',          'sys.oss.previewListResource',   'true',          'Y', 103, 1, now(), null, null, 'true:寮�鍚�, false:鍏抽棴');
+insert into sys_config values(1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',     'sys.index.skinName',            'skin-blue',     'Y', 103, 1, now(), null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' );
+insert into sys_config values(2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',         'sys.user.initPassword',         '123456',        'Y', 103, 1, now(), null, null, '鍒濆鍖栧瘑鐮� 123456' );
+insert into sys_config values(3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�',           'sys.index.sideTheme',           'theme-dark',    'Y', 103, 1, now(), null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' );
+insert into sys_config values(5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�',   'sys.account.registerUser',      'false',         'Y', 103, 1, now(), null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
+insert into sys_config values(11, '000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',          'sys.oss.previewListResource',   'true',          'Y', 103, 1, now(), null, null, 'true:寮�鍚�, false:鍏抽棴');
 
 
 -- ----------------------------
@@ -726,6 +853,7 @@
 create table if not exists sys_logininfor
 (
     info_id        int8,
+    tenant_id      varchar(20)  not null,
     user_name      varchar(50)  default ''::varchar,
     ipaddr         varchar(128) default ''::varchar,
     login_location varchar(255) default ''::varchar,
@@ -737,16 +865,17 @@
     constraint sys_logininfor_pk primary key (info_id)
 );
 
-comment on table sys_logininfor is '绯荤粺璁块棶璁板綍';
-comment on column sys_logininfor.info_id is '璁块棶ID';
-comment on column sys_logininfor.user_name is '鐢ㄦ埛璐﹀彿';
-comment on column sys_logininfor.ipaddr is '鐧诲綍IP鍦板潃';
+comment on table sys_logininfor                 is '绯荤粺璁块棶璁板綍';
+comment on column sys_logininfor.info_id        is '璁块棶ID';
+comment on column sys_logininfor.tenant_id      is '绉熸埛缂栧彿';
+comment on column sys_logininfor.user_name      is '鐢ㄦ埛璐﹀彿';
+comment on column sys_logininfor.ipaddr         is '鐧诲綍IP鍦板潃';
 comment on column sys_logininfor.login_location is '鐧诲綍鍦扮偣';
-comment on column sys_logininfor.browser is '娴忚鍣ㄧ被鍨�';
-comment on column sys_logininfor.os is '鎿嶄綔绯荤粺';
-comment on column sys_logininfor.status is '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�';
-comment on column sys_logininfor.msg is '鎻愮ず娑堟伅';
-comment on column sys_logininfor.login_time is '璁块棶鏃堕棿';
+comment on column sys_logininfor.browser        is '娴忚鍣ㄧ被鍨�';
+comment on column sys_logininfor.os             is '鎿嶄綔绯荤粺';
+comment on column sys_logininfor.status         is '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�';
+comment on column sys_logininfor.msg            is '鎻愮ず娑堟伅';
+comment on column sys_logininfor.login_time     is '璁块棶鏃堕棿';
 
 -- ----------------------------
 -- 17銆侀�氱煡鍏憡琛�
@@ -755,8 +884,9 @@
 create table if not exists sys_notice
 (
     notice_id      int8,
-    notice_title   varchar(50) not null,
-    notice_type    char        not null,
+    tenant_id      varchar(20)  not null,
+    notice_title   varchar(50)  not null,
+    notice_type    char         not null,
     notice_content text,
     status         char         default '0'::bpchar,
     create_dept    int8,
@@ -768,24 +898,25 @@
     constraint sys_notice_pk primary key (notice_id)
 );
 
-comment on table sys_notice is '閫氱煡鍏憡琛�';
-comment on column sys_notice.notice_id is '鍏憡ID';
-comment on column sys_notice.notice_title is '鍏憡鏍囬';
-comment on column sys_notice.notice_type is '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�';
+comment on table sys_notice                 is '閫氱煡鍏憡琛�';
+comment on column sys_notice.notice_id      is '鍏憡ID';
+comment on column sys_notice.tenant_id      is '绉熸埛缂栧彿';
+comment on column sys_notice.notice_title   is '鍏憡鏍囬';
+comment on column sys_notice.notice_type    is '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�';
 comment on column sys_notice.notice_content is '鍏憡鍐呭';
-comment on column sys_notice.status is '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�';
-comment on column sys_notice.create_dept is '鍒涘缓閮ㄩ棬';
-comment on column sys_notice.create_by is '鍒涘缓鑰�';
-comment on column sys_notice.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_notice.update_by is '鏇存柊鑰�';
-comment on column sys_notice.update_time is '鏇存柊鏃堕棿';
-comment on column sys_notice.remark is '澶囨敞';
+comment on column sys_notice.status         is '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�';
+comment on column sys_notice.create_dept    is '鍒涘缓閮ㄩ棬';
+comment on column sys_notice.create_by      is '鍒涘缓鑰�';
+comment on column sys_notice.create_time    is '鍒涘缓鏃堕棿';
+comment on column sys_notice.update_by      is '鏇存柊鑰�';
+comment on column sys_notice.update_time    is '鏇存柊鏃堕棿';
+comment on column sys_notice.remark         is '澶囨敞';
 
 -- ----------------------------
 -- 鍒濆鍖�-鍏憡淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_notice values('1', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, now(), null, null, '绠$悊鍛�');
-insert into sys_notice values('2', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭',   '0', 103, 1, now(), null, null, '绠$悊鍛�');
+insert into sys_notice values('1', '000000', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, now(), null, null, '绠$悊鍛�');
+insert into sys_notice values('2', '000000', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭',   '0', 103, 1, now(), null, null, '绠$悊鍛�');
 
 
 -- ----------------------------
@@ -904,6 +1035,7 @@
 create table if not exists sys_oss
 (
     oss_id        int8,
+    tenant_id     varchar(20)  not null,
     file_name     varchar(255) default ''::varchar not null,
     original_name varchar(255) default ''::varchar not null,
     file_suffix   varchar(10)  default ''::varchar not null,
@@ -917,18 +1049,19 @@
     constraint sys_oss_pk primary key (oss_id)
 );
 
-comment on table sys_oss is 'OSS瀵硅薄瀛樺偍琛�';
-comment on column sys_oss.oss_id is '瀵硅薄瀛樺偍涓婚敭';
-comment on column sys_oss.file_name is '鏂囦欢鍚�';
-comment on column sys_oss.original_name is '鍘熷悕';
-comment on column sys_oss.file_suffix is '鏂囦欢鍚庣紑鍚�';
-comment on column sys_oss.url is 'URL鍦板潃';
-comment on column sys_oss.create_by is '涓婁紶浜�';
-comment on column sys_oss.create_dept  is '鍒涘缓閮ㄩ棬';
-comment on column sys_oss.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_oss.update_by is '鏇存柊鑰�';
-comment on column sys_oss.update_time is '鏇存柊鏃堕棿';
-comment on column sys_oss.service is '鏈嶅姟鍟�';
+comment on table sys_oss                    is 'OSS瀵硅薄瀛樺偍琛�';
+comment on column sys_oss.oss_id            is '瀵硅薄瀛樺偍涓婚敭';
+comment on column sys_oss.tenant_id         is '绉熸埛缂栫爜';
+comment on column sys_oss.file_name         is '鏂囦欢鍚�';
+comment on column sys_oss.original_name     is '鍘熷悕';
+comment on column sys_oss.file_suffix       is '鏂囦欢鍚庣紑鍚�';
+comment on column sys_oss.url               is 'URL鍦板潃';
+comment on column sys_oss.create_by         is '涓婁紶浜�';
+comment on column sys_oss.create_dept       is '鍒涘缓閮ㄩ棬';
+comment on column sys_oss.create_time       is '鍒涘缓鏃堕棿';
+comment on column sys_oss.update_by         is '鏇存柊鑰�';
+comment on column sys_oss.update_time       is '鏇存柊鏃堕棿';
+comment on column sys_oss.service           is '鏈嶅姟鍟�';
 
 -- ----------------------------
 -- OSS瀵硅薄瀛樺偍鍔ㄦ�侀厤缃〃
@@ -937,6 +1070,7 @@
 create table if not exists sys_oss_config
 (
     oss_config_id int8,
+    tenant_id     varchar(20)  not null,
     config_key    varchar(20)  default ''::varchar not null,
     access_key    varchar(255) default ''::varchar,
     secret_key    varchar(255) default ''::varchar,
@@ -958,32 +1092,33 @@
     constraint sys_oss_config_pk primary key (oss_config_id)
 );
 
-comment on table sys_oss_config is '瀵硅薄瀛樺偍閰嶇疆琛�';
-comment on column sys_oss_config.oss_config_id is '涓诲缓';
-comment on column sys_oss_config.config_key is '閰嶇疆key';
-comment on column sys_oss_config.access_key is 'accessKey';
-comment on column sys_oss_config.secret_key is '绉橀挜';
-comment on column sys_oss_config.bucket_name is '妗跺悕绉�';
-comment on column sys_oss_config.prefix is '鍓嶇紑';
-comment on column sys_oss_config.endpoint is '璁块棶绔欑偣';
-comment on column sys_oss_config.domain is '鑷畾涔夊煙鍚�';
-comment on column sys_oss_config.is_https is '鏄惁https锛圷=鏄�,N=鍚︼級';
-comment on column sys_oss_config.region is '鍩�';
-comment on column sys_oss_config.access_policy is '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)';
-comment on column sys_oss_config.status is '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�';
-comment on column sys_oss_config.ext1 is '鎵╁睍瀛楁';
-comment on column sys_oss_config.create_dept is '鍒涘缓閮ㄩ棬';
-comment on column sys_oss_config.create_by is '鍒涘缓鑰�';
-comment on column sys_oss_config.create_time is '鍒涘缓鏃堕棿';
-comment on column sys_oss_config.update_by is '鏇存柊鑰�';
-comment on column sys_oss_config.update_time is '鏇存柊鏃堕棿';
-comment on column sys_oss_config.remark is '澶囨敞';
+comment on table sys_oss_config                 is '瀵硅薄瀛樺偍閰嶇疆琛�';
+comment on column sys_oss_config.oss_config_id  is '涓诲缓';
+comment on column sys_oss_config.tenant_id      is '绉熸埛缂栫爜';
+comment on column sys_oss_config.config_key     is '閰嶇疆key';
+comment on column sys_oss_config.access_key     is 'accessKey';
+comment on column sys_oss_config.secret_key     is '绉橀挜';
+comment on column sys_oss_config.bucket_name    is '妗跺悕绉�';
+comment on column sys_oss_config.prefix         is '鍓嶇紑';
+comment on column sys_oss_config.endpoint       is '璁块棶绔欑偣';
+comment on column sys_oss_config.domain         is '鑷畾涔夊煙鍚�';
+comment on column sys_oss_config.is_https       is '鏄惁https锛圷=鏄�,N=鍚︼級';
+comment on column sys_oss_config.region         is '鍩�';
+comment on column sys_oss_config.access_policy  is '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)';
+comment on column sys_oss_config.status         is '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�';
+comment on column sys_oss_config.ext1           is '鎵╁睍瀛楁';
+comment on column sys_oss_config.create_dept    is '鍒涘缓閮ㄩ棬';
+comment on column sys_oss_config.create_by      is '鍒涘缓鑰�';
+comment on column sys_oss_config.create_time    is '鍒涘缓鏃堕棿';
+comment on column sys_oss_config.update_by      is '鏇存柊鑰�';
+comment on column sys_oss_config.update_time    is '鏇存柊鏃堕棿';
+comment on column sys_oss_config.remark         is '澶囨敞';
 
-insert into sys_oss_config values (1, 'minio',  'ruoyi',            'ruoyi123',        'ruoyi',             '', '127.0.0.1:9000',                      '','N', '',            '1', '0', '', 103, 1, now(), 1, now(), null);
-insert into sys_oss_config values (2, 'qiniu',  'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 's3-cn-north-1.qiniucs.com',           '','N', '',            '1', '1', '', 103, 1, now(), 1, now(), null);
-insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 'oss-cn-beijing.aliyuncs.com',         '','N', '',            '1', '1', '', 103, 1, now(), 1, now(), null);
-insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',         '','N', 'ap-beijing',  '1', '1', '', 103, 1, now(), 1, now(), null);
-insert into sys_oss_config values (5, 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',                 '','N', '',            '1', '1', '', 103, 1, now(), 1, now(), NULL);
+insert into sys_oss_config values (1, '000000', 'minio',  'ruoyi',            'ruoyi123',        'ruoyi',             '', '127.0.0.1:9000',                      '','N', '',            '1', '0', '', 103, 1, now(), 1, now(), null);
+insert into sys_oss_config values (2, '000000', 'qiniu',  'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 's3-cn-north-1.qiniucs.com',           '','N', '',            '1', '1', '', 103, 1, now(), 1, now(), null);
+insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 'oss-cn-beijing.aliyuncs.com',         '','N', '',            '1', '1', '', 103, 1, now(), 1, now(), null);
+insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',         '','N', 'ap-beijing',  '1', '1', '', 103, 1, now(), 1, now(), null);
+insert into sys_oss_config values (5, '000000', 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',                 '','N', '',            '1', '1', '', 103, 1, now(), 1, now(), NULL);
 
 -- 瀛楃涓茶嚜鍔ㄨ浆鏃堕棿 閬垮厤妗嗘灦鏃堕棿鏌ヨ鎶ラ敊闂
 create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$
diff --git a/script/sql/postgres/postgres_test.sql b/script/sql/postgres/postgres_test.sql
index 55fabe0..56344c6 100644
--- a/script/sql/postgres/postgres_test.sql
+++ b/script/sql/postgres/postgres_test.sql
@@ -62,8 +62,8 @@
 comment on column test_tree.update_by is '鏇存柊浜�';
 comment on column test_tree.del_flag is '鍒犻櫎鏍囧織';
 
-INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, 108, 'test', '鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', 'sys_user', '', '', '0', '', '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', now(), 103, 1, now(), 3, now(), NULL);
-INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, 102, 'test1', '浠呮湰浜� 瀵嗙爜666666', 'sys_user', '', '', '0', '', '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', now(), 103, 1, now(), 4, now(), NULL);
+INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, 108, 'test', '鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', now(), 103, 1, now(), 3, now(), NULL);
+INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, 102, 'test1', '浠呮湰浜� 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', now(), 103, 1, now(), 4, now(), NULL);
 
 INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (5, '娴嬭瘯鑿滃崟', 0, 5, 'demo', NULL, 1, 0, 'M', '0', '0', NULL, 'star', 103, 1, now(), NULL, NULL, '');
 
diff --git a/script/sql/ry_vue_5.X.sql b/script/sql/ry_vue_5.X.sql
index 608b1dc..da10377 100644
--- a/script/sql/ry_vue_5.X.sql
+++ b/script/sql/ry_vue_5.X.sql
@@ -1,9 +1,68 @@
 -- ----------------------------
+-- 绉熸埛琛�
+-- ----------------------------
+drop table if exists sys_tenant;
+create table sys_tenant
+(
+    id                bigint(20)    not null        comment 'id',
+    tenant_id         varchar(20)   not null        comment '绉熸埛缂栧彿',
+    contact_user_name varchar(20)                   comment '鑱旂郴浜�',
+    contact_phone     varchar(20)                   comment '鑱旂郴鐢佃瘽',
+    company_name      varchar(50)                   comment '浼佷笟鍚嶇О',
+    license_number    varchar(30)                   comment '缁熶竴绀句細淇$敤浠g爜',
+    address           varchar(200)                  comment '鍦板潃',
+    intro             varchar(200)                  comment '浼佷笟绠�浠�',
+    domain            varchar(200)                  comment '鍩熷悕',
+    remark            varchar(200)                  comment '澶囨敞',
+    package_id        bigint(20)                    comment '绉熸埛濂楅缂栧彿',
+    expire_time       datetime                      comment '杩囨湡鏃堕棿',
+    account_count     int           default -1      comment '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級',
+    status            char(1)       default '0'     comment '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+    del_flag          char(1)       default '0'     comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+    create_dept       bigint(20)                    comment '鍒涘缓閮ㄩ棬',
+    create_by         bigint(20)                    comment '鍒涘缓鑰�',
+    create_time       datetime                      comment '鍒涘缓鏃堕棿',
+    update_by         bigint(20)                    comment '鏇存柊鑰�',
+    update_time       datetime                      comment '鏇存柊鏃堕棿',
+    primary key (id)
+) engine=innodb comment = '绉熸埛琛�';
+
+
+-- ----------------------------
+-- 鍒濆鍖�-绉熸埛琛ㄦ暟鎹�
+-- ----------------------------
+
+insert into sys_tenant values(1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', NULL, NULL, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', NULL, NULL, NULL, NULL, -1, '0', '0', 103, 1, sysdate(), NULL, NULL);
+
+
+-- ----------------------------
+-- 绉熸埛濂楅琛�
+-- ----------------------------
+drop table if exists sys_tenant_package;
+create table sys_tenant_package (
+    package_id              bigint(20)     not null    comment '绉熸埛濂楅id',
+    package_name            varchar(20)                comment '濂楅鍚嶇О',
+    menu_ids                varchar(3000)              comment '鍏宠仈鑿滃崟id',
+    remark                  varchar(200)               comment '澶囨敞',
+    menu_check_strictly     tinyint(1)     default 1   comment '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�',
+    status                  char(1)        default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+    del_flag                char(1)        default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+    create_dept             bigint(20)                 comment '鍒涘缓閮ㄩ棬',
+    create_by               bigint(20)                 comment '鍒涘缓鑰�',
+    create_time             datetime                   comment '鍒涘缓鏃堕棿',
+    update_by               bigint(20)                 comment '鏇存柊鑰�',
+    update_time             datetime                   comment '鏇存柊鏃堕棿',
+    primary key (package_id)
+) engine=innodb comment = '绉熸埛濂楅琛�';
+
+
+-- ----------------------------
 -- 1銆侀儴闂ㄨ〃
 -- ----------------------------
 drop table if exists sys_dept;
 create table sys_dept (
   dept_id           bigint(20)      not null                   comment '閮ㄩ棬id',
+  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
   parent_id         bigint(20)      default 0                  comment '鐖堕儴闂╥d',
   ancestors         varchar(500)    default ''                 comment '绁栫骇鍒楄〃',
   dept_name         varchar(30)     default ''                 comment '閮ㄩ棬鍚嶇О',
@@ -26,16 +85,16 @@
 -- ----------------------------
 
 
-insert into sys_dept values(100,  0,   '0',          '鑻ヤ緷绉戞妧',   0, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(101,  100, '0,100',      '娣卞湷鎬诲叕鍙�', 1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(102,  100, '0,100',      '闀挎矙鍒嗗叕鍙�', 2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(103,  101, '0,100,101',  '鐮斿彂閮ㄩ棬',   1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(104,  101, '0,100,101',  '甯傚満閮ㄩ棬',   2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(105,  101, '0,100,101',  '娴嬭瘯閮ㄩ棬',   3, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(106,  101, '0,100,101',  '璐㈠姟閮ㄩ棬',   4, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(107,  101, '0,100,101',  '杩愮淮閮ㄩ棬',   5, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(108,  102, '0,100,102',  '甯傚満閮ㄩ棬',   1, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
-insert into sys_dept values(109,  102, '0,100,102',  '璐㈠姟閮ㄩ棬',   2, '鑻ヤ緷', '15888888888', 'ry@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(100, '000000', 0,   '0',          'XXX绉戞妧',   0, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(101, '000000', 100, '0,100',      '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(102, '000000', 100, '0,100',      '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(103, '000000', 101, '0,100,101',  '鐮斿彂閮ㄩ棬',   1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(104, '000000', 101, '0,100,101',  '甯傚満閮ㄩ棬',   2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(105, '000000', 101, '0,100,101',  '娴嬭瘯閮ㄩ棬',   3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(106, '000000', 101, '0,100,101',  '璐㈠姟閮ㄩ棬',   4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(107, '000000', 101, '0,100,101',  '杩愮淮閮ㄩ棬',   5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(108, '000000', 102, '0,100,102',  '甯傚満閮ㄩ棬',   1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
+insert into sys_dept values(109, '000000', 102, '0,100,102',  '璐㈠姟閮ㄩ棬',   2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
 
 
 -- ----------------------------
@@ -43,7 +102,8 @@
 -- ----------------------------
 drop table if exists sys_user;
 create table sys_user (
-  user_id           bigint(20)      not null     comment '鐢ㄦ埛ID',
+  user_id           bigint(20)      not null                   comment '鐢ㄦ埛ID',
+  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
   dept_id           bigint(20)      default null               comment '閮ㄩ棬ID',
   user_name         varchar(30)     not null                   comment '鐢ㄦ埛璐﹀彿',
   nick_name         varchar(30)     not null                   comment '鐢ㄦ埛鏄电О',
@@ -69,8 +129,8 @@
 -- ----------------------------
 -- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_user values(1,  103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '绠$悊鍛�');
-insert into sys_user values(2,  105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com',  '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '娴嬭瘯鍛�');
+insert into sys_user values(1, '000000', 103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '绠$悊鍛�');
+insert into sys_user values(2, '000000', 105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com',  '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '娴嬭瘯鍛�');
 
 
 -- ----------------------------
@@ -80,6 +140,7 @@
 create table sys_post
 (
   post_id       bigint(20)      not null                   comment '宀椾綅ID',
+  tenant_id     varchar(20)     not null                   comment '绉熸埛缂栧彿',
   post_code     varchar(64)     not null                   comment '宀椾綅缂栫爜',
   post_name     varchar(50)     not null                   comment '宀椾綅鍚嶇О',
   post_sort     int(4)          not null                   comment '鏄剧ず椤哄簭',
@@ -96,10 +157,10 @@
 -- ----------------------------
 -- 鍒濆鍖�-宀椾綅淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_post values(1, 'ceo',  '钁d簨闀�',    1, '0', 103, 1, sysdate(), null, null, '');
-insert into sys_post values(2, 'se',   '椤圭洰缁忕悊',  2, '0', 103, 1, sysdate(), null, null, '');
-insert into sys_post values(3, 'hr',   '浜哄姏璧勬簮',  3, '0', 103, 1, sysdate(), null, null, '');
-insert into sys_post values(4, 'user', '鏅�氬憳宸�',  4, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post values(1, '000000', 'ceo',  '钁d簨闀�',    1, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post values(2, '000000', 'se',   '椤圭洰缁忕悊',  2, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post values(3, '000000', 'hr',   '浜哄姏璧勬簮',  3, '0', 103, 1, sysdate(), null, null, '');
+insert into sys_post values(4, '000000', 'user', '鏅�氬憳宸�',  4, '0', 103, 1, sysdate(), null, null, '');
 
 
 -- ----------------------------
@@ -108,6 +169,7 @@
 drop table if exists sys_role;
 create table sys_role (
   role_id              bigint(20)      not null                   comment '瑙掕壊ID',
+  tenant_id            varchar(20)     not null                   comment '绉熸埛缂栧彿',
   role_name            varchar(30)     not null                   comment '瑙掕壊鍚嶇О',
   role_key             varchar(100)    not null                   comment '瑙掕壊鏉冮檺瀛楃涓�',
   role_sort            int(4)          not null                   comment '鏄剧ず椤哄簭',
@@ -128,8 +190,8 @@
 -- ----------------------------
 -- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_role values('1', '瓒呯骇绠$悊鍛�',  'admin',  1, 1, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '瓒呯骇绠$悊鍛�');
-insert into sys_role values('2', '鏅�氳鑹�',    'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '鏅�氳鑹�');
+insert into sys_role values(1, '000000', '瓒呯骇绠$悊鍛�',  'superadmin',  1, 1, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '瓒呯骇绠$悊鍛�');
+insert into sys_role values(2, '000000', '鏅�氳鑹�',    'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '鏅�氳鑹�');
 
 
 -- ----------------------------
@@ -165,30 +227,33 @@
 -- ----------------------------
 -- 涓�绾ц彍鍗�
 insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system',           null, '', 1, 0, 'M', '0', '0', '', 'system',   103, 1, sysdate(), null, null, '绯荤粺绠$悊鐩綍');
-insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '2', 'monitor',          null, '', 1, 0, 'M', '0', '0', '', 'monitor',  103, 1, sysdate(), null, null, '绯荤粺鐩戞帶鐩綍');
-insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '3', 'tool',             null, '', 1, 0, 'M', '0', '0', '', 'tool',     103, 1, sysdate(), null, null, '绯荤粺宸ュ叿鐩綍');
-insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '4', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide',    103, 1, sysdate(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
+insert into sys_menu values('6', '绉熸埛绠$悊', '0', '2', 'tenant',           null, '', 1, 0, 'M', '0', '0', '', 'chart',    103, 1, sysdate(), null, null, '绉熸埛绠$悊鐩綍');
+insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '3', 'monitor',          null, '', 1, 0, 'M', '0', '0', '', 'monitor',  103, 1, sysdate(), null, null, '绯荤粺鐩戞帶鐩綍');
+insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '4', 'tool',             null, '', 1, 0, 'M', '0', '0', '', 'tool',     103, 1, sysdate(), null, null, '绯荤粺宸ュ叿鐩綍');
+insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/JavaLionLi/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide',    103, 1, sysdate(), null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃');
 -- 浜岀骇鑿滃崟
-insert into sys_menu values('100',  '鐢ㄦ埛绠$悊', '1',   '1', 'user',       'system/user/index',        '', 1, 0, 'C', '0', '0', 'system:user:list',        'user',          103, 1, sysdate(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
-insert into sys_menu values('101',  '瑙掕壊绠$悊', '1',   '2', 'role',       'system/role/index',        '', 1, 0, 'C', '0', '0', 'system:role:list',        'peoples',       103, 1, sysdate(), null, null, '瑙掕壊绠$悊鑿滃崟');
-insert into sys_menu values('102',  '鑿滃崟绠$悊', '1',   '3', 'menu',       'system/menu/index',        '', 1, 0, 'C', '0', '0', 'system:menu:list',        'tree-table',    103, 1, sysdate(), null, null, '鑿滃崟绠$悊鑿滃崟');
-insert into sys_menu values('103',  '閮ㄩ棬绠$悊', '1',   '4', 'dept',       'system/dept/index',        '', 1, 0, 'C', '0', '0', 'system:dept:list',        'tree',          103, 1, sysdate(), null, null, '閮ㄩ棬绠$悊鑿滃崟');
-insert into sys_menu values('104',  '宀椾綅绠$悊', '1',   '5', 'post',       'system/post/index',        '', 1, 0, 'C', '0', '0', 'system:post:list',        'post',          103, 1, sysdate(), null, null, '宀椾綅绠$悊鑿滃崟');
-insert into sys_menu values('105',  '瀛楀吀绠$悊', '1',   '6', 'dict',       'system/dict/index',        '', 1, 0, 'C', '0', '0', 'system:dict:list',        'dict',          103, 1, sysdate(), null, null, '瀛楀吀绠$悊鑿滃崟');
-insert into sys_menu values('106',  '鍙傛暟璁剧疆', '1',   '7', 'config',     'system/config/index',      '', 1, 0, 'C', '0', '0', 'system:config:list',      'edit',          103, 1, sysdate(), null, null, '鍙傛暟璁剧疆鑿滃崟');
-insert into sys_menu values('107',  '閫氱煡鍏憡', '1',   '8', 'notice',     'system/notice/index',      '', 1, 0, 'C', '0', '0', 'system:notice:list',      'message',       103, 1, sysdate(), null, null, '閫氱煡鍏憡鑿滃崟');
-insert into sys_menu values('108',  '鏃ュ織绠$悊', '1',   '9', 'log',        '',                         '', 1, 0, 'M', '0', '0', '',                        'log',           103, 1, sysdate(), null, null, '鏃ュ織绠$悊鑿滃崟');
-insert into sys_menu values('109',  '鍦ㄧ嚎鐢ㄦ埛', '2',   '1', 'online',     'monitor/online/index',     '', 1, 0, 'C', '0', '0', 'monitor:online:list',     'online',        103, 1, sysdate(), null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
-insert into sys_menu values('112',  '缂撳瓨鍒楄〃', '2',   '6', 'cacheList',  'monitor/cache/list',       '', 1, 0, 'C', '0', '0', 'monitor:cache:list',      'redis-list',    103, 1, sysdate(), null, null, '缂撳瓨鍒楄〃鑿滃崟');
-insert into sys_menu values('113',  '缂撳瓨鐩戞帶', '2',   '5', 'cache',      'monitor/cache/index',      '', 1, 0, 'C', '0', '0', 'monitor:cache:list',      'redis',         103, 1, sysdate(), null, null, '缂撳瓨鐩戞帶鑿滃崟');
-insert into sys_menu values('114',  '琛ㄥ崟鏋勫缓', '3',   '1', 'build',      'tool/build/index',         '', 1, 0, 'C', '0', '0', 'tool:build:list',         'build',         103, 1, sysdate(), null, null, '琛ㄥ崟鏋勫缓鑿滃崟');
-insert into sys_menu values('115',  '浠g爜鐢熸垚', '3',   '2', 'gen',        'tool/gen/index',           '', 1, 0, 'C', '0', '0', 'tool:gen:list',           'code',          103, 1, sysdate(), null, null, '浠g爜鐢熸垚鑿滃崟');
+insert into sys_menu values('100',  '鐢ㄦ埛绠$悊',     '1',   '1', 'user',             'system/user/index',            '', 1, 0, 'C', '0', '0', 'system:user:list',            'user',          103, 1, sysdate(), null, null, '鐢ㄦ埛绠$悊鑿滃崟');
+insert into sys_menu values('101',  '瑙掕壊绠$悊',     '1',   '2', 'role',             'system/role/index',            '', 1, 0, 'C', '0', '0', 'system:role:list',            'peoples',       103, 1, sysdate(), null, null, '瑙掕壊绠$悊鑿滃崟');
+insert into sys_menu values('102',  '鑿滃崟绠$悊',     '1',   '3', 'menu',             'system/menu/index',            '', 1, 0, 'C', '0', '0', 'system:menu:list',            'tree-table',    103, 1, sysdate(), null, null, '鑿滃崟绠$悊鑿滃崟');
+insert into sys_menu values('103',  '閮ㄩ棬绠$悊',     '1',   '4', 'dept',             'system/dept/index',            '', 1, 0, 'C', '0', '0', 'system:dept:list',            'tree',          103, 1, sysdate(), null, null, '閮ㄩ棬绠$悊鑿滃崟');
+insert into sys_menu values('104',  '宀椾綅绠$悊',     '1',   '5', 'post',             'system/post/index',            '', 1, 0, 'C', '0', '0', 'system:post:list',            'post',          103, 1, sysdate(), null, null, '宀椾綅绠$悊鑿滃崟');
+insert into sys_menu values('105',  '瀛楀吀绠$悊',     '1',   '6', 'dict',             'system/dict/index',            '', 1, 0, 'C', '0', '0', 'system:dict:list',            'dict',          103, 1, sysdate(), null, null, '瀛楀吀绠$悊鑿滃崟');
+insert into sys_menu values('106',  '鍙傛暟璁剧疆',     '1',   '7', 'config',           'system/config/index',          '', 1, 0, 'C', '0', '0', 'system:config:list',          'edit',          103, 1, sysdate(), null, null, '鍙傛暟璁剧疆鑿滃崟');
+insert into sys_menu values('107',  '閫氱煡鍏憡',     '1',   '8', 'notice',           'system/notice/index',          '', 1, 0, 'C', '0', '0', 'system:notice:list',          'message',       103, 1, sysdate(), null, null, '閫氱煡鍏憡鑿滃崟');
+insert into sys_menu values('108',  '鏃ュ織绠$悊',     '1',   '9', 'log',              '',                             '', 1, 0, 'M', '0', '0', '',                            'log',           103, 1, sysdate(), null, null, '鏃ュ織绠$悊鑿滃崟');
+insert into sys_menu values('109',  '鍦ㄧ嚎鐢ㄦ埛',     '2',   '1', 'online',           'monitor/online/index',         '', 1, 0, 'C', '0', '0', 'monitor:online:list',         'online',        103, 1, sysdate(), null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟');
+insert into sys_menu values('113',  '缂撳瓨鐩戞帶',     '2',   '5', 'cache',            'monitor/cache/index',          '', 1, 0, 'C', '0', '0', 'monitor:cache:list',          'redis',         103, 1, sysdate(), null, null, '缂撳瓨鐩戞帶鑿滃崟');
+insert into sys_menu values('114',  '琛ㄥ崟鏋勫缓',     '3',   '1', 'build',            'tool/build/index',             '', 1, 0, 'C', '0', '0', 'tool:build:list',             'build',         103, 1, sysdate(), null, null, '琛ㄥ崟鏋勫缓鑿滃崟');
+insert into sys_menu values('115',  '浠g爜鐢熸垚',     '3',   '2', 'gen',              'tool/gen/index',               '', 1, 0, 'C', '0', '0', 'tool:gen:list',               'code',          103, 1, sysdate(), null, null, '浠g爜鐢熸垚鑿滃崟');
+insert into sys_menu values ('121', '绉熸埛绠$悊',     '6',   '1', 'tenant',           'system/tenant/index',          '', 1, 0, 'C', '0', '0', 'system:tenant:list',          'list',          103, 1, sysdate(), null, null, '绉熸埛绠$悊鑿滃崟');
+insert into sys_menu values ('122', '绉熸埛濂楅绠$悊',  '6',   '2', 'tenantPackage',    'system/tenantPackage/index',   '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list',   'form',          103, 1, sysdate(), null, null, '绉熸埛濂楅绠$悊鑿滃崟');
+
 -- springboot-admin鐩戞帶
-insert into sys_menu values('117',  'Admin鐩戞帶', '2',  '5', 1,      'monitor/admin/index',      '', 1, 0, 'C', '0', '0', 'monitor:admin:list',      'dashboard',     103, 1, sysdate(), null, null, 'Admin鐩戞帶鑿滃崟');
+insert into sys_menu values('117',  'Admin鐩戞帶',   '2',   '5',  'Admin',            'monitor/admin/index',         '', 1, 0, 'C', '0', '0', 'monitor:admin:list',           'dashboard',     103, 1, sysdate(), null, null, 'Admin鐩戞帶鑿滃崟');
 -- oss鑿滃崟
-insert into sys_menu values('118',  '鏂囦欢绠$悊', '1', '10', 'oss', 'system/oss/index', '', 1, 0, 'C', '0', '0', 'system:oss:list', 'upload', 103, 1, sysdate(), null, null, '鏂囦欢绠$悊鑿滃崟');
+insert into sys_menu values('118',  '鏂囦欢绠$悊',     '1',   '10', 'oss',              'system/oss/index',            '', 1, 0, 'C', '0', '0', 'system:oss:list',              'upload',        103, 1, sysdate(), null, null, '鏂囦欢绠$悊鑿滃崟');
 -- xxl-job-admin鎺у埗鍙�
-insert into sys_menu values('120',  '浠诲姟璋冨害涓績', '2',  '5', 'XxlJob',      'monitor/xxljob/index',      '', 1, 0, 'C', '0', '0', 'monitor:xxljob:list',      'job',     103, 1, sysdate(), null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�');
+insert into sys_menu values('120',  '浠诲姟璋冨害涓績',  '2',   '5',  'XxlJob',           'monitor/xxljob/index',        '', 1, 0, 'C', '0', '0', 'monitor:xxljob:list',          'job',           103, 1, sysdate(), null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�');
 
 -- 涓夌骇鑿滃崟
 insert into sys_menu values('500',  '鎿嶄綔鏃ュ織', '108', '1', 'operlog',    'monitor/operlog/index',    '', 1, 0, 'C', '0', '0', 'monitor:operlog:list',    'form',          103, 1, sysdate(), null, null, '鎿嶄綔鏃ュ織鑿滃崟');
@@ -267,6 +332,18 @@
 insert into sys_menu values('1603', '鏂囦欢鍒犻櫎', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove',       '#', 103, 1, sysdate(), null, null, '');
 insert into sys_menu values('1604', '閰嶇疆娣诲姞', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add',          '#', 103, 1, sysdate(), null, null, '');
 insert into sys_menu values('1605', '閰嶇疆缂栬緫', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit',         '#', 103, 1, sysdate(), null, null, '');
+-- 绉熸埛绠$悊鐩稿叧鎸夐挳
+insert into sys_menu values ('1606', '绉熸埛鏌ヨ', '121', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query',   '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1607', '绉熸埛鏂板', '121', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add',     '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1608', '绉熸埛淇敼', '121', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:edit',    '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1609', '绉熸埛鍒犻櫎', '121', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:remove',  '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1610', '绉熸埛瀵煎嚭', '121', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:export',  '#', 103, 1, sysdate(), null, null, '');
+-- 绉熸埛濂楅绠$悊鐩稿叧鎸夐挳
+insert into sys_menu values ('1611', '绉熸埛濂楅鏌ヨ', '122', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:query',   '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1612', '绉熸埛濂楅鏂板', '122', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:add',     '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1613', '绉熸埛濂楅淇敼', '122', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit',    '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1614', '绉熸埛濂楅鍒犻櫎', '122', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove',  '#', 103, 1, sysdate(), null, null, '');
+insert into sys_menu values ('1615', '绉熸埛濂楅瀵煎嚭', '122', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export',  '#', 103, 1, sysdate(), null, null, '');
 
 
 -- ----------------------------
@@ -421,6 +498,7 @@
 drop table if exists sys_oper_log;
 create table sys_oper_log (
   oper_id           bigint(20)      not null                   comment '鏃ュ織涓婚敭',
+  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
   title             varchar(50)     default ''                 comment '妯″潡鏍囬',
   business_type     int(2)          default 0                  comment '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�',
   method            varchar(100)    default ''                 comment '鏂规硶鍚嶇О',
@@ -447,6 +525,7 @@
 create table sys_dict_type
 (
   dict_id          bigint(20)      not null                   comment '瀛楀吀涓婚敭',
+  tenant_id        varchar(20)     not null                   comment '绉熸埛缂栧彿',
   dict_name        varchar(100)    default ''                 comment '瀛楀吀鍚嶇О',
   dict_type        varchar(100)    default ''                 comment '瀛楀吀绫诲瀷',
   status           char(1)         default '0'                comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
@@ -457,17 +536,17 @@
   update_time      datetime                                   comment '鏇存柊鏃堕棿',
   remark           varchar(500)    default null               comment '澶囨敞',
   primary key (dict_id),
-  unique (dict_type)
+  unique (tenant_id, dict_type)
 ) engine=innodb comment = '瀛楀吀绫诲瀷琛�';
 
-insert into sys_dict_type values(1,  '鐢ㄦ埛鎬у埆', 'sys_user_sex',        '0', 103, 1, sysdate(), null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
-insert into sys_dict_type values(2,  '鑿滃崟鐘舵��', 'sys_show_hide',       '0', 103, 1, sysdate(), null, null, '鑿滃崟鐘舵�佸垪琛�');
-insert into sys_dict_type values(3,  '绯荤粺寮�鍏�', 'sys_normal_disable',  '0', 103, 1, sysdate(), null, null, '绯荤粺寮�鍏冲垪琛�');
-insert into sys_dict_type values(6,  '绯荤粺鏄惁', 'sys_yes_no',          '0', 103, 1, sysdate(), null, null, '绯荤粺鏄惁鍒楄〃');
-insert into sys_dict_type values(7,  '閫氱煡绫诲瀷', 'sys_notice_type',     '0', 103, 1, sysdate(), null, null, '閫氱煡绫诲瀷鍒楄〃');
-insert into sys_dict_type values(8,  '閫氱煡鐘舵��', 'sys_notice_status',   '0', 103, 1, sysdate(), null, null, '閫氱煡鐘舵�佸垪琛�');
-insert into sys_dict_type values(9,  '鎿嶄綔绫诲瀷', 'sys_oper_type',       '0', 103, 1, sysdate(), null, null, '鎿嶄綔绫诲瀷鍒楄〃');
-insert into sys_dict_type values(10, '绯荤粺鐘舵��', 'sys_common_status',   '0', 103, 1, sysdate(), null, null, '鐧诲綍鐘舵�佸垪琛�');
+insert into sys_dict_type values(1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex',        '0', 103, 1, sysdate(), null, null, '鐢ㄦ埛鎬у埆鍒楄〃');
+insert into sys_dict_type values(2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide',       '0', 103, 1, sysdate(), null, null, '鑿滃崟鐘舵�佸垪琛�');
+insert into sys_dict_type values(3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable',  '0', 103, 1, sysdate(), null, null, '绯荤粺寮�鍏冲垪琛�');
+insert into sys_dict_type values(6, '000000', '绯荤粺鏄惁', 'sys_yes_no',          '0', 103, 1, sysdate(), null, null, '绯荤粺鏄惁鍒楄〃');
+insert into sys_dict_type values(7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type',     '0', 103, 1, sysdate(), null, null, '閫氱煡绫诲瀷鍒楄〃');
+insert into sys_dict_type values(8, '000000', '閫氱煡鐘舵��', 'sys_notice_status',   '0', 103, 1, sysdate(), null, null, '閫氱煡鐘舵�佸垪琛�');
+insert into sys_dict_type values(9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type',       '0', 103, 1, sysdate(), null, null, '鎿嶄綔绫诲瀷鍒楄〃');
+insert into sys_dict_type values(10, '000000', '绯荤粺鐘舵��', 'sys_common_status',   '0', 103, 1, sysdate(), null, null, '鐧诲綍鐘舵�佸垪琛�');
 
 
 -- ----------------------------
@@ -477,6 +556,7 @@
 create table sys_dict_data
 (
   dict_code        bigint(20)      not null                   comment '瀛楀吀缂栫爜',
+  tenant_id        varchar(20)     not null                   comment '绉熸埛缂栧彿',
   dict_sort        int(4)          default 0                  comment '瀛楀吀鎺掑簭',
   dict_label       varchar(100)    default ''                 comment '瀛楀吀鏍囩',
   dict_value       varchar(100)    default ''                 comment '瀛楀吀閿��',
@@ -494,31 +574,31 @@
   primary key (dict_code)
 ) engine=innodb comment = '瀛楀吀鏁版嵁琛�';
 
-insert into sys_dict_data values(1,  1,  '鐢�',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 103, 1, sysdate(), null, null, '鎬у埆鐢�');
-insert into sys_dict_data values(2,  2,  '濂�',       '1',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate(), null, null, '鎬у埆濂�');
-insert into sys_dict_data values(3,  3,  '鏈煡',     '2',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate(), null, null, '鎬у埆鏈煡');
-insert into sys_dict_data values(4,  1,  '鏄剧ず',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '鏄剧ず鑿滃崟');
-insert into sys_dict_data values(5,  2,  '闅愯棌',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '闅愯棌鑿滃崟');
-insert into sys_dict_data values(6,  1,  '姝e父',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(7,  2,  '鍋滅敤',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍋滅敤鐘舵��');
-insert into sys_dict_data values(12, 1,  '鏄�',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鏄�');
-insert into sys_dict_data values(13, 2,  '鍚�',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鍚�');
-insert into sys_dict_data values(14, 1,  '閫氱煡',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 103, 1, sysdate(), null, null, '閫氱煡');
-insert into sys_dict_data values(15, 2,  '鍏憡',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 103, 1, sysdate(), null, null, '鍏憡');
-insert into sys_dict_data values(16, 1,  '姝e父',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(17, 2,  '鍏抽棴',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍏抽棴鐘舵��');
-insert into sys_dict_data values(29, 99, '鍏朵粬',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate(), null, null, '鍏朵粬鎿嶄綔');
-insert into sys_dict_data values(18, 1,  '鏂板',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate(), null, null, '鏂板鎿嶄綔');
-insert into sys_dict_data values(19, 2,  '淇敼',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate(), null, null, '淇敼鎿嶄綔');
-insert into sys_dict_data values(20, 3,  '鍒犻櫎',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍒犻櫎鎿嶄綔');
-insert into sys_dict_data values(21, 4,  '鎺堟潈',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 103, 1, sysdate(), null, null, '鎺堟潈鎿嶄綔');
-insert into sys_dict_data values(22, 5,  '瀵煎嚭',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate(), null, null, '瀵煎嚭鎿嶄綔');
-insert into sys_dict_data values(23, 6,  '瀵煎叆',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate(), null, null, '瀵煎叆鎿嶄綔');
-insert into sys_dict_data values(24, 7,  '寮洪��',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '寮洪��鎿嶄綔');
-insert into sys_dict_data values(25, 8,  '鐢熸垚浠g爜', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate(), null, null, '鐢熸垚鎿嶄綔');
-insert into sys_dict_data values(26, 9,  '娓呯┖鏁版嵁', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '娓呯┖鎿嶄綔');
-insert into sys_dict_data values(27, 1,  '鎴愬姛',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
-insert into sys_dict_data values(28, 2,  '澶辫触',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data values(1, '000000', 1,  '鐢�',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 103, 1, sysdate(), null, null, '鎬у埆鐢�');
+insert into sys_dict_data values(2, '000000', 2,  '濂�',       '1',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate(), null, null, '鎬у埆濂�');
+insert into sys_dict_data values(3, '000000', 3,  '鏈煡',     '2',       'sys_user_sex',        '',   '',        'N', '0', 103, 1, sysdate(), null, null, '鎬у埆鏈煡');
+insert into sys_dict_data values(4, '000000', 1,  '鏄剧ず',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '鏄剧ず鑿滃崟');
+insert into sys_dict_data values(5, '000000', 2,  '闅愯棌',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '闅愯棌鑿滃崟');
+insert into sys_dict_data values(6, '000000', 1,  '姝e父',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(7, '000000', 2,  '鍋滅敤',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍋滅敤鐘舵��');
+insert into sys_dict_data values(12, '000000', 1,  '鏄�',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鏄�');
+insert into sys_dict_data values(13, '000000', 2,  '鍚�',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '绯荤粺榛樿鍚�');
+insert into sys_dict_data values(14, '000000', 1,  '閫氱煡',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 103, 1, sysdate(), null, null, '閫氱煡');
+insert into sys_dict_data values(15, '000000', 2,  '鍏憡',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 103, 1, sysdate(), null, null, '鍏憡');
+insert into sys_dict_data values(16, '000000', 1,  '姝e父',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(17, '000000', 2,  '鍏抽棴',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍏抽棴鐘舵��');
+insert into sys_dict_data values(29, '000000', 99, '鍏朵粬',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate(), null, null, '鍏朵粬鎿嶄綔');
+insert into sys_dict_data values(18, '000000', 1,  '鏂板',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate(), null, null, '鏂板鎿嶄綔');
+insert into sys_dict_data values(19, '000000', 2,  '淇敼',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 103, 1, sysdate(), null, null, '淇敼鎿嶄綔');
+insert into sys_dict_data values(20, '000000', 3,  '鍒犻櫎',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍒犻櫎鎿嶄綔');
+insert into sys_dict_data values(21, '000000', 4,  '鎺堟潈',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 103, 1, sysdate(), null, null, '鎺堟潈鎿嶄綔');
+insert into sys_dict_data values(22, '000000', 5,  '瀵煎嚭',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate(), null, null, '瀵煎嚭鎿嶄綔');
+insert into sys_dict_data values(23, '000000', 6,  '瀵煎叆',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate(), null, null, '瀵煎叆鎿嶄綔');
+insert into sys_dict_data values(24, '000000', 7,  '寮洪��',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '寮洪��鎿嶄綔');
+insert into sys_dict_data values(25, '000000', 8,  '鐢熸垚浠g爜', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 103, 1, sysdate(), null, null, '鐢熸垚鎿嶄綔');
+insert into sys_dict_data values(26, '000000', 9,  '娓呯┖鏁版嵁', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '娓呯┖鎿嶄綔');
+insert into sys_dict_data values(27, '000000', 1,  '鎴愬姛',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 103, 1, sysdate(), null, null, '姝e父鐘舵��');
+insert into sys_dict_data values(28, '000000', 2,  '澶辫触',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 103, 1, sysdate(), null, null, '鍋滅敤鐘舵��');
 
 
 -- ----------------------------
@@ -527,6 +607,7 @@
 drop table if exists sys_config;
 create table sys_config (
   config_id         bigint(20)      not null                   comment '鍙傛暟涓婚敭',
+  tenant_id         varchar(20)    not null                    comment '绉熸埛缂栧彿',
   config_name       varchar(100)    default ''                 comment '鍙傛暟鍚嶇О',
   config_key        varchar(100)    default ''                 comment '鍙傛暟閿悕',
   config_value      varchar(500)    default ''                 comment '鍙傛暟閿��',
@@ -540,12 +621,11 @@
   primary key (config_id)
 ) engine=innodb comment = '鍙傛暟閰嶇疆琛�';
 
-insert into sys_config values(1, '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',     'sys.index.skinName',            'skin-blue',     'Y', 103, 1, sysdate(), null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' );
-insert into sys_config values(2, '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',        'sys.user.initPassword',         '123456',        'Y', 103, 1, sysdate(), null, null, '鍒濆鍖栧瘑鐮� 123456' );
-insert into sys_config values(3, '涓绘鏋堕〉-渚ц竟鏍忎富棰�',          'sys.index.sideTheme',           'theme-dark',    'Y', 103, 1, sysdate(), null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' );
-insert into sys_config values(4, '璐﹀彿鑷姪-楠岃瘉鐮佸紑鍏�',          'sys.account.captchaEnabled',    'true',          'Y', 103, 1, sysdate(), null, null, '鏄惁寮�鍚獙璇佺爜鍔熻兘锛坱rue寮�鍚紝false鍏抽棴锛�');
-insert into sys_config values(5, '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�',  'sys.account.registerUser',      'false',         'Y', 103, 1, sysdate(), null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
-insert into sys_config values(11, 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',         'sys.oss.previewListResource',   'true',          'Y', 103, 1, sysdate(), null, null, 'true:寮�鍚�, false:鍏抽棴');
+insert into sys_config values(1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О',     'sys.index.skinName',            'skin-blue',     'Y', 103, 1, sysdate(), null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' );
+insert into sys_config values(2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜',        'sys.user.initPassword',         '123456',        'Y', 103, 1, sysdate(), null, null, '鍒濆鍖栧瘑鐮� 123456' );
+insert into sys_config values(3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�',          'sys.index.sideTheme',           'theme-dark',    'Y', 103, 1, sysdate(), null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' );
+insert into sys_config values(5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�',  'sys.account.registerUser',      'false',         'Y', 103, 1, sysdate(), null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�');
+insert into sys_config values(11, '000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�',         'sys.oss.previewListResource',   'true',          'Y', 103, 1, sysdate(), null, null, 'true:寮�鍚�, false:鍏抽棴');
 
 
 -- ----------------------------
@@ -554,6 +634,7 @@
 drop table if exists sys_logininfor;
 create table sys_logininfor (
   info_id        bigint(20)     not null                  comment '璁块棶ID',
+  tenant_id      varchar(20)    not null                  comment '绉熸埛缂栧彿',
   user_name      varchar(50)    default ''                comment '鐢ㄦ埛璐﹀彿',
   ipaddr         varchar(128)   default ''                comment '鐧诲綍IP鍦板潃',
   login_location varchar(255)   default ''                comment '鐧诲綍鍦扮偣',
@@ -572,6 +653,7 @@
 drop table if exists sys_notice;
 create table sys_notice (
   notice_id         bigint(20)      not null                   comment '鍏憡ID',
+  tenant_id         varchar(20)     not null                   comment '绉熸埛缂栧彿',
   notice_title      varchar(50)     not null                   comment '鍏憡鏍囬',
   notice_type       char(1)         not null                   comment '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�',
   notice_content    longblob        default null               comment '鍏憡鍐呭',
@@ -588,8 +670,8 @@
 -- ----------------------------
 -- 鍒濆鍖�-鍏憡淇℃伅琛ㄦ暟鎹�
 -- ----------------------------
-insert into sys_notice values('1', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, sysdate(), null, null, '绠$悊鍛�');
-insert into sys_notice values('2', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭',   '0', 103, 1, sysdate(), null, null, '绠$悊鍛�');
+insert into sys_notice values('1', '000000', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, sysdate(), null, null, '绠$悊鍛�');
+insert into sys_notice values('2', '000000', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭',   '0', 103, 1, sysdate(), null, null, '绠$悊鍛�');
 
 
 -- ----------------------------
@@ -659,6 +741,7 @@
 drop table if exists sys_oss;
 create table sys_oss (
   oss_id          bigint(20)   not null                   comment '瀵硅薄瀛樺偍涓婚敭',
+  tenant_id       varchar(20)  not null                   comment '绉熸埛缂栧彿',
   file_name       varchar(255) not null default ''        comment '鏂囦欢鍚�',
   original_name   varchar(255) not null default ''        comment '鍘熷悕',
   file_suffix     varchar(10)  not null default ''        comment '鏂囦欢鍚庣紑鍚�',
@@ -677,20 +760,21 @@
 -- ----------------------------
 drop table if exists sys_oss_config;
 create table sys_oss_config (
-  oss_config_id   bigint(20)   not null                   comment '涓诲缓',
-  config_key      varchar(20)  not null   default ''      comment '閰嶇疆key',
+  oss_config_id   bigint(20)    not null                  comment '涓诲缓',
+  tenant_id       varchar(20)   not null                  comment '绉熸埛缂栧彿',
+  config_key      varchar(20)   not null  default ''      comment '閰嶇疆key',
   access_key      varchar(255)            default ''      comment 'accessKey',
   secret_key      varchar(255)            default ''      comment '绉橀挜',
   bucket_name     varchar(255)            default ''      comment '妗跺悕绉�',
-  prefix           varchar(255)           default ''      comment '鍓嶇紑',
-  endpoint         varchar(255)           default ''      comment '璁块棶绔欑偣',
-  domain           varchar(255)           default ''      comment '鑷畾涔夊煙鍚�',
-  is_https         char(1)                default 'N'     comment '鏄惁https锛圷=鏄�,N=鍚︼級',
-  region           varchar(255)           default ''      comment '鍩�',
-  access_policy    char(1)     not null   default '1'     comment '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)',
-  status           char(1)                default '1'     comment '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�',
-  ext1             varchar(255)           default ''      comment '鎵╁睍瀛楁',
-  create_dept       bigint(20)            default null    comment '鍒涘缓閮ㄩ棬',
+  prefix          varchar(255)            default ''      comment '鍓嶇紑',
+  endpoint        varchar(255)            default ''      comment '璁块棶绔欑偣',
+  domain          varchar(255)            default ''      comment '鑷畾涔夊煙鍚�',
+  is_https        char(1)                 default 'N'     comment '鏄惁https锛圷=鏄�,N=鍚︼級',
+  region          varchar(255)            default ''      comment '鍩�',
+  access_policy   char(1)       not null  default '1'     comment '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)',
+  status          char(1)                 default '1'     comment '鐘舵�侊紙0=姝e父,1=鍋滅敤锛�',
+  ext1            varchar(255)            default ''      comment '鎵╁睍瀛楁',
+  create_dept     bigint(20)              default null    comment '鍒涘缓閮ㄩ棬',
   create_by       bigint(20)              default null    comment '鍒涘缓鑰�',
   create_time     datetime                default null    comment '鍒涘缓鏃堕棿',
   update_by       bigint(20)              default null    comment '鏇存柊鑰�',
@@ -699,8 +783,8 @@
   primary key (oss_config_id)
 ) engine=innodb comment='瀵硅薄瀛樺偍閰嶇疆琛�';
 
-insert into sys_oss_config values (1, 'minio',  'ruoyi',            'ruoyi123',        'ruoyi',             '', '127.0.0.1:9000',                '','N', '',             '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (2, 'qiniu',  'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 's3-cn-north-1.qiniucs.com',     '','N', '',             '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 'oss-cn-beijing.aliyuncs.com',   '','N', '',             '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',   '','N', 'ap-beijing',   '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
-insert into sys_oss_config values (5, 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',           '','N', '',             '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config values (1, '000000', 'minio',  'ruoyi',            'ruoyi123',        'ruoyi',             '', '127.0.0.1:9000',                '','N', '',             '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config values (2, '000000', 'qiniu',  'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 's3-cn-north-1.qiniucs.com',     '','N', '',             '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi',             '', 'oss-cn-beijing.aliyuncs.com',   '','N', '',             '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX',  'XXXXXXXXXXXXXXX', 'ruoyi-1250000000',  '', 'cos.ap-beijing.myqcloud.com',   '','N', 'ap-beijing',   '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
+insert into sys_oss_config values (5, '000000', 'image',  'ruoyi',            'ruoyi123',        'ruoyi',             'image', '127.0.0.1:9000',           '','N', '',             '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
diff --git a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql
index 212067d..86563d7 100644
--- a/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql
+++ b/script/sql/sqlserver/sqlserver_ry_vue_5.X.sql
@@ -1,28 +1,280 @@
-
-CREATE TABLE [gen_table]
+CREATE TABLE sys_tenant
 (
-    [table_id]          bigint                         NOT NULL,
-    [table_name]        nvarchar(200) DEFAULT ''       NULL,
-    [table_comment]     nvarchar(500) DEFAULT ''       NULL,
-    [sub_table_name]    nvarchar(64)                   NULL,
-    [sub_table_fk_name] nvarchar(64)                   NULL,
-    [class_name]        nvarchar(100) DEFAULT ''       NULL,
-    [tpl_category]      nvarchar(200) DEFAULT ('crud') NULL,
-    [package_name]      nvarchar(100)                  NULL,
-    [module_name]       nvarchar(30)                   NULL,
-    [business_name]     nvarchar(30)                   NULL,
-    [function_name]     nvarchar(50)                   NULL,
-    [function_author]   nvarchar(50)                   NULL,
-    [gen_type]          nchar(1)      DEFAULT ('0')    NULL,
-    [gen_path]          nvarchar(200) DEFAULT ('/')    NULL,
-    [options]           nvarchar(1000)                 NULL,
-    [create_dept]       bigint                         NULL,
-    [create_by]         bigint                         NULL,
-    [create_time]       datetime2(7)                   NULL,
-    [update_by]         bigint                         NULL,
-    [update_time]       datetime2(7)                   NULL,
-    [remark]            nvarchar(500)                  NULL,
-    CONSTRAINT [PK__gen_tabl__B21E8F2427725F8A] PRIMARY KEY CLUSTERED ([table_id])
+    id                    bigint                          NOT NULL,
+    tenant_id             nvarchar(20)                    NOT NULL,
+    contact_user_name     nvarchar(20)                    NULL,
+    contact_phone         nvarchar(20)                    NULL,
+    company_name          nvarchar(50)                    NULL,
+    license_number        nvarchar(30)                    NULL,
+    address               nvarchar(200)                   NULL,
+    intro                 nvarchar(200)                   NULL,
+    domain                nvarchar(200)                   NULL,
+    remark                nvarchar(200)                   NULL,
+    package_id            bigint                          NULL,
+    expire_time           datetime2(7)                    NULL,
+    account_count         int             DEFAULT ((-1))  NULL,
+    status                nchar(1)        DEFAULT ('0')   NULL,
+    del_flag              nchar(1)        DEFAULT ('0')   NULL,
+    create_dept           bigint                          NULL,
+    create_by             bigint                          NULL,
+    create_time           datetime2(7)                    NULL,
+    update_by             bigint                          NULL,
+    update_time           datetime2(7)                    NULL,
+    CONSTRAINT PK__sys_tenant__B21E8F2427725F8A PRIMARY KEY CLUSTERED (id)
+        WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
+        ON [PRIMARY]
+)
+ON [PRIMARY]
+GO
+
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'id' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'tenant_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鑱旂郴浜�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'contact_user_name'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鑱旂郴鐢佃瘽' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'contact_phone'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'浼佷笟鍚嶇О' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'company_name'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'缁熶竴绀句細淇$敤浠g爜' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'license_number'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍦板潃' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'address'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'浼佷笟绠�浠�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'intro'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍩熷悕' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'domain'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'澶囨敞' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'remark'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛濂楅缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'package_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'杩囨湡鏃堕棿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'expire_time'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'account_count'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'status'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'del_flag'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒涘缓閮ㄩ棬' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'create_dept'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒涘缓鑰�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'create_by'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒涘缓鏃堕棿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'create_time'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鏇存柊鑰�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'update_by'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鏇存柊鏃堕棿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant',
+    'COLUMN', N'update_time'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛琛�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant'
+GO
+
+INSERT sys_tenant VALUES (1, N'000000', N'绠$悊缁�', N'15888888888', N'XXX鏈夐檺鍏徃', NULL, NULL, N'澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', NULL, NULL, NULL, NULL, -1, N'0', N'0', 103, 1, getdate(), NULL, NULL)
+GO
+
+
+CREATE TABLE sys_tenant_package
+(
+    package_id            bigint                          NOT NULL,
+    package_name          nvarchar(20)                    NOT NULL,
+    menu_ids              nvarchar(20)                    NULL,
+    remark                nvarchar(200)                   NULL,
+    menu_check_strictly   tinyint         DEFAULT ((1))   NULL,
+    status                nchar(1)        DEFAULT ('0')   NULL,
+    del_flag              nchar(1)        DEFAULT ('0')   NULL,
+    create_dept           bigint                          NULL,
+    create_by             bigint                          NULL,
+    create_time           datetime2(7)                    NULL,
+    update_by             bigint                          NULL,
+    update_time           datetime2(7)                    NULL,
+    CONSTRAINT PK__sys_tenant_package__B21E8F2427725F8A PRIMARY KEY CLUSTERED (package_id)
+        WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
+        ON [PRIMARY]
+)
+ON [PRIMARY]
+GO
+
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛濂楅id' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'package_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'濂楅鍚嶇О' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'package_name'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍏宠仈鑿滃崟id' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'menu_ids'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'澶囨敞' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'remark'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'status'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'del_flag'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒涘缓閮ㄩ棬' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'create_dept'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒涘缓鑰�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'create_by'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鍒涘缓鏃堕棿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'create_time'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鏇存柊鑰�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'update_by'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'鏇存柊鏃堕棿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package',
+    'COLUMN', N'update_time'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛濂楅琛�' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_tenant_package'
+GO
+
+
+CREATE TABLE gen_table
+(
+    table_id          bigint                         NOT NULL,
+    table_name        nvarchar(200) DEFAULT ''       NULL,
+    table_comment     nvarchar(500) DEFAULT ''       NULL,
+    sub_table_name    nvarchar(64)                   NULL,
+    sub_table_fk_name nvarchar(64)                   NULL,
+    class_name        nvarchar(100) DEFAULT ''       NULL,
+    tpl_category      nvarchar(200) DEFAULT ('crud') NULL,
+    package_name      nvarchar(100)                  NULL,
+    module_name       nvarchar(30)                   NULL,
+    business_name     nvarchar(30)                   NULL,
+    function_name     nvarchar(50)                   NULL,
+    function_author   nvarchar(50)                   NULL,
+    gen_type          nchar(1)      DEFAULT ('0')    NULL,
+    gen_path          nvarchar(200) DEFAULT ('/')    NULL,
+    options           nvarchar(1000)                 NULL,
+    create_dept       bigint                         NULL,
+    create_by         bigint                         NULL,
+    create_time       datetime2(7)                   NULL,
+    update_by         bigint                         NULL,
+    update_time       datetime2(7)                   NULL,
+    remark            nvarchar(500)                  NULL,
+    CONSTRAINT PK__gen_tabl__B21E8F2427725F8A PRIMARY KEY CLUSTERED (table_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -161,32 +413,32 @@
     'TABLE', N'gen_table'
 GO
 
-CREATE TABLE [gen_table_column]
+CREATE TABLE gen_table_column
 (
-    [column_id]      bigint                       NOT NULL,
-    [table_id]       bigint                       NULL,
-    [column_name]    nvarchar(200)                NULL,
-    [column_comment] nvarchar(500)                NULL,
-    [column_type]    nvarchar(100)                NULL,
-    [java_type]      nvarchar(500)                NULL,
-    [java_field]     nvarchar(200)                NULL,
-    [is_pk]          nchar(1)                     NULL,
-    [is_increment]   nchar(1)                     NULL,
-    [is_required]    nchar(1)                     NULL,
-    [is_insert]      nchar(1)                     NULL,
-    [is_edit]        nchar(1)                     NULL,
-    [is_list]        nchar(1)                     NULL,
-    [is_query]       nchar(1)                     NULL,
-    [query_type]     nvarchar(200) DEFAULT ('EQ') NULL,
-    [html_type]      nvarchar(200)                NULL,
-    [dict_type]      nvarchar(200) DEFAULT ''     NULL,
-    [sort]           int                          NULL,
-    [create_dept]    bigint                       NULL,
-    [create_by]      bigint                       NULL,
-    [create_time]    datetime2(7)                 NULL,
-    [update_by]      bigint                       NULL,
-    [update_time]    datetime2(7)                 NULL,
-    CONSTRAINT [PK__gen_tabl__E301851F2E68B4E8] PRIMARY KEY CLUSTERED ([column_id])
+    column_id      bigint                       NOT NULL,
+    table_id       bigint                       NULL,
+    column_name    nvarchar(200)                NULL,
+    column_comment nvarchar(500)                NULL,
+    column_type    nvarchar(100)                NULL,
+    java_type      nvarchar(500)                NULL,
+    java_field     nvarchar(200)                NULL,
+    is_pk          nchar(1)                     NULL,
+    is_increment   nchar(1)                     NULL,
+    is_required    nchar(1)                     NULL,
+    is_insert      nchar(1)                     NULL,
+    is_edit        nchar(1)                     NULL,
+    is_list        nchar(1)                     NULL,
+    is_query       nchar(1)                     NULL,
+    query_type     nvarchar(200) DEFAULT ('EQ') NULL,
+    html_type      nvarchar(200)                NULL,
+    dict_type      nvarchar(200) DEFAULT ''     NULL,
+    sort           int                          NULL,
+    create_dept    bigint                       NULL,
+    create_by      bigint                       NULL,
+    create_time    datetime2(7)                 NULL,
+    update_by      bigint                       NULL,
+    update_time    datetime2(7)                 NULL,
+    CONSTRAINT PK__gen_tabl__E301851F2E68B4E8 PRIMARY KEY CLUSTERED (column_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -337,20 +589,21 @@
     'TABLE', N'gen_table_column'
 GO
 
-CREATE TABLE [sys_config]
+CREATE TABLE sys_config
 (
-    [config_id]    bigint                      NOT NULL,
-    [config_name]  nvarchar(100) DEFAULT ''    NULL,
-    [config_key]   nvarchar(100) DEFAULT ''    NULL,
-    [config_value] nvarchar(500) DEFAULT ''    NULL,
-    [config_type]  nchar(1)      DEFAULT ('N') NULL,
-    [create_dept]  bigint                      NULL,
-    [create_by]    bigint                      NULL,
-    [create_time]  datetime2(7)                NULL,
-    [update_by]    bigint                      NULL,
-    [update_time]  datetime2(7)                NULL,
-    [remark]       nvarchar(500)               NULL,
-    CONSTRAINT [PK__sys_conf__4AD1BFF182643682] PRIMARY KEY CLUSTERED ([config_id])
+    config_id    bigint                      NOT NULL,
+    tenant_id    nvarchar(20)                NOT NULL,
+    config_name  nvarchar(100) DEFAULT ''    NULL,
+    config_key   nvarchar(100) DEFAULT ''    NULL,
+    config_value nvarchar(500) DEFAULT ''    NULL,
+    config_type  nchar(1)      DEFAULT ('N') NULL,
+    create_dept  bigint                      NULL,
+    create_by    bigint                      NULL,
+    create_time  datetime2(7)                NULL,
+    update_by    bigint                      NULL,
+    update_time  datetime2(7)                NULL,
+    remark       nvarchar(500)               NULL,
+    CONSTRAINT PK__sys_conf__4AD1BFF182643682 PRIMARY KEY CLUSTERED (config_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -362,6 +615,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_config',
     'COLUMN', N'config_id'
+GO
+EXEC sys.sp_addextendedproperty
+     'MS_Description', N'绉熸埛缂栧彿' ,
+     'SCHEMA', N'dbo',
+     'TABLE', N'sys_config',
+     'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'鍙傛暟鍚嶇О' ,
@@ -429,37 +688,36 @@
     'TABLE', N'sys_config'
 GO
 
-INSERT [sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О', N'sys.index.skinName', N'skin-blue', N'Y', 103, 1, getdate(), NULL, NULL, N'钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow')
+INSERT sys_config VALUES (1, N'000000', N'涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О', N'sys.index.skinName', N'skin-blue', N'Y', 103, 1, getdate(), NULL, NULL, N'钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow')
 GO
-INSERT [sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜', N'sys.user.initPassword', N'123456', N'Y', 103, 1, getdate(), NULL, NULL, N'鍒濆鍖栧瘑鐮� 123456')
+INSERT sys_config VALUES (2, N'000000', N'鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜', N'sys.user.initPassword', N'123456', N'Y', 103, 1, getdate(), NULL, NULL, N'鍒濆鍖栧瘑鐮� 123456')
 GO
-INSERT [sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, N'涓绘鏋堕〉-渚ц竟鏍忎富棰�', N'sys.index.sideTheme', N'theme-dark', N'Y', 103, 1, getdate(), NULL, NULL, N'娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light')
+INSERT sys_config VALUES (3, N'000000', N'涓绘鏋堕〉-渚ц竟鏍忎富棰�', N'sys.index.sideTheme', N'theme-dark', N'Y', 103, 1, getdate(), NULL, NULL, N'娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light')
 GO
-INSERT [sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, N'璐﹀彿鑷姪-楠岃瘉鐮佸紑鍏�', N'sys.account.captchaEnabled', N'true', N'Y', 103, 1, getdate(), NULL, NULL, N'鏄惁寮�鍚獙璇佺爜鍔熻兘锛坱rue寮�鍚紝false鍏抽棴锛�')
+INSERT sys_config VALUES (5, N'000000', N'璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�', N'sys.account.registerUser', N'false', N'Y', 103, 1, getdate(), NULL, NULL, N'鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�')
 GO
-INSERT [sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (5, N'璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�', N'sys.account.registerUser', N'false', N'Y', 103, 1, getdate(), NULL, NULL, N'鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�')
-GO
-INSERT [sys_config] ([config_id], [config_name], [config_key], [config_value], [config_type], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (11, N'OSS棰勮鍒楄〃璧勬簮寮�鍏�', N'sys.oss.previewListResource', N'true', N'Y', 103, 1, getdate(), NULL, NULL, N'true:寮�鍚�, false:鍏抽棴');
+INSERT sys_config VALUES (11, N'000000', N'OSS棰勮鍒楄〃璧勬簮寮�鍏�', N'sys.oss.previewListResource', N'true', N'Y', 103, 1, getdate(), NULL, NULL, N'true:寮�鍚�, false:鍏抽棴');
 GO
 
-CREATE TABLE [sys_dept]
+CREATE TABLE sys_dept
 (
-    [dept_id]     bigint                     NOT NULL,
-    [parent_id]   bigint       DEFAULT ((0)) NULL,
-    [ancestors]   nvarchar(500)DEFAULT ''    NULL,
-    [dept_name]   nvarchar(30) DEFAULT ''    NULL,
-    [order_num]   int          DEFAULT ((0)) NULL,
-    [leader]      nvarchar(20)               NULL,
-    [phone]       nvarchar(11)               NULL,
-    [email]       nvarchar(50)               NULL,
-    [status]      nchar(1)     DEFAULT ('0') NULL,
-    [del_flag]    nchar(1)     DEFAULT ('0') NULL,
-    [create_dept] bigint                     NULL,
-    [create_by]   bigint                     NULL,
-    [create_time] datetime2(7)               NULL,
-    [update_by]   bigint                     NULL,
-    [update_time] datetime2(7)               NULL,
-    CONSTRAINT [PK__sys_dept__DCA659747DE13804] PRIMARY KEY CLUSTERED ([dept_id])
+    dept_id     bigint                     NOT NULL,
+    tenant_id   nvarchar(20)               NOT NULL,
+    parent_id   bigint       DEFAULT ((0)) NULL,
+    ancestors   nvarchar(500)DEFAULT ''    NULL,
+    dept_name   nvarchar(30) DEFAULT ''    NULL,
+    order_num   int          DEFAULT ((0)) NULL,
+    leader      nvarchar(20)               NULL,
+    phone       nvarchar(11)               NULL,
+    email       nvarchar(50)               NULL,
+    status      nchar(1)     DEFAULT ('0') NULL,
+    del_flag    nchar(1)     DEFAULT ('0') NULL,
+    create_dept bigint                     NULL,
+    create_by   bigint                     NULL,
+    create_time datetime2(7)               NULL,
+    update_by   bigint                     NULL,
+    update_time datetime2(7)               NULL,
+    CONSTRAINT PK__sys_dept__DCA659747DE13804 PRIMARY KEY CLUSTERED (dept_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -471,6 +729,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_dept',
     'COLUMN', N'dept_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_dept',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'鐖堕儴闂╥d' ,
@@ -562,45 +826,46 @@
     'TABLE', N'sys_dept'
 GO
 
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (100, 0, N'0', N'鑻ヤ緷绉戞妧', 0, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (100, N'000000', 0, N'0', N'XXX绉戞妧', 0, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (101, 100, N'0,100', N'娣卞湷鎬诲叕鍙�', 1, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (101, N'000000', 100, N'0,100', N'娣卞湷鎬诲叕鍙�', 1, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (102, 100, N'0,100', N'闀挎矙鍒嗗叕鍙�', 2, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (102, N'000000', 100, N'0,100', N'闀挎矙鍒嗗叕鍙�', 2, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (103, 101, N'0,100,101', N'鐮斿彂閮ㄩ棬', 1, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (103, N'000000', 101, N'0,100,101', N'鐮斿彂閮ㄩ棬', 1, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (104, 101, N'0,100,101', N'甯傚満閮ㄩ棬', 2, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (104, N'000000', 101, N'0,100,101', N'甯傚満閮ㄩ棬', 2, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (105, 101, N'0,100,101', N'娴嬭瘯閮ㄩ棬', 3, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (105, N'000000', 101, N'0,100,101', N'娴嬭瘯閮ㄩ棬', 3, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (106, 101, N'0,100,101', N'璐㈠姟閮ㄩ棬', 4, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (106, N'000000', 101, N'0,100,101', N'璐㈠姟閮ㄩ棬', 4, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (107, 101, N'0,100,101', N'杩愮淮閮ㄩ棬', 5, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (107, N'000000', 101, N'0,100,101', N'杩愮淮閮ㄩ棬', 5, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (108, 102, N'0,100,102', N'甯傚満閮ㄩ棬', 1, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (108, N'000000', 102, N'0,100,102', N'甯傚満閮ㄩ棬', 1, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
-INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (109, 102, N'0,100,102', N'璐㈠姟閮ㄩ棬', 2, N'鑻ヤ緷', N'15888888888', N'ry@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
+INSERT sys_dept VALUES (109, N'000000', 102, N'0,100,102', N'璐㈠姟閮ㄩ棬', 2, N'鐤媯鐨勭嫯瀛怢i', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
 GO
 
-CREATE TABLE [sys_dict_data]
+CREATE TABLE sys_dict_data
 (
-    [dict_code]   bigint                      NOT NULL,
-    [dict_sort]   int           DEFAULT ((0)) NULL,
-    [dict_label]  nvarchar(100) DEFAULT ''    NULL,
-    [dict_value]  nvarchar(100) DEFAULT ''    NULL,
-    [dict_type]   nvarchar(100) DEFAULT ''    NULL,
-    [css_class]   nvarchar(100)               NULL,
-    [list_class]  nvarchar(100)               NULL,
-    [is_default]  nchar(1)      DEFAULT ('N') NULL,
-    [status]      nchar(1)      DEFAULT ('0') NULL,
-    [create_dept] bigint                      NULL,
-    [create_by]   bigint                      NULL,
-    [create_time] datetime2(7)                NULL,
-    [update_by]   bigint                      NULL,
-    [update_time] datetime2(7)                NULL,
-    [remark]      nvarchar(500)               NULL,
-    CONSTRAINT [PK__sys_dict__19CBC34B661AF3B3] PRIMARY KEY CLUSTERED ([dict_code])
+    dict_code   bigint                      NOT NULL,
+    tenant_id   nvarchar(20)                NOT NULL,
+    dict_sort   int           DEFAULT ((0)) NULL,
+    dict_label  nvarchar(100) DEFAULT ''    NULL,
+    dict_value  nvarchar(100) DEFAULT ''    NULL,
+    dict_type   nvarchar(100) DEFAULT ''    NULL,
+    css_class   nvarchar(100)               NULL,
+    list_class  nvarchar(100)               NULL,
+    is_default  nchar(1)      DEFAULT ('N') NULL,
+    status      nchar(1)      DEFAULT ('0') NULL,
+    create_dept bigint                      NULL,
+    create_by   bigint                      NULL,
+    create_time datetime2(7)                NULL,
+    update_by   bigint                      NULL,
+    update_time datetime2(7)                NULL,
+    remark      nvarchar(500)               NULL,
+    CONSTRAINT PK__sys_dict__19CBC34B661AF3B3 PRIMARY KEY CLUSTERED (dict_code)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -612,6 +877,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_dict_data',
     'COLUMN', N'dict_code'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'瀛楀吀缂栫爜' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_dict_data',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'瀛楀吀鎺掑簭' ,
@@ -703,78 +974,79 @@
     'TABLE', N'sys_dict_data'
 GO
 
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, 1, N'鐢�', N'0', N'sys_user_sex', N'', N'', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'鎬у埆鐢�')
+INSERT sys_dict_data VALUES (1, N'000000', 1, N'鐢�', N'0', N'sys_user_sex', N'', N'', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'鎬у埆鐢�')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, 2, N'濂�', N'1', N'sys_user_sex', N'', N'', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鎬у埆濂�')
+INSERT sys_dict_data VALUES (2, N'000000', 2, N'濂�', N'1', N'sys_user_sex', N'', N'', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鎬у埆濂�')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, 3, N'鏈煡', N'2', N'sys_user_sex', N'', N'', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鎬у埆鏈煡')
+INSERT sys_dict_data VALUES (3, N'000000', 3, N'鏈煡', N'2', N'sys_user_sex', N'', N'', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鎬у埆鏈煡')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, 1, N'鏄剧ず', N'0', N'sys_show_hide', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'鏄剧ず鑿滃崟')
+INSERT sys_dict_data VALUES (4, N'000000', 1, N'鏄剧ず', N'0', N'sys_show_hide', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'鏄剧ず鑿滃崟')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (5, 2, N'闅愯棌', N'1', N'sys_show_hide', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'闅愯棌鑿滃崟')
+INSERT sys_dict_data VALUES (5, N'000000', 2, N'闅愯棌', N'1', N'sys_show_hide', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'闅愯棌鑿滃崟')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (6, 1, N'姝e父', N'0', N'sys_normal_disable', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
+INSERT sys_dict_data VALUES (6, N'000000', 1, N'姝e父', N'0', N'sys_normal_disable', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (7, 2, N'鍋滅敤', N'1', N'sys_normal_disable', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍋滅敤鐘舵��')
+INSERT sys_dict_data VALUES (7, N'000000', 2, N'鍋滅敤', N'1', N'sys_normal_disable', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍋滅敤鐘舵��')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (8, 1, N'姝e父', N'0', N'sys_job_status', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
+INSERT sys_dict_data VALUES (8, N'000000', 1, N'姝e父', N'0', N'sys_job_status', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (9, 2, N'鏆傚仠', N'1', N'sys_job_status', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍋滅敤鐘舵��')
+INSERT sys_dict_data VALUES (9, N'000000', 2, N'鏆傚仠', N'1', N'sys_job_status', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍋滅敤鐘舵��')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (10, 1, N'榛樿', N'DEFAULT', N'sys_job_group', N'', N'', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'榛樿鍒嗙粍')
+INSERT sys_dict_data VALUES (10, N'000000', 1, N'榛樿', N'DEFAULT', N'sys_job_group', N'', N'', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'榛樿鍒嗙粍')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (11, 2, N'绯荤粺', N'SYSTEM', N'sys_job_group', N'', N'', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺鍒嗙粍')
+INSERT sys_dict_data VALUES (11, N'000000', 2, N'绯荤粺', N'SYSTEM', N'sys_job_group', N'', N'', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺鍒嗙粍')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (12, 1, N'鏄�', N'Y', N'sys_yes_no', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺榛樿鏄�')
+INSERT sys_dict_data VALUES (12, N'000000', 1, N'鏄�', N'Y', N'sys_yes_no', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺榛樿鏄�')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (13, 2, N'鍚�', N'N', N'sys_yes_no', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺榛樿鍚�')
+INSERT sys_dict_data VALUES (13, N'000000', 2, N'鍚�', N'N', N'sys_yes_no', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺榛樿鍚�')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (14, 1, N'閫氱煡', N'1', N'sys_notice_type', N'', N'warning', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'閫氱煡')
+INSERT sys_dict_data VALUES (14, N'000000', 1, N'閫氱煡', N'1', N'sys_notice_type', N'', N'warning', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'閫氱煡')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (15, 2, N'鍏憡', N'2', N'sys_notice_type', N'', N'success', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍏憡')
+INSERT sys_dict_data VALUES (15, N'000000', 2, N'鍏憡', N'2', N'sys_notice_type', N'', N'success', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍏憡')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (16, 1, N'姝e父', N'0', N'sys_notice_status', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
+INSERT sys_dict_data VALUES (16, N'000000', 1, N'姝e父', N'0', N'sys_notice_status', N'', N'primary', N'Y', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (17, 2, N'鍏抽棴', N'1', N'sys_notice_status', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍏抽棴鐘舵��')
+INSERT sys_dict_data VALUES (17, N'000000', 2, N'鍏抽棴', N'1', N'sys_notice_status', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍏抽棴鐘舵��')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (29, 99, N'鍏朵粬', N'0', N'sys_oper_type', N'', N'info', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍏朵粬鎿嶄綔');
+INSERT sys_dict_data VALUES (29, N'000000', 99, N'鍏朵粬', N'0', N'sys_oper_type', N'', N'info', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍏朵粬鎿嶄綔');
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (18, 1, N'鏂板', N'1', N'sys_oper_type', N'', N'info', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鏂板鎿嶄綔')
+INSERT sys_dict_data VALUES (18, N'000000', 1, N'鏂板', N'1', N'sys_oper_type', N'', N'info', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鏂板鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (19, 2, N'淇敼', N'2', N'sys_oper_type', N'', N'info', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'淇敼鎿嶄綔')
+INSERT sys_dict_data VALUES (19, N'000000', 2, N'淇敼', N'2', N'sys_oper_type', N'', N'info', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'淇敼鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (20, 3, N'鍒犻櫎', N'3', N'sys_oper_type', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍒犻櫎鎿嶄綔')
+INSERT sys_dict_data VALUES (20, N'000000', 3, N'鍒犻櫎', N'3', N'sys_oper_type', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍒犻櫎鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (21, 4, N'鎺堟潈', N'4', N'sys_oper_type', N'', N'primary', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鎺堟潈鎿嶄綔')
+INSERT sys_dict_data VALUES (21, N'000000', 4, N'鎺堟潈', N'4', N'sys_oper_type', N'', N'primary', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鎺堟潈鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (22, 5, N'瀵煎嚭', N'5', N'sys_oper_type', N'', N'warning', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'瀵煎嚭鎿嶄綔')
+INSERT sys_dict_data VALUES (22, N'000000', 5, N'瀵煎嚭', N'5', N'sys_oper_type', N'', N'warning', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'瀵煎嚭鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (23, 6, N'瀵煎叆', N'6', N'sys_oper_type', N'', N'warning', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'瀵煎叆鎿嶄綔')
+INSERT sys_dict_data VALUES (23, N'000000', 6, N'瀵煎叆', N'6', N'sys_oper_type', N'', N'warning', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'瀵煎叆鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (24, 7, N'寮洪��', N'7', N'sys_oper_type', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'寮洪��鎿嶄綔')
+INSERT sys_dict_data VALUES (24, N'000000', 7, N'寮洪��', N'7', N'sys_oper_type', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'寮洪��鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (25, 8, N'鐢熸垚浠g爜', N'8', N'sys_oper_type', N'', N'warning', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鐢熸垚鎿嶄綔')
+INSERT sys_dict_data VALUES (25, N'000000', 8, N'鐢熸垚浠g爜', N'8', N'sys_oper_type', N'', N'warning', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鐢熸垚鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (26, 9, N'娓呯┖鏁版嵁', N'9', N'sys_oper_type', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'娓呯┖鎿嶄綔')
+INSERT sys_dict_data VALUES (26, N'000000', 9, N'娓呯┖鏁版嵁', N'9', N'sys_oper_type', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'娓呯┖鎿嶄綔')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (27, 1, N'鎴愬姛', N'0', N'sys_common_status', N'', N'primary', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
+INSERT sys_dict_data VALUES (27, N'000000', 1, N'鎴愬姛', N'0', N'sys_common_status', N'', N'primary', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'姝e父鐘舵��')
 GO
-INSERT [sys_dict_data] ([dict_code], [dict_sort], [dict_label], [dict_value], [dict_type], [css_class], [list_class], [is_default], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (28, 2, N'澶辫触', N'1', N'sys_common_status', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍋滅敤鐘舵��')
+INSERT sys_dict_data VALUES (28, N'000000', 2, N'澶辫触', N'1', N'sys_common_status', N'', N'danger', N'N', N'0', 103, 1, getdate(), NULL, NULL, N'鍋滅敤鐘舵��')
 GO
 
-CREATE TABLE [sys_dict_type]
+CREATE TABLE sys_dict_type
 (
-    [dict_id]     bigint                      NOT NULL,
-    [dict_name]   nvarchar(100) DEFAULT ''    NULL,
-    [dict_type]   nvarchar(100) DEFAULT ''    NULL,
-    [status]      nchar(1)      DEFAULT ('0') NULL,
-    [create_dept] bigint                      NULL,
-    [create_by]   bigint                      NULL,
-    [create_time] datetime2(7)                NULL,
-    [update_by]   bigint                      NULL,
-    [update_time] datetime2(7)                NULL,
-    [remark]      nvarchar(500)               NULL,
-    CONSTRAINT [PK__sys_dict__3BD4186C409C5391] PRIMARY KEY CLUSTERED ([dict_id])
+    dict_id     bigint                      NOT NULL,
+    tenant_id   nvarchar(20)                NOT NULL,
+    dict_name   nvarchar(100) DEFAULT ''    NULL,
+    dict_type   nvarchar(100) DEFAULT ''    NULL,
+    status      nchar(1)      DEFAULT ('0') NULL,
+    create_dept bigint                      NULL,
+    create_by   bigint                      NULL,
+    create_time datetime2(7)                NULL,
+    update_by   bigint                      NULL,
+    update_time datetime2(7)                NULL,
+    remark      nvarchar(500)               NULL,
+    CONSTRAINT PK__sys_dict__3BD4186C409C5391 PRIMARY KEY CLUSTERED (dict_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -786,6 +1058,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_dict_type',
     'COLUMN', N'dict_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'瀛楀吀涓婚敭' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_dict_type',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'瀛楀吀鍚嶇О' ,
@@ -847,39 +1125,40 @@
     'TABLE', N'sys_dict_type'
 GO
 
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'鐢ㄦ埛鎬у埆', N'sys_user_sex', N'0', 103, 1, getdate(), NULL, NULL, N'鐢ㄦ埛鎬у埆鍒楄〃')
+INSERT sys_dict_type VALUES (1, N'000000', N'鐢ㄦ埛鎬у埆', N'sys_user_sex', N'0', 103, 1, getdate(), NULL, NULL, N'鐢ㄦ埛鎬у埆鍒楄〃')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'鑿滃崟鐘舵��', N'sys_show_hide', N'0', 103, 1, getdate(), NULL, NULL, N'鑿滃崟鐘舵�佸垪琛�')
+INSERT sys_dict_type VALUES (2, N'000000', N'鑿滃崟鐘舵��', N'sys_show_hide', N'0', 103, 1, getdate(), NULL, NULL, N'鑿滃崟鐘舵�佸垪琛�')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, N'绯荤粺寮�鍏�', N'sys_normal_disable', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺寮�鍏冲垪琛�')
+INSERT sys_dict_type VALUES (3, N'000000', N'绯荤粺寮�鍏�', N'sys_normal_disable', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺寮�鍏冲垪琛�')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, N'浠诲姟鐘舵��', N'sys_job_status', N'0', 103, 1, getdate(), NULL, NULL, N'浠诲姟鐘舵�佸垪琛�')
+INSERT sys_dict_type VALUES (4, N'000000', N'浠诲姟鐘舵��', N'sys_job_status', N'0', 103, 1, getdate(), NULL, NULL, N'浠诲姟鐘舵�佸垪琛�')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (5, N'浠诲姟鍒嗙粍', N'sys_job_group', N'0', 103, 1, getdate(), NULL, NULL, N'浠诲姟鍒嗙粍鍒楄〃')
+INSERT sys_dict_type VALUES (5, N'000000', N'浠诲姟鍒嗙粍', N'sys_job_group', N'0', 103, 1, getdate(), NULL, NULL, N'浠诲姟鍒嗙粍鍒楄〃')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (6, N'绯荤粺鏄惁', N'sys_yes_no', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺鏄惁鍒楄〃')
+INSERT sys_dict_type VALUES (6, N'000000', N'绯荤粺鏄惁', N'sys_yes_no', N'0', 103, 1, getdate(), NULL, NULL, N'绯荤粺鏄惁鍒楄〃')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (7, N'閫氱煡绫诲瀷', N'sys_notice_type', N'0', 103, 1, getdate(), NULL, NULL, N'閫氱煡绫诲瀷鍒楄〃')
+INSERT sys_dict_type VALUES (7, N'000000', N'閫氱煡绫诲瀷', N'sys_notice_type', N'0', 103, 1, getdate(), NULL, NULL, N'閫氱煡绫诲瀷鍒楄〃')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (8, N'閫氱煡鐘舵��', N'sys_notice_status', N'0', 103, 1, getdate(), NULL, NULL, N'閫氱煡鐘舵�佸垪琛�')
+INSERT sys_dict_type VALUES (8, N'000000', N'閫氱煡鐘舵��', N'sys_notice_status', N'0', 103, 1, getdate(), NULL, NULL, N'閫氱煡鐘舵�佸垪琛�')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (9, N'鎿嶄綔绫诲瀷', N'sys_oper_type', N'0', 103, 1, getdate(), NULL, NULL, N'鎿嶄綔绫诲瀷鍒楄〃')
+INSERT sys_dict_type VALUES (9, N'000000', N'鎿嶄綔绫诲瀷', N'sys_oper_type', N'0', 103, 1, getdate(), NULL, NULL, N'鎿嶄綔绫诲瀷鍒楄〃')
 GO
-INSERT [sys_dict_type] ([dict_id], [dict_name], [dict_type], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (10, N'绯荤粺鐘舵��', N'sys_common_status', N'0', 103, 1, getdate(), NULL, NULL, N'鐧诲綍鐘舵�佸垪琛�')
+INSERT sys_dict_type VALUES (10, N'000000', N'绯荤粺鐘舵��', N'sys_common_status', N'0', 103, 1, getdate(), NULL, NULL, N'鐧诲綍鐘舵�佸垪琛�')
 GO
 
-CREATE TABLE [sys_logininfor]
+CREATE TABLE sys_logininfor
 (
-    [info_id]        bigint                      NOT NULL,
-    [user_name]      nvarchar(50)  DEFAULT ''    NULL,
-    [ipaddr]         nvarchar(128) DEFAULT ''    NULL,
-    [login_location] nvarchar(255) DEFAULT ''    NULL,
-    [browser]        nvarchar(50)  DEFAULT ''    NULL,
-    [os]             nvarchar(50)  DEFAULT ''    NULL,
-    [status]         nchar(1)      DEFAULT ('0') NULL,
-    [msg]            nvarchar(255) DEFAULT ''    NULL,
-    [login_time]     datetime2(7)                NULL,
-    CONSTRAINT [PK__sys_logi__3D8A9C1A1854AE10] PRIMARY KEY CLUSTERED ([info_id])
+    info_id        bigint                      NOT NULL,
+    tenant_id      nvarchar(20)                NOT NULL,
+    user_name      nvarchar(50)  DEFAULT ''    NULL,
+    ipaddr         nvarchar(128) DEFAULT ''    NULL,
+    login_location nvarchar(255) DEFAULT ''    NULL,
+    browser        nvarchar(50)  DEFAULT ''    NULL,
+    os             nvarchar(50)  DEFAULT ''    NULL,
+    status         nchar(1)      DEFAULT ('0') NULL,
+    msg            nvarchar(255) DEFAULT ''    NULL,
+    login_time     datetime2(7)                NULL,
+    CONSTRAINT PK__sys_logi__3D8A9C1A1854AE10 PRIMARY KEY CLUSTERED (info_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -891,6 +1170,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_logininfor',
     'COLUMN', N'info_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_logininfor',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'鐢ㄦ埛璐﹀彿' ,
@@ -946,29 +1231,29 @@
     'TABLE', N'sys_logininfor'
 GO
 
-CREATE TABLE [sys_menu]
+CREATE TABLE sys_menu
 (
-    [menu_id]     bigint                      NOT NULL,
-    [menu_name]   nvarchar(50)                NOT NULL,
-    [parent_id]   bigint        DEFAULT ((0)) NULL,
-    [order_num]   int           DEFAULT ((0)) NULL,
-    [path]        nvarchar(200) DEFAULT ''    NULL,
-    [component]   nvarchar(255)               NULL,
-    [query_param] nvarchar(255)               NULL,
-    [is_frame]    int           DEFAULT ((1)) NULL,
-    [is_cache]    int           DEFAULT ((0)) NULL,
-    [menu_type]   nchar(1)      DEFAULT ''    NULL,
-    [visible]     nchar(1)      DEFAULT ((0)) NULL,
-    [status]      nchar(1)      DEFAULT ((0)) NULL,
-    [perms]       nvarchar(100)               NULL,
-    [icon]        nvarchar(100) DEFAULT ('#') NULL,
-    [create_dept] bigint                      NULL,
-    [create_by]   bigint                      NULL,
-    [create_time] datetime2(7)                NULL,
-    [update_by]   bigint                      NULL,
-    [update_time] datetime2(7)                NULL,
-    [remark]      nvarchar(500) DEFAULT ''    NULL,
-    CONSTRAINT [PK__sys_menu__4CA0FADCF8545C58] PRIMARY KEY CLUSTERED ([menu_id])
+    menu_id     bigint                      NOT NULL,
+    menu_name   nvarchar(50)                NOT NULL,
+    parent_id   bigint        DEFAULT ((0)) NULL,
+    order_num   int           DEFAULT ((0)) NULL,
+    path        nvarchar(200) DEFAULT ''    NULL,
+    component   nvarchar(255)               NULL,
+    query_param nvarchar(255)               NULL,
+    is_frame    int           DEFAULT ((1)) NULL,
+    is_cache    int           DEFAULT ((0)) NULL,
+    menu_type   nchar(1)      DEFAULT ''    NULL,
+    visible     nchar(1)      DEFAULT ((0)) NULL,
+    status      nchar(1)      DEFAULT ((0)) NULL,
+    perms       nvarchar(100)               NULL,
+    icon        nvarchar(100) DEFAULT ('#') NULL,
+    create_dept bigint                      NULL,
+    create_by   bigint                      NULL,
+    create_time datetime2(7)                NULL,
+    update_by   bigint                      NULL,
+    update_time datetime2(7)                NULL,
+    remark      nvarchar(500) DEFAULT ''    NULL,
+    CONSTRAINT PK__sys_menu__4CA0FADCF8545C58 PRIMARY KEY CLUSTERED (menu_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1101,188 +1386,215 @@
     'TABLE', N'sys_menu'
 GO
 
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'绯荤粺绠$悊', 0, 1, N'system', NULL, N'', 1, 0, N'M', N'0', N'0', N'', N'system', 103, 1, getdate(), NULL, NULL, N'绯荤粺绠$悊鐩綍')
+INSERT sys_menu VALUES (1, N'绯荤粺绠$悊', 0, 1, N'system', NULL, N'', 1, 0, N'M', N'0', N'0', N'', N'system', 103, 1, getdate(), NULL, NULL, N'绯荤粺绠$悊鐩綍')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'绯荤粺鐩戞帶', 0, 2, N'monitor', NULL, N'', 1, 0, N'M', N'0', N'0', N'', N'monitor', 103, 1, getdate(), NULL, NULL, N'绯荤粺鐩戞帶鐩綍')
+INSERT sys_menu VALUES (6, N'绉熸埛绠$悊', 0, 2, N'tenant', NULL, N'', 1, 0, N'M', N'0', N'0', N'', N'chart', 103, 1, getdate(), NULL, NULL, N'绉熸埛绠$悊鐩綍')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, N'绯荤粺宸ュ叿', 0, 3, N'tool', NULL, N'', 1, 0, N'M', N'0', N'0', N'', N'tool', 103, 1, getdate(), NULL, NULL, N'绯荤粺宸ュ叿鐩綍')
+INSERT sys_menu VALUES (2, N'绯荤粺鐩戞帶', 0, 3, N'monitor', NULL, N'', 1, 0, N'M', N'0', N'0', N'', N'monitor', 103, 1, getdate(), NULL, NULL, N'绯荤粺鐩戞帶鐩綍')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (100, N'鐢ㄦ埛绠$悊', 1, 1, N'user', N'system/user/index', N'', 1, 0, N'C', N'0', N'0', N'system:user:list', N'user', 103, 1, getdate(), NULL, NULL, N'鐢ㄦ埛绠$悊鑿滃崟')
+INSERT sys_menu VALUES (3, N'绯荤粺宸ュ叿', 0, 4, N'tool', NULL, N'', 1, 0, N'M', N'0', N'0', N'', N'tool', 103, 1, getdate(), NULL, NULL, N'绯荤粺宸ュ叿鐩綍')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (101, N'瑙掕壊绠$悊', 1, 2, N'role', N'system/role/index', N'', 1, 0, N'C', N'0', N'0', N'system:role:list', N'peoples', 103, 1, getdate(), NULL, NULL, N'瑙掕壊绠$悊鑿滃崟')
+INSERT sys_menu VALUES (100, N'鐢ㄦ埛绠$悊', 1, 1, N'user', N'system/user/index', N'', 1, 0, N'C', N'0', N'0', N'system:user:list', N'user', 103, 1, getdate(), NULL, NULL, N'鐢ㄦ埛绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (102, N'鑿滃崟绠$悊', 1, 3, N'menu', N'system/menu/index', N'', 1, 0, N'C', N'0', N'0', N'system:menu:list', N'tree-table', 103, 1, getdate(), NULL, NULL, N'鑿滃崟绠$悊鑿滃崟')
+INSERT sys_menu VALUES (101, N'瑙掕壊绠$悊', 1, 2, N'role', N'system/role/index', N'', 1, 0, N'C', N'0', N'0', N'system:role:list', N'peoples', 103, 1, getdate(), NULL, NULL, N'瑙掕壊绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (103, N'閮ㄩ棬绠$悊', 1, 4, N'dept', N'system/dept/index', N'', 1, 0, N'C', N'0', N'0', N'system:dept:list', N'tree', 103, 1, getdate(), NULL, NULL, N'閮ㄩ棬绠$悊鑿滃崟')
+INSERT sys_menu VALUES (102, N'鑿滃崟绠$悊', 1, 3, N'menu', N'system/menu/index', N'', 1, 0, N'C', N'0', N'0', N'system:menu:list', N'tree-table', 103, 1, getdate(), NULL, NULL, N'鑿滃崟绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (104, N'宀椾綅绠$悊', 1, 5, N'post', N'system/post/index', N'', 1, 0, N'C', N'0', N'0', N'system:post:list', N'post', 103, 1, getdate(), NULL, NULL, N'宀椾綅绠$悊鑿滃崟')
+INSERT sys_menu VALUES (103, N'閮ㄩ棬绠$悊', 1, 4, N'dept', N'system/dept/index', N'', 1, 0, N'C', N'0', N'0', N'system:dept:list', N'tree', 103, 1, getdate(), NULL, NULL, N'閮ㄩ棬绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (105, N'瀛楀吀绠$悊', 1, 6, N'dict', N'system/dict/index', N'', 1, 0, N'C', N'0', N'0', N'system:dict:list', N'dict', 103, 1, getdate(), NULL, NULL, N'瀛楀吀绠$悊鑿滃崟')
+INSERT sys_menu VALUES (104, N'宀椾綅绠$悊', 1, 5, N'post', N'system/post/index', N'', 1, 0, N'C', N'0', N'0', N'system:post:list', N'post', 103, 1, getdate(), NULL, NULL, N'宀椾綅绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (106, N'鍙傛暟璁剧疆', 1, 7, N'config', N'system/config/index', N'', 1, 0, N'C', N'0', N'0', N'system:config:list', N'edit', 103, 1, getdate(), NULL, NULL, N'鍙傛暟璁剧疆鑿滃崟')
+INSERT sys_menu VALUES (105, N'瀛楀吀绠$悊', 1, 6, N'dict', N'system/dict/index', N'', 1, 0, N'C', N'0', N'0', N'system:dict:list', N'dict', 103, 1, getdate(), NULL, NULL, N'瀛楀吀绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (107, N'閫氱煡鍏憡', 1, 8, N'notice', N'system/notice/index', N'', 1, 0, N'C', N'0', N'0', N'system:notice:list', N'message', 103, 1, getdate(), NULL, NULL, N'閫氱煡鍏憡鑿滃崟')
+INSERT sys_menu VALUES (106, N'鍙傛暟璁剧疆', 1, 7, N'config', N'system/config/index', N'', 1, 0, N'C', N'0', N'0', N'system:config:list', N'edit', 103, 1, getdate(), NULL, NULL, N'鍙傛暟璁剧疆鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (108, N'鏃ュ織绠$悊', 1, 9, N'log', N'', N'', 1, 0, N'M', N'0', N'0', N'', N'log', 103, 1, getdate(), NULL, NULL, N'鏃ュ織绠$悊鑿滃崟')
+INSERT sys_menu VALUES (107, N'閫氱煡鍏憡', 1, 8, N'notice', N'system/notice/index', N'', 1, 0, N'C', N'0', N'0', N'system:notice:list', N'message', 103, 1, getdate(), NULL, NULL, N'閫氱煡鍏憡鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (109, N'鍦ㄧ嚎鐢ㄦ埛', 2, 1, N'online', N'monitor/online/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:online:list', N'online', 103, 1, getdate(), NULL, NULL, N'鍦ㄧ嚎鐢ㄦ埛鑿滃崟')
+INSERT sys_menu VALUES (108, N'鏃ュ織绠$悊', 1, 9, N'log', N'', N'', 1, 0, N'M', N'0', N'0', N'', N'log', 103, 1, getdate(), NULL, NULL, N'鏃ュ織绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (112, N'缂撳瓨鍒楄〃', 2, 6, N'cacheList', N'monitor/cache/list', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis-list', 103, 1, getdate(), NULL, NULL, N'缂撳瓨鍒楄〃鑿滃崟')
+INSERT sys_menu VALUES (109, N'鍦ㄧ嚎鐢ㄦ埛', 2, 1, N'online', N'monitor/online/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:online:list', N'online', 103, 1, getdate(), NULL, NULL, N'鍦ㄧ嚎鐢ㄦ埛鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (113, N'缂撳瓨鐩戞帶', 2, 5, N'cache', N'monitor/cache/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis', 103, 1, getdate(), NULL, NULL, N'缂撳瓨鐩戞帶鑿滃崟')
+INSERT sys_menu VALUES (113, N'缂撳瓨鐩戞帶', 2, 5, N'cache', N'monitor/cache/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:cache:list', N'redis', 103, 1, getdate(), NULL, NULL, N'缂撳瓨鐩戞帶鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (114, N'琛ㄥ崟鏋勫缓', 3, 1, N'build', N'tool/build/index', N'', 1, 0, N'C', N'0', N'0', N'tool:build:list', N'build', 103, 1, getdate(), NULL, NULL, N'琛ㄥ崟鏋勫缓鑿滃崟')
+INSERT sys_menu VALUES (114, N'琛ㄥ崟鏋勫缓', 3, 1, N'build', N'tool/build/index', N'', 1, 0, N'C', N'0', N'0', N'tool:build:list', N'build', 103, 1, getdate(), NULL, NULL, N'琛ㄥ崟鏋勫缓鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (115, N'浠g爜鐢熸垚', 3, 2, N'gen', N'tool/gen/index', N'', 1, 0, N'C', N'0', N'0', N'tool:gen:list', N'code', 103, 1, getdate(), NULL, NULL, N'浠g爜鐢熸垚鑿滃崟')
+INSERT sys_menu VALUES (115, N'浠g爜鐢熸垚', 3, 2, N'gen', N'tool/gen/index', N'', 1, 0, N'C', N'0', N'0', N'tool:gen:list', N'code', 103, 1, getdate(), NULL, NULL, N'浠g爜鐢熸垚鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (117, N'Admin鐩戞帶', 2, 5, N'Admin', N'monitor/admin/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:admin:list', N'dashboard', 103, 1, getdate(), NULL, NULL, N'Admin鐩戞帶鑿滃崟');
+INSERT sys_menu VALUES (121, N'绉熸埛绠$悊', 6, 1, N'tenant', N'system/tenant/index', N'', 1, 0, N'C', N'0', N'0', N'system:tenant:list', N'code', 103, 1, getdate(), NULL, NULL, N'绉熸埛绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (118, N'鏂囦欢绠$悊', 1, 10, N'oss', N'system/oss/index', N'', 1, 0, N'C', '0', N'0', N'system:oss:list', N'upload', 103, 1, getdate(), NULL, NULL, N'鏂囦欢绠$悊鑿滃崟');
+INSERT sys_menu VALUES (122, N'绉熸埛濂楅绠$悊', 6, 2, N'tenantPackage', N'system/tenantPackage/index', N'', 1, 0, N'C', N'0', N'0', N'system:tenantPackage:list', N'code', 103, 1, getdate(), NULL, NULL, N'绉熸埛濂楅绠$悊鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (120, N'浠诲姟璋冨害涓績', 2, 5, N'XxlJob', N'monitor/xxljob/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:xxljob:list', N'job', 103, 1, getdate(), NULL, NULL, N'Xxl-Job鎺у埗鍙拌彍鍗�');
+INSERT sys_menu VALUES (117, N'Admin鐩戞帶', 2, 5, N'Admin', N'monitor/admin/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:admin:list', N'dashboard', 103, 1, getdate(), NULL, NULL, N'Admin鐩戞帶鑿滃崟');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (500, N'鎿嶄綔鏃ュ織', 108, 1, N'operlog', N'monitor/operlog/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:operlog:list', N'form', 103, 1, getdate(), NULL, NULL, N'鎿嶄綔鏃ュ織鑿滃崟')
+INSERT sys_menu VALUES (118, N'鏂囦欢绠$悊', 1, 10, N'oss', N'system/oss/index', N'', 1, 0, N'C', '0', N'0', N'system:oss:list', N'upload', 103, 1, getdate(), NULL, NULL, N'鏂囦欢绠$悊鑿滃崟');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (501, N'鐧诲綍鏃ュ織', 108, 2, N'logininfor', N'monitor/logininfor/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:logininfor:list', N'logininfor', 103, 1, getdate(), NULL, NULL, N'鐧诲綍鏃ュ織鑿滃崟')
+INSERT sys_menu VALUES (120, N'浠诲姟璋冨害涓績', 2, 5, N'XxlJob', N'monitor/xxljob/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:xxljob:list', N'job', 103, 1, getdate(), NULL, NULL, N'Xxl-Job鎺у埗鍙拌彍鍗�');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1001, N'鐢ㄦ埛鏌ヨ', 100, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (500, N'鎿嶄綔鏃ュ織', 108, 1, N'operlog', N'monitor/operlog/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:operlog:list', N'form', 103, 1, getdate(), NULL, NULL, N'鎿嶄綔鏃ュ織鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1002, N'鐢ㄦ埛鏂板', 100, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (501, N'鐧诲綍鏃ュ織', 108, 2, N'logininfor', N'monitor/logininfor/index', N'', 1, 0, N'C', N'0', N'0', N'monitor:logininfor:list', N'logininfor', 103, 1, getdate(), NULL, NULL, N'鐧诲綍鏃ュ織鑿滃崟')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1003, N'鐢ㄦ埛淇敼', 100, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1001, N'鐢ㄦ埛鏌ヨ', 100, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1004, N'鐢ㄦ埛鍒犻櫎', 100, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1002, N'鐢ㄦ埛鏂板', 100, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1005, N'鐢ㄦ埛瀵煎嚭', 100, 5, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1003, N'鐢ㄦ埛淇敼', 100, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1006, N'鐢ㄦ埛瀵煎叆', 100, 6, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:import', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1004, N'鐢ㄦ埛鍒犻櫎', 100, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1007, N'閲嶇疆瀵嗙爜', 100, 7, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:resetPwd', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1005, N'鐢ㄦ埛瀵煎嚭', 100, 5, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1008, N'瑙掕壊鏌ヨ', 101, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1006, N'鐢ㄦ埛瀵煎叆', 100, 6, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:import', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1009, N'瑙掕壊鏂板', 101, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1007, N'閲嶇疆瀵嗙爜', 100, 7, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:user:resetPwd', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1010, N'瑙掕壊淇敼', 101, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1008, N'瑙掕壊鏌ヨ', 101, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1011, N'瑙掕壊鍒犻櫎', 101, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1009, N'瑙掕壊鏂板', 101, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1012, N'瑙掕壊瀵煎嚭', 101, 5, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1010, N'瑙掕壊淇敼', 101, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1013, N'鑿滃崟鏌ヨ', 102, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1011, N'瑙掕壊鍒犻櫎', 101, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1014, N'鑿滃崟鏂板', 102, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1012, N'瑙掕壊瀵煎嚭', 101, 5, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:role:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1015, N'鑿滃崟淇敼', 102, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1013, N'鑿滃崟鏌ヨ', 102, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1016, N'鑿滃崟鍒犻櫎', 102, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1014, N'鑿滃崟鏂板', 102, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+GO
+INSERT sys_menu VALUES (1015, N'鑿滃崟淇敼', 102, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+GO
+INSERT sys_menu VALUES (1016, N'鑿滃崟鍒犻櫎', 102, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:menu:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1017, N'閮ㄩ棬鏌ヨ', 103, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1017, N'閮ㄩ棬鏌ヨ', 103, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1018, N'閮ㄩ棬鏂板', 103, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1018, N'閮ㄩ棬鏂板', 103, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1019, N'閮ㄩ棬淇敼', 103, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1019, N'閮ㄩ棬淇敼', 103, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1020, N'閮ㄩ棬鍒犻櫎', 103, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1020, N'閮ㄩ棬鍒犻櫎', 103, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dept:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1021, N'宀椾綅鏌ヨ', 104, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1021, N'宀椾綅鏌ヨ', 104, 1, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1022, N'宀椾綅鏂板', 104, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1022, N'宀椾綅鏂板', 104, 2, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1023, N'宀椾綅淇敼', 104, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1023, N'宀椾綅淇敼', 104, 3, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1024, N'宀椾綅鍒犻櫎', 104, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1024, N'宀椾綅鍒犻櫎', 104, 4, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1025, N'宀椾綅瀵煎嚭', 104, 5, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1025, N'宀椾綅瀵煎嚭', 104, 5, N'', N'', N'', 1, 0, N'F', N'0', N'0', N'system:post:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1026, N'瀛楀吀鏌ヨ', 105, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1026, N'瀛楀吀鏌ヨ', 105, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1027, N'瀛楀吀鏂板', 105, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1027, N'瀛楀吀鏂板', 105, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1028, N'瀛楀吀淇敼', 105, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1028, N'瀛楀吀淇敼', 105, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1029, N'瀛楀吀鍒犻櫎', 105, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1029, N'瀛楀吀鍒犻櫎', 105, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1030, N'瀛楀吀瀵煎嚭', 105, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1030, N'瀛楀吀瀵煎嚭', 105, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:dict:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1031, N'鍙傛暟鏌ヨ', 106, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1031, N'鍙傛暟鏌ヨ', 106, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1032, N'鍙傛暟鏂板', 106, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1032, N'鍙傛暟鏂板', 106, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1033, N'鍙傛暟淇敼', 106, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1033, N'鍙傛暟淇敼', 106, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1034, N'鍙傛暟鍒犻櫎', 106, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1034, N'鍙傛暟鍒犻櫎', 106, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1035, N'鍙傛暟瀵煎嚭', 106, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1035, N'鍙傛暟瀵煎嚭', 106, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:config:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1036, N'鍏憡鏌ヨ', 107, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1036, N'鍏憡鏌ヨ', 107, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1037, N'鍏憡鏂板', 107, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1037, N'鍏憡鏂板', 107, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:add', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1038, N'鍏憡淇敼', 107, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1038, N'鍏憡淇敼', 107, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1039, N'鍏憡鍒犻櫎', 107, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1039, N'鍏憡鍒犻櫎', 107, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:notice:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1040, N'鎿嶄綔鏌ヨ', 500, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:operlog:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1040, N'鎿嶄綔鏌ヨ', 500, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:operlog:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1041, N'鎿嶄綔鍒犻櫎', 500, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:operlog:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1041, N'鎿嶄綔鍒犻櫎', 500, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:operlog:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1042, N'鏃ュ織瀵煎嚭', 500, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:operlog:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1042, N'鏃ュ織瀵煎嚭', 500, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:operlog:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1043, N'鐧诲綍鏌ヨ', 501, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1043, N'鐧诲綍鏌ヨ', 501, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1044, N'鐧诲綍鍒犻櫎', 501, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1044, N'鐧诲綍鍒犻櫎', 501, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1045, N'鏃ュ織瀵煎嚭', 501, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1045, N'鏃ュ織瀵煎嚭', 501, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:export', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1050, N'璐︽埛瑙i攣', 501, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:unlock',  N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1050, N'璐︽埛瑙i攣', 501, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:logininfor:unlock',  N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1046, N'鍦ㄧ嚎鏌ヨ', 109, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:online:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1046, N'鍦ㄧ嚎鏌ヨ', 109, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:online:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1047, N'鎵归噺寮洪��', 109, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:online:batchLogout', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1047, N'鎵归噺寮洪��', 109, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:online:batchLogout', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1048, N'鍗曟潯寮洪��', 109, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:online:forceLogout', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1048, N'鍗曟潯寮洪��', 109, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'monitor:online:forceLogout', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1055, N'鐢熸垚鏌ヨ', 115, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1055, N'鐢熸垚鏌ヨ', 115, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:query', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1056, N'鐢熸垚淇敼', 115, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1056, N'鐢熸垚淇敼', 115, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:edit', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1057, N'鐢熸垚鍒犻櫎', 115, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1057, N'鐢熸垚鍒犻櫎', 115, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:remove', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1058, N'瀵煎叆浠g爜', 115, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:import', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1058, N'瀵煎叆浠g爜', 115, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:import', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1059, N'棰勮浠g爜', 115, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:preview', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1059, N'棰勮浠g爜', 115, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:preview', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1060, N'鐢熸垚浠g爜', 115, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:code', N'#', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_menu VALUES (1060, N'鐢熸垚浠g爜', 115, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'tool:gen:code', N'#', 103, 1, getdate(), NULL, NULL, N'')
 GO
 -- oss鐩稿叧鎸夐挳
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1600, N'鏂囦欢鏌ヨ', 118, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1600, N'鏂囦欢鏌ヨ', 118, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1601, N'鏂囦欢涓婁紶', 118, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:upload', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1601, N'鏂囦欢涓婁紶', 118, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:upload', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1602, N'鏂囦欢涓嬭浇', 118, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:download', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1602, N'鏂囦欢涓嬭浇', 118, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:download', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1603, N'鏂囦欢鍒犻櫎', 118, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1603, N'鏂囦欢鍒犻櫎', 118, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1604, N'閰嶇疆娣诲姞', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1604, N'閰嶇疆娣诲姞', 118, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [query_param], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1605, N'閰嶇疆缂栬緫', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1605, N'閰嶇疆缂栬緫', 118, 6, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:oss:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+-- 绉熸埛绠$悊鐩稿叧鎸夐挳
+INSERT sys_menu VALUES (1606, N'绉熸埛鏌ヨ', 121, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenant:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1607, N'绉熸埛鏂板', 121, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenant:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1608, N'绉熸埛淇敼', 121, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenant:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1609, N'绉熸埛鍒犻櫎', 121, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenant:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1610, N'绉熸埛瀵煎嚭', 121, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenant:export', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+-- 绉熸埛濂楅绠$悊鐩稿叧鎸夐挳
+INSERT sys_menu VALUES (1611, N'绉熸埛濂楅鏌ヨ', 122, 1, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenantPackage:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1612, N'绉熸埛濂楅鏂板', 122, 2, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenantPackage:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1613, N'绉熸埛濂楅淇敼', 122, 3, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenantPackage:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1614, N'绉熸埛濂楅鍒犻櫎', 122, 4, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenantPackage:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
+GO
+INSERT sys_menu VALUES (1615, N'绉熸埛濂楅瀵煎嚭', 122, 5, N'#', N'', N'', 1, 0, N'F', N'0', N'0', N'system:tenantPackage:export', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
 
-CREATE TABLE [sys_notice]
+CREATE TABLE sys_notice
 (
-    [notice_id]      bigint                     NOT NULL,
-    [notice_title]   nvarchar(50)               NOT NULL,
-    [notice_type]    nchar(1)                   NOT NULL,
-    [notice_content] nvarchar(max)              NULL,
-    [status]         nchar(1)     DEFAULT ('0') NULL,
-    [create_dept]    bigint                     NULL,
-    [create_by]      bigint                     NULL,
-    [create_time]    datetime2(7)               NULL,
-    [update_by]      bigint                     NULL,
-    [update_time]    datetime2(7)               NULL,
-    [remark]         nvarchar(255)              NULL,
-    CONSTRAINT [PK__sys_noti__3E82A5DB0EC94801] PRIMARY KEY CLUSTERED ([notice_id])
+    notice_id      bigint                     NOT NULL,
+    tenant_id      nvarchar(20)               NOT NULL,
+    notice_title   nvarchar(50)               NOT NULL,
+    notice_type    nchar(1)                   NOT NULL,
+    notice_content nvarchar(max)              NULL,
+    status         nchar(1)     DEFAULT ('0') NULL,
+    create_dept    bigint                     NULL,
+    create_by      bigint                     NULL,
+    create_time    datetime2(7)               NULL,
+    update_by      bigint                     NULL,
+    update_time    datetime2(7)               NULL,
+    remark         nvarchar(255)              NULL,
+    CONSTRAINT PK__sys_noti__3E82A5DB0EC94801 PRIMARY KEY CLUSTERED (notice_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1295,6 +1607,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_notice',
     'COLUMN', N'notice_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_notice',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'鍏憡鏍囬' ,
@@ -1362,30 +1680,31 @@
     'TABLE', N'sys_notice'
 GO
 
-INSERT [sys_notice] ([notice_id], [notice_title], [notice_type], [notice_content], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'娓╅Θ鎻愰啋锛�2018-07-01 鑻ヤ緷鏂扮増鏈彂甯冨暒', N'2', N'<p>1111111111</p>', N'0', 103, 1, getdate(), 1, getdate(), N'绠$悊鍛�')
+INSERT sys_notice VALUES (1, N'000000', N'娓╅Θ鎻愰啋锛�2018-07-01 鑻ヤ緷鏂扮増鏈彂甯冨暒', N'2', N'鏂扮増鏈唴瀹�', N'0', 103, 1, getdate(), NULL, NULL, N'绠$悊鍛�')
 GO
-INSERT [sys_notice] ([notice_id], [notice_title], [notice_type], [notice_content], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'缁存姢閫氱煡锛�2018-07-01 鑻ヤ緷绯荤粺鍑屾櫒缁存姢', N'1', N'<p><img src="/dev-api/profile/upload/2021/12/04/f1e00aba-0182-46b0-9c65-7804dfd0ea4e.png"></p>', N'0', 103, 1, getdate(), 1, getdate(), N'绠$悊鍛�')
+INSERT sys_notice VALUES (2, N'000000', N'缁存姢閫氱煡锛�2018-07-01 鑻ヤ緷绯荤粺鍑屾櫒缁存姢', N'1', N'缁存姢鍐呭', N'0', 103, 1, getdate(), NULL, NULL, N'绠$悊鍛�')
 GO
 
-CREATE TABLE [sys_oper_log]
+CREATE TABLE sys_oper_log
 (
-    [oper_id]        bigint                       NOT NULL,
-    [title]          nvarchar(50)   DEFAULT ''    NULL,
-    [business_type]  int            DEFAULT ((0)) NULL,
-    [method]         nvarchar(100)  DEFAULT ''    NULL,
-    [request_method] nvarchar(10)   DEFAULT ''    NULL,
-    [operator_type]  int            DEFAULT ((0)) NULL,
-    [oper_name]      nvarchar(50)   DEFAULT ''    NULL,
-    [dept_name]      nvarchar(50)   DEFAULT ''    NULL,
-    [oper_url]       nvarchar(255)  DEFAULT ''    NULL,
-    [oper_ip]        nvarchar(128)  DEFAULT ''    NULL,
-    [oper_location]  nvarchar(255)  DEFAULT ''    NULL,
-    [oper_param]     nvarchar(2000) DEFAULT ''    NULL,
-    [json_result]    nvarchar(2000) DEFAULT ''    NULL,
-    [status]         int            DEFAULT ((0)) NULL,
-    [error_msg]      nvarchar(2000) DEFAULT ''    NULL,
-    [oper_time]      datetime2(7)                 NULL,
-    CONSTRAINT [PK__sys_oper__34723BF9BD954573] PRIMARY KEY CLUSTERED ([oper_id])
+    oper_id        bigint                       NOT NULL,
+    tenant_id      nvarchar(20)                 NOT NULL,
+    title          nvarchar(50)   DEFAULT ''    NULL,
+    business_type  int            DEFAULT ((0)) NULL,
+    method         nvarchar(100)  DEFAULT ''    NULL,
+    request_method nvarchar(10)   DEFAULT ''    NULL,
+    operator_type  int            DEFAULT ((0)) NULL,
+    oper_name      nvarchar(50)   DEFAULT ''    NULL,
+    dept_name      nvarchar(50)   DEFAULT ''    NULL,
+    oper_url       nvarchar(255)  DEFAULT ''    NULL,
+    oper_ip        nvarchar(128)  DEFAULT ''    NULL,
+    oper_location  nvarchar(255)  DEFAULT ''    NULL,
+    oper_param     nvarchar(2000) DEFAULT ''    NULL,
+    json_result    nvarchar(2000) DEFAULT ''    NULL,
+    status         int            DEFAULT ((0)) NULL,
+    error_msg      nvarchar(2000) DEFAULT ''    NULL,
+    oper_time      datetime2(7)                 NULL,
+    CONSTRAINT PK__sys_oper__34723BF9BD954573 PRIMARY KEY CLUSTERED (oper_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1397,6 +1716,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_oper_log',
     'COLUMN', N'oper_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_oper_log',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'妯″潡鏍囬' ,
@@ -1494,20 +1819,21 @@
     'TABLE', N'sys_oper_log'
 GO
 
-CREATE TABLE [sys_post]
+CREATE TABLE sys_post
 (
-    [post_id]     bigint                  NOT NULL,
-    [post_code]   nvarchar(64)            NOT NULL,
-    [post_name]   nvarchar(50)            NOT NULL,
-    [post_sort]   int                     NOT NULL,
-    [status]      nchar(1)                NOT NULL,
-    [create_dept] bigint                  NOT NULL,
-    [create_by]   bigint                  NOT NULL,
-    [create_time] datetime2(7)            NULL,
-    [update_by]   bigint                  NOT NULL,
-    [update_time] datetime2(7)            NULL,
-    [remark]      nvarchar(500)           NULL,
-    CONSTRAINT [PK__sys_post__3ED7876668E2D081] PRIMARY KEY CLUSTERED ([post_id])
+    post_id     bigint                  NOT NULL,
+    tenant_id   nvarchar(20)            NOT NULL,
+    post_code   nvarchar(64)            NOT NULL,
+    post_name   nvarchar(50)            NOT NULL,
+    post_sort   int                     NOT NULL,
+    status      nchar(1)                NOT NULL,
+    create_dept bigint                  NOT NULL,
+    create_by   bigint                  NOT NULL,
+    create_time datetime2(7)            NULL,
+    update_by   bigint                  NOT NULL,
+    update_time datetime2(7)            NULL,
+    remark      nvarchar(500)           NULL,
+    CONSTRAINT PK__sys_post__3ED7876668E2D081 PRIMARY KEY CLUSTERED (post_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1519,6 +1845,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_post',
     'COLUMN', N'post_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_post',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'宀椾綅缂栫爜' ,
@@ -1586,33 +1918,34 @@
     'TABLE', N'sys_post'
 GO
 
-INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'ceo', N'钁d簨闀�', 1, N'0', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_post VALUES (1, N'000000', N'ceo', N'钁d簨闀�', 1, N'0', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'se', N'椤圭洰缁忕悊', 2, N'0', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_post VALUES (2, N'000000', N'se', N'椤圭洰缁忕悊', 2, N'0', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, N'hr', N'浜哄姏璧勬簮', 3, N'0', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_post VALUES (3, N'000000', N'hr', N'浜哄姏璧勬簮', 3, N'0', 103, 1, getdate(), NULL, NULL, N'')
 GO
-INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, N'user', N'鏅�氬憳宸�', 4, N'0', 103, 1, getdate(), NULL, NULL, N'')
+INSERT sys_post VALUES (4, N'000000', N'user', N'鏅�氬憳宸�', 4, N'0', 103, 1, getdate(), NULL, NULL, N'')
 GO
 
-CREATE TABLE [sys_role]
+CREATE TABLE sys_role
 (
-    [role_id]             bigint                     NOT NULL,
-    [role_name]           nvarchar(30)               NOT NULL,
-    [role_key]            nvarchar(100)              NOT NULL,
-    [role_sort]           int                        NOT NULL,
-    [data_scope]          nchar(1)     DEFAULT ('1') NULL,
-    [menu_check_strictly] tinyint      DEFAULT ((1)) NULL,
-    [dept_check_strictly] tinyint      DEFAULT ((1)) NULL,
-    [status]              nchar(1)                   NOT NULL,
-    [del_flag]            nchar(1)     DEFAULT ('0') NULL,
-    [create_dept]         bigint                     NULL,
-    [create_by]           bigint                     NULL,
-    [create_time]         datetime2(7)               NULL,
-    [update_by]           bigint                     NULL,
-    [update_time]         datetime2(7)               NULL,
-    [remark]              nvarchar(500)              NULL,
-    CONSTRAINT [PK__sys_role__760965CCF9383145] PRIMARY KEY CLUSTERED ([role_id])
+    role_id             bigint                     NOT NULL,
+    tenant_id           nvarchar(20)               NOT NULL,
+    role_name           nvarchar(30)               NOT NULL,
+    role_key            nvarchar(100)              NOT NULL,
+    role_sort           int                        NOT NULL,
+    data_scope          nchar(1)     DEFAULT ('1') NULL,
+    menu_check_strictly tinyint      DEFAULT ((1)) NULL,
+    dept_check_strictly tinyint      DEFAULT ((1)) NULL,
+    status              nchar(1)                   NOT NULL,
+    del_flag            nchar(1)     DEFAULT ('0') NULL,
+    create_dept         bigint                     NULL,
+    create_by           bigint                     NULL,
+    create_time         datetime2(7)               NULL,
+    update_by           bigint                     NULL,
+    update_time         datetime2(7)               NULL,
+    remark              nvarchar(500)              NULL,
+    CONSTRAINT PK__sys_role__760965CCF9383145 PRIMARY KEY CLUSTERED (role_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1624,6 +1957,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_role',
     'COLUMN', N'role_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_role',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'瑙掕壊鍚嶇О' ,
@@ -1715,16 +2054,16 @@
     'TABLE', N'sys_role'
 GO
 
-INSERT [sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'瓒呯骇绠$悊鍛�', N'admin', 1, N'1', 1, 1, N'0', N'0', 103, 1, getdate(), NULL, NULL, N'瓒呯骇绠$悊鍛�')
+INSERT sys_role VALUES (1, N'000000', N'瓒呯骇绠$悊鍛�', N'superadmin', 1, N'1', 1, 1, N'0', N'0', 103, 1, getdate(), NULL, NULL, N'瓒呯骇绠$悊鍛�')
 GO
-INSERT [sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'鏅�氳鑹�', N'common', 2, N'2', 1, 1, N'0', N'0', 103, 1, getdate(), 1, CAST(N'2021-12-04T15:44:20.0000000' AS DateTime2), N'鏅�氳鑹�')
+INSERT sys_role VALUES (2, N'000000', N'鏅�氳鑹�', N'common', 2, N'2', 1, 1, N'0', N'0', 103, 1, getdate(), NULL, NULL, N'鏅�氳鑹�')
 GO
 
-CREATE TABLE [sys_role_dept]
+CREATE TABLE sys_role_dept
 (
-    [role_id] bigint NOT NULL,
-    [dept_id] bigint NOT NULL,
-    CONSTRAINT [PK__sys_role__2BC3005BABBCA08A] PRIMARY KEY CLUSTERED ([role_id], [dept_id])
+    role_id bigint NOT NULL,
+    dept_id bigint NOT NULL,
+    CONSTRAINT PK__sys_role__2BC3005BABBCA08A PRIMARY KEY CLUSTERED (role_id, dept_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1749,18 +2088,18 @@
     'TABLE', N'sys_role_dept'
 GO
 
-INSERT [sys_role_dept] ([role_id], [dept_id]) VALUES (2, 100)
+INSERT sys_role_dept VALUES (2, 100)
 GO
-INSERT [sys_role_dept] ([role_id], [dept_id]) VALUES (2, 101)
+INSERT sys_role_dept VALUES (2, 101)
 GO
-INSERT [sys_role_dept] ([role_id], [dept_id]) VALUES (2, 105)
+INSERT sys_role_dept VALUES (2, 105)
 GO
 
-CREATE TABLE [sys_role_menu]
+CREATE TABLE sys_role_menu
 (
-    [role_id] bigint NOT NULL,
-    [menu_id] bigint NOT NULL,
-    CONSTRAINT [PK__sys_role__A2C36A6187BA4B17] PRIMARY KEY CLUSTERED ([role_id], [menu_id])
+    role_id bigint NOT NULL,
+    menu_id bigint NOT NULL,
+    CONSTRAINT PK__sys_role__A2C36A6187BA4B17 PRIMARY KEY CLUSTERED (role_id, menu_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1785,194 +2124,195 @@
     'TABLE', N'sys_role_menu'
 GO
 
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1)
+INSERT sys_role_menu VALUES (2, 1)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 2)
+INSERT sys_role_menu VALUES (2, 2)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 3)
+INSERT sys_role_menu VALUES (2, 3)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 100)
+INSERT sys_role_menu VALUES (2, 100)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 101)
+INSERT sys_role_menu VALUES (2, 101)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 102)
+INSERT sys_role_menu VALUES (2, 102)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 103)
+INSERT sys_role_menu VALUES (2, 103)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 104)
+INSERT sys_role_menu VALUES (2, 104)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 105)
+INSERT sys_role_menu VALUES (2, 105)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 106)
+INSERT sys_role_menu VALUES (2, 106)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 107)
+INSERT sys_role_menu VALUES (2, 107)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 108)
+INSERT sys_role_menu VALUES (2, 108)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 109)
+INSERT sys_role_menu VALUES (2, 109)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 110)
+INSERT sys_role_menu VALUES (2, 110)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 111)
+INSERT sys_role_menu VALUES (2, 111)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 112)
+INSERT sys_role_menu VALUES (2, 112)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 113)
+INSERT sys_role_menu VALUES (2, 113)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 114)
+INSERT sys_role_menu VALUES (2, 114)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 115)
+INSERT sys_role_menu VALUES (2, 115)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 116)
+INSERT sys_role_menu VALUES (2, 116)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 500)
+INSERT sys_role_menu VALUES (2, 500)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 501)
+INSERT sys_role_menu VALUES (2, 501)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1001)
+INSERT sys_role_menu VALUES (2, 1001)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1002)
+INSERT sys_role_menu VALUES (2, 1002)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1003)
+INSERT sys_role_menu VALUES (2, 1003)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1004)
+INSERT sys_role_menu VALUES (2, 1004)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1005)
+INSERT sys_role_menu VALUES (2, 1005)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1006)
+INSERT sys_role_menu VALUES (2, 1006)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1007)
+INSERT sys_role_menu VALUES (2, 1007)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1008)
+INSERT sys_role_menu VALUES (2, 1008)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1009)
+INSERT sys_role_menu VALUES (2, 1009)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1010)
+INSERT sys_role_menu VALUES (2, 1010)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1011)
+INSERT sys_role_menu VALUES (2, 1011)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1012)
+INSERT sys_role_menu VALUES (2, 1012)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1013)
+INSERT sys_role_menu VALUES (2, 1013)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1014)
+INSERT sys_role_menu VALUES (2, 1014)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1015)
+INSERT sys_role_menu VALUES (2, 1015)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1016)
+INSERT sys_role_menu VALUES (2, 1016)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1017)
+INSERT sys_role_menu VALUES (2, 1017)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1018)
+INSERT sys_role_menu VALUES (2, 1018)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1019)
+INSERT sys_role_menu VALUES (2, 1019)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1020)
+INSERT sys_role_menu VALUES (2, 1020)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1021)
+INSERT sys_role_menu VALUES (2, 1021)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1022)
+INSERT sys_role_menu VALUES (2, 1022)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1023)
+INSERT sys_role_menu VALUES (2, 1023)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1024)
+INSERT sys_role_menu VALUES (2, 1024)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1025)
+INSERT sys_role_menu VALUES (2, 1025)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1026)
+INSERT sys_role_menu VALUES (2, 1026)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1027)
+INSERT sys_role_menu VALUES (2, 1027)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1028)
+INSERT sys_role_menu VALUES (2, 1028)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1029)
+INSERT sys_role_menu VALUES (2, 1029)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1030)
+INSERT sys_role_menu VALUES (2, 1030)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1031)
+INSERT sys_role_menu VALUES (2, 1031)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1032)
+INSERT sys_role_menu VALUES (2, 1032)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1033)
+INSERT sys_role_menu VALUES (2, 1033)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1034)
+INSERT sys_role_menu VALUES (2, 1034)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1035)
+INSERT sys_role_menu VALUES (2, 1035)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1036)
+INSERT sys_role_menu VALUES (2, 1036)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1037)
+INSERT sys_role_menu VALUES (2, 1037)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1038)
+INSERT sys_role_menu VALUES (2, 1038)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1039)
+INSERT sys_role_menu VALUES (2, 1039)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1040)
+INSERT sys_role_menu VALUES (2, 1040)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1041)
+INSERT sys_role_menu VALUES (2, 1041)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1042)
+INSERT sys_role_menu VALUES (2, 1042)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1043)
+INSERT sys_role_menu VALUES (2, 1043)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1044)
+INSERT sys_role_menu VALUES (2, 1044)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1045)
+INSERT sys_role_menu VALUES (2, 1045)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1046)
+INSERT sys_role_menu VALUES (2, 1046)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1047)
+INSERT sys_role_menu VALUES (2, 1047)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1048)
+INSERT sys_role_menu VALUES (2, 1048)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1049)
+INSERT sys_role_menu VALUES (2, 1049)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1050)
+INSERT sys_role_menu VALUES (2, 1050)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1051)
+INSERT sys_role_menu VALUES (2, 1051)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1052)
+INSERT sys_role_menu VALUES (2, 1052)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1053)
+INSERT sys_role_menu VALUES (2, 1053)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1054)
+INSERT sys_role_menu VALUES (2, 1054)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1055)
+INSERT sys_role_menu VALUES (2, 1055)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1056)
+INSERT sys_role_menu VALUES (2, 1056)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1057)
+INSERT sys_role_menu VALUES (2, 1057)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1058)
+INSERT sys_role_menu VALUES (2, 1058)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1059)
+INSERT sys_role_menu VALUES (2, 1059)
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (2, 1060)
+INSERT sys_role_menu VALUES (2, 1060)
 GO
 
-CREATE TABLE [sys_user]
+CREATE TABLE sys_user
 (
-    [user_id]     bigint                             NOT NULL,
-    [dept_id]     bigint                             NULL,
-    [user_name]   nvarchar(30)                       NOT NULL,
-    [nick_name]   nvarchar(30)                       NOT NULL,
-    [user_type]   nvarchar(10)  DEFAULT ('sys_user') NULL,
-    [email]       nvarchar(50)  DEFAULT ''           NULL,
-    [phonenumber] nvarchar(11)  DEFAULT ''           NULL,
-    [sex]         nchar(1)      DEFAULT ('0')        NULL,
-    [avatar]      bigint                             NULL,
-    [password]    nvarchar(100) DEFAULT ''           NULL,
-    [status]      nchar(1)      DEFAULT ('0')        NULL,
-    [del_flag]    nchar(1)      DEFAULT ('0')        NULL,
-    [login_ip]    nvarchar(128) DEFAULT ''           NULL,
-    [login_date]  datetime2(7)                       NULL,
-    [create_dept] bigint                             NULL,
-    [create_by]   bigint                             NULL,
-    [create_time] datetime2(7)                       NULL,
-    [update_by]   bigint                             NULL,
-    [update_time] datetime2(7)                       NULL,
-    [remark]      nvarchar(500)                      NULL,
-    CONSTRAINT [PK__sys_user__B9BE370F79170B6A] PRIMARY KEY CLUSTERED ([user_id])
+    user_id     bigint                             NOT NULL,
+    tenant_id   nvarchar(20)                       NOT NULL,
+    dept_id     bigint                             NULL,
+    user_name   nvarchar(30)                       NOT NULL,
+    nick_name   nvarchar(30)                       NOT NULL,
+    user_type   nvarchar(10)  DEFAULT ('sys_user') NULL,
+    email       nvarchar(50)  DEFAULT ''           NULL,
+    phonenumber nvarchar(11)  DEFAULT ''           NULL,
+    sex         nchar(1)      DEFAULT ('0')        NULL,
+    avatar      bigint                             NULL,
+    password    nvarchar(100) DEFAULT ''           NULL,
+    status      nchar(1)      DEFAULT ('0')        NULL,
+    del_flag    nchar(1)      DEFAULT ('0')        NULL,
+    login_ip    nvarchar(128) DEFAULT ''           NULL,
+    login_date  datetime2(7)                       NULL,
+    create_dept bigint                             NULL,
+    create_by   bigint                             NULL,
+    create_time datetime2(7)                       NULL,
+    update_by   bigint                             NULL,
+    update_time datetime2(7)                       NULL,
+    remark      nvarchar(500)                      NULL,
+    CONSTRAINT PK__sys_user__B9BE370F79170B6A PRIMARY KEY CLUSTERED (user_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -1984,6 +2324,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_user',
     'COLUMN', N'user_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_user',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sys.sp_addextendedproperty
     'MS_Description', N'閮ㄩ棬ID' ,
@@ -2105,16 +2451,16 @@
     'TABLE', N'sys_user'
 GO
 
-INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, 103, N'admin', N'鐤媯鐨勭嫯瀛怢i', N'sys_user', N'crazyLionLi@163.com', N'15888888888', N'1', NULL, N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, getdate(), N'绠$悊鍛�')
+INSERT sys_user VALUES (1, 103, N'000000', N'admin', N'鐤媯鐨勭嫯瀛怢i', N'sys_user', N'crazyLionLi@163.com', N'15888888888', N'1', NULL, N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, NULL, N'绠$悊鍛�')
 GO
-INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, 105, N'ry', N'鐤媯鐨勭嫯瀛怢i', N'sys_user', N'crazyLionLi@qq.com', N'15666666666', N'1', NULL, N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 1, getdate(), N'娴嬭瘯鍛�')
+INSERT sys_user VALUES (2, 105, N'000000', N'lionli', N'鐤媯鐨勭嫯瀛怢i', N'sys_user', N'crazyLionLi@qq.com', N'15666666666', N'1', NULL, N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, NULL, N'娴嬭瘯鍛�')
 GO
 
-CREATE TABLE [sys_user_post]
+CREATE TABLE sys_user_post
 (
-    [user_id] bigint NOT NULL,
-    [post_id] bigint NOT NULL,
-    CONSTRAINT [PK__sys_user__CA534F799C04589B] PRIMARY KEY CLUSTERED ([user_id], [post_id])
+    user_id bigint NOT NULL,
+    post_id bigint NOT NULL,
+    CONSTRAINT PK__sys_user__CA534F799C04589B PRIMARY KEY CLUSTERED (user_id, post_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -2139,16 +2485,16 @@
     'TABLE', N'sys_user_post'
 GO
 
-INSERT [sys_user_post] ([user_id], [post_id]) VALUES (1, 1)
+INSERT sys_user_post VALUES (1, 1)
 GO
-INSERT [sys_user_post] ([user_id], [post_id]) VALUES (2, 2)
+INSERT sys_user_post VALUES (2, 2)
 GO
 
-CREATE TABLE [sys_user_role]
+CREATE TABLE sys_user_role
 (
-    [user_id] bigint NOT NULL,
-    [role_id] bigint NOT NULL,
-    CONSTRAINT [PK__sys_user__6EDEA153FB34D8F0] PRIMARY KEY CLUSTERED ([user_id], [role_id])
+    user_id bigint NOT NULL,
+    role_id bigint NOT NULL,
+    CONSTRAINT PK__sys_user__6EDEA153FB34D8F0 PRIMARY KEY CLUSTERED (user_id, role_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -2173,25 +2519,26 @@
     'TABLE', N'sys_user_role'
 GO
 
-INSERT [sys_user_role] ([user_id], [role_id]) VALUES (1, 1)
+INSERT sys_user_role VALUES (1, 1)
 GO
-INSERT [sys_user_role] ([user_id], [role_id]) VALUES (2, 2)
+INSERT sys_user_role VALUES (2, 2)
 GO
 
-CREATE TABLE [sys_oss]
+CREATE TABLE sys_oss
 (
-    [oss_id]        bigint                          NOT NULL,
-    [file_name]     nvarchar(255) DEFAULT ''        NOT NULL,
-    [original_name] nvarchar(255) DEFAULT ''        NOT NULL,
-    [file_suffix]   nvarchar(10)  DEFAULT ''        NOT NULL,
-    [url]           nvarchar(500)                   NOT NULL,
-    [create_dept]   bigint                          NULL,
-    [create_time]   datetime2(7)                    NULL,
-    [create_by]     bigint                          NULL,
-    [update_time]   datetime2(7)                    NULL,
-    [update_by]     bigint                          NULL,
-    [service]       nvarchar(20)  DEFAULT ('minio') NOT NULL,
-    CONSTRAINT [PK__sys_oss__91241EA442389F0D] PRIMARY KEY CLUSTERED ([oss_id])
+    oss_id        bigint                          NOT NULL,
+    tenant_id     nvarchar(20)                    NOT NULL,
+    file_name     nvarchar(255) DEFAULT ''        NOT NULL,
+    original_name nvarchar(255) DEFAULT ''        NOT NULL,
+    file_suffix   nvarchar(10)  DEFAULT ''        NOT NULL,
+    url           nvarchar(500)                   NOT NULL,
+    create_dept   bigint                          NULL,
+    create_time   datetime2(7)                    NULL,
+    create_by     bigint                          NULL,
+    update_time   datetime2(7)                    NULL,
+    update_by     bigint                          NULL,
+    service       nvarchar(20)  DEFAULT ('minio') NOT NULL,
+    CONSTRAINT PK__sys_oss__91241EA442389F0D PRIMARY KEY CLUSTERED (oss_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -2203,6 +2550,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_oss',
     'COLUMN', N'oss_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_oss',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sp_addextendedproperty
     'MS_Description', N'鏂囦欢鍚�',
@@ -2270,28 +2623,29 @@
     'TABLE', N'sys_oss'
 GO
 
-CREATE TABLE [sys_oss_config]
+CREATE TABLE sys_oss_config
 (
-    [oss_config_id] bigint                      NOT NULL,
-    [config_key]    nvarchar(20)  DEFAULT ''    NOT NULL,
-    [access_key]    nvarchar(255) DEFAULT ''    NULL,
-    [secret_key]    nvarchar(255) DEFAULT ''    NULL,
-    [bucket_name]   nvarchar(255) DEFAULT ''    NULL,
-    [prefix]        nvarchar(255) DEFAULT ''    NULL,
-    [endpoint]      nvarchar(255) DEFAULT ''    NULL,
-    [domain]        nvarchar(255) DEFAULT ''    NULL,
-    [is_https]      nchar(1)      DEFAULT ('N') NULL,
-    [region]        nvarchar(255) DEFAULT ''    NULL,
-    [access_policy] nchar(1)      DEFAULT ('1') NOT NULL,
-    [status]        nchar(1)      DEFAULT ('1') NULL,
-    [ext1]          nvarchar(255) DEFAULT ''    NULL,
-    [create_dept]   bigint                      NULL,
-    [create_by]     bigint                      NULL,
-    [create_time]   datetime2(7)                NULL,
-    [update_by]     bigint                      NULL,
-    [update_time]   datetime2(7)                NULL,
-    [remark]        nvarchar(500)               NULL,
-    CONSTRAINT [PK__sys_oss___BFBDE87009ED2882] PRIMARY KEY CLUSTERED ([oss_config_id])
+    oss_config_id bigint                      NOT NULL,
+    tenant_id     nvarchar(20)                NOT NULL,
+    config_key    nvarchar(20)  DEFAULT ''    NOT NULL,
+    access_key    nvarchar(255) DEFAULT ''    NULL,
+    secret_key    nvarchar(255) DEFAULT ''    NULL,
+    bucket_name   nvarchar(255) DEFAULT ''    NULL,
+    prefix        nvarchar(255) DEFAULT ''    NULL,
+    endpoint      nvarchar(255) DEFAULT ''    NULL,
+    domain        nvarchar(255) DEFAULT ''    NULL,
+    is_https      nchar(1)      DEFAULT ('N') NULL,
+    region        nvarchar(255) DEFAULT ''    NULL,
+    access_policy nchar(1)      DEFAULT ('1') NOT NULL,
+    status        nchar(1)      DEFAULT ('1') NULL,
+    ext1          nvarchar(255) DEFAULT ''    NULL,
+    create_dept   bigint                      NULL,
+    create_by     bigint                      NULL,
+    create_time   datetime2(7)                NULL,
+    update_by     bigint                      NULL,
+    update_time   datetime2(7)                NULL,
+    remark        nvarchar(500)               NULL,
+    CONSTRAINT PK__sys_oss___BFBDE87009ED2882 PRIMARY KEY CLUSTERED (oss_config_id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -2303,6 +2657,12 @@
     'SCHEMA', N'dbo',
     'TABLE', N'sys_oss_config',
     'COLUMN', N'oss_config_id'
+GO
+EXEC sys.sp_addextendedproperty
+    'MS_Description', N'绉熸埛缂栧彿' ,
+    'SCHEMA', N'dbo',
+    'TABLE', N'sys_oss_config',
+    'COLUMN', N'tenant_id'
 GO
 EXEC sp_addextendedproperty
     'MS_Description', N'閰嶇疆key',
@@ -2418,13 +2778,13 @@
     'TABLE', N'sys_oss_config'
 GO
 
-INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'minio', N'ruoyi',            N'ruoyi123',        N'ruoyi',            N'', N'127.0.0.1:9000',                    N'',N'N', N'',           N'1', N'0', N'', 103, 1, getdate(), 1, getdate(), NULL)
+INSERT INTO sys_oss_config VALUES (N'1', N'000000', N'minio', N'ruoyi',            N'ruoyi123',        N'ruoyi',            N'', N'127.0.0.1:9000',                    N'',N'N', N'',           N'1', N'0', N'', 103, 1, getdate(), 1, getdate(), NULL)
 GO
-INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'qiniu', N'XXXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi',            N'', N's3-cn-north-1.qiniucs.com',         N'',N'N', N'',           N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
+INSERT INTO sys_oss_config VALUES (N'2', N'000000', N'qiniu', N'XXXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi',            N'', N's3-cn-north-1.qiniucs.com',         N'',N'N', N'',           N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
 GO
-INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'aliyun', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi',            N'', N'oss-cn-beijing.aliyuncs.com',       N'',N'N', N'',           N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
+INSERT INTO sys_oss_config VALUES (N'3', N'000000', N'aliyun', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi',            N'', N'oss-cn-beijing.aliyuncs.com',       N'',N'N', N'',           N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
 GO
-INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'qcloud', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi-1250000000', N'', N'cos.ap-beijing.myqcloud.com',       N'',N'N', N'ap-beijing', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
+INSERT INTO sys_oss_config VALUES (N'4', N'000000', N'qcloud', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi-1250000000', N'', N'cos.ap-beijing.myqcloud.com',       N'',N'N', N'ap-beijing', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
 GO
-INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'5', N'image',  N'ruoyi',           N'ruoyi123',        N'ruoyi',            N'image', N'127.0.0.1:9000',               N'',N'N', N'',           N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
+INSERT INTO sys_oss_config VALUES (N'5', N'000000', N'image',  N'ruoyi',           N'ruoyi123',        N'ruoyi',            N'image', N'127.0.0.1:9000',               N'',N'N', N'',           N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
 GO
diff --git a/script/sql/sqlserver/sqlserver_test.sql b/script/sql/sqlserver/sqlserver_test.sql
index be51bb0..6fe5c0b 100644
--- a/script/sql/sqlserver/sqlserver_test.sql
+++ b/script/sql/sqlserver/sqlserver_test.sql
@@ -1,19 +1,19 @@
-CREATE TABLE [test_demo]
+CREATE TABLE test_demo
 (
-    [id]          bigint            NOT NULL,
-    [dept_id]     bigint            NULL,
-    [user_id]     bigint            NULL,
-    [order_num]   int DEFAULT ((0)) NULL,
-    [test_key]    nvarchar(255)     NULL,
-    [value]       nvarchar(255)     NULL,
-    [version]     int DEFAULT ((0)) NULL,
-    [create_dept] bigint            NULL,
-    [create_time] datetime2(0)      NULL,
-    [create_by]   bigint            NULL,
-    [update_time] datetime2(0)      NULL,
-    [update_by]   bigint            NULL,
-    [del_flag]    int DEFAULT ((0)) NULL,
-    CONSTRAINT [PK__test_dem__3213E83F176051C8] PRIMARY KEY CLUSTERED ([id])
+    id          bigint            NOT NULL,
+    dept_id     bigint            NULL,
+    user_id     bigint            NULL,
+    order_num   int DEFAULT ((0)) NULL,
+    test_key    nvarchar(255)     NULL,
+    value       nvarchar(255)     NULL,
+    version     int DEFAULT ((0)) NULL,
+    create_dept bigint            NULL,
+    create_time datetime2(0)      NULL,
+    create_by   bigint            NULL,
+    update_time datetime2(0)      NULL,
+    update_by   bigint            NULL,
+    del_flag    int DEFAULT ((0)) NULL,
+    CONSTRAINT PK__test_dem__3213E83F176051C8 PRIMARY KEY CLUSTERED (id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -117,21 +117,21 @@
      'TABLE', N'test_demo'
 GO
 
-CREATE TABLE [test_tree]
+CREATE TABLE test_tree
 (
-    [id]          bigint               NOT NULL,
-    [parent_id]   bigint DEFAULT ((0)) NULL,
-    [dept_id]     bigint               NULL,
-    [user_id]     bigint               NULL,
-    [tree_name]   nvarchar(255)        NULL,
-    [version]     int    DEFAULT ((0)) NULL,
-    [create_dept] bigint               NULL,
-    [create_time] datetime2(0)         NULL,
-    [create_by]   bigint               NULL,
-    [update_time] datetime2(0)         NULL,
-    [update_by]   bigint               NULL,
-    [del_flag]    int    DEFAULT ((0)) NULL,
-    CONSTRAINT [PK__test_tre__3213E83FC75A1B63] PRIMARY KEY CLUSTERED ([id])
+    id          bigint               NOT NULL,
+    parent_id   bigint DEFAULT ((0)) NULL,
+    dept_id     bigint               NULL,
+    user_id     bigint               NULL,
+    tree_name   nvarchar(255)        NULL,
+    version     int    DEFAULT ((0)) NULL,
+    create_dept bigint               NULL,
+    create_time datetime2(0)         NULL,
+    create_by   bigint               NULL,
+    update_time datetime2(0)         NULL,
+    update_by   bigint               NULL,
+    del_flag    int    DEFAULT ((0)) NULL,
+    CONSTRAINT PK__test_tre__3213E83FC75A1B63 PRIMARY KEY CLUSTERED (id)
         WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
         ON [PRIMARY]
 )
@@ -228,267 +228,267 @@
      'TABLE', N'test_tree'
 GO
 
-INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, 108, N'test', N'鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', N'sys_user', N'', N'', N'0', N'', N'$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 3, getdate(), NULL);
+INSERT sys_user VALUES (3, 108, N'test', N'鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', N'sys_user', N'', N'', N'0', NULL, N'$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 3, getdate(), NULL);
 GO
-INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, 102, N'test1', N'浠呮湰浜� 瀵嗙爜666666', N'sys_user', N'', N'', N'0', N'', N'$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 4, getdate(), NULL);
+INSERT sys_user VALUES (4, 102, N'test1', N'浠呮湰浜� 瀵嗙爜666666', N'sys_user', N'', N'', N'0', NULL, N'$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 4, getdate(), NULL);
 GO
 
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (5, N'娴嬭瘯鑿滃崟', 0, 5, N'demo', NULL, 1, 0, N'M', N'0', N'0', NULL, N'star', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (5, N'娴嬭瘯鑿滃崟', 0, 5, N'demo', NULL, 1, 0, N'M', N'0', N'0', NULL, N'star', 103, 1, getdate(), NULL, NULL, N'');
 GO
 
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1500, N'娴嬭瘯鍗曡〃', 5, 1, N'demo', N'demo/demo/index', 1, 0, N'C', N'0', N'0', N'demo:demo:list', N'#', 103, 1, getdate(), NULL, NULL, N'娴嬭瘯鍗曡〃鑿滃崟');
+INSERT sys_menu VALUES (1500, N'娴嬭瘯鍗曡〃', 5, 1, N'demo', N'demo/demo/index', 1, 0, N'C', N'0', N'0', N'demo:demo:list', N'#', 103, 1, getdate(), NULL, NULL, N'娴嬭瘯鍗曡〃鑿滃崟');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1501, N'娴嬭瘯鍗曡〃鏌ヨ', 1500, 1, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1501, N'娴嬭瘯鍗曡〃鏌ヨ', 1500, 1, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1502, N'娴嬭瘯鍗曡〃鏂板', 1500, 2, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1502, N'娴嬭瘯鍗曡〃鏂板', 1500, 2, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1503, N'娴嬭瘯鍗曡〃淇敼', 1500, 3, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1503, N'娴嬭瘯鍗曡〃淇敼', 1500, 3, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1504, N'娴嬭瘯鍗曡〃鍒犻櫎', 1500, 4, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1504, N'娴嬭瘯鍗曡〃鍒犻櫎', 1500, 4, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1505, N'娴嬭瘯鍗曡〃瀵煎嚭', 1500, 5, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:export', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1505, N'娴嬭瘯鍗曡〃瀵煎嚭', 1500, 5, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:demo:export', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
 
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1506, N'娴嬭瘯鏍戣〃', 5, 1, N'tree', N'demo/tree/index', 1, 0, N'C', N'0', N'0', N'demo:tree:list', N'#', 103, 1, getdate(), NULL, NULL, N'娴嬭瘯鏍戣〃鑿滃崟');
+INSERT sys_menu VALUES (1506, N'娴嬭瘯鏍戣〃', 5, 1, N'tree', N'demo/tree/index', 1, 0, N'C', N'0', N'0', N'demo:tree:list', N'#', 103, 1, getdate(), NULL, NULL, N'娴嬭瘯鏍戣〃鑿滃崟');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1507, N'娴嬭瘯鏍戣〃鏌ヨ', 1506, 1, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1507, N'娴嬭瘯鏍戣〃鏌ヨ', 1506, 1, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:query', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1508, N'娴嬭瘯鏍戣〃鏂板', 1506, 2, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1508, N'娴嬭瘯鏍戣〃鏂板', 1506, 2, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:add', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1509, N'娴嬭瘯鏍戣〃淇敼', 1506, 3, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1509, N'娴嬭瘯鏍戣〃淇敼', 1506, 3, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:edit', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1510, N'娴嬭瘯鏍戣〃鍒犻櫎', 1506, 4, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1510, N'娴嬭瘯鏍戣〃鍒犻櫎', 1506, 4, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:remove', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
-INSERT [sys_menu] ([menu_id], [menu_name], [parent_id], [order_num], [path], [component], [is_frame], [is_cache], [menu_type], [visible], [status], [perms], [icon], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1511, N'娴嬭瘯鏍戣〃瀵煎嚭', 1506, 5, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:export', N'#', 103, 1, getdate(), NULL, NULL, N'');
+INSERT sys_menu VALUES (1511, N'娴嬭瘯鏍戣〃瀵煎嚭', 1506, 5, N'#', N'', 1, 0, N'F', N'0', N'0', N'demo:tree:export', N'#', 103, 1, getdate(), NULL, NULL, N'');
 GO
 
-INSERT [sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, N'鏈儴闂ㄥ強浠ヤ笅', N'test1', 3, N'4', 1, 1, N'0', N'0', 103, 1, getdate(), 1, NULL, NULL);
+INSERT sys_role VALUES (3, N'鏈儴闂ㄥ強浠ヤ笅', N'test1', 3, N'4', 1, 1, N'0', N'0', 103, 1, getdate(), 1, NULL, NULL);
 GO
-INSERT [sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, N'浠呮湰浜�', N'test2', 4, N'5', 1, 1, N'0', N'0', 103, 1, getdate(), 1, NULL, NULL);
+INSERT sys_role VALUES (4, N'浠呮湰浜�', N'test2', 4, N'5', 1, 1, N'0', N'0', 103, 1, getdate(), 1, NULL, NULL);
 GO
 
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1);
+INSERT sys_role_menu VALUES (3, 1);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 5);
+INSERT sys_role_menu VALUES (3, 5);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 100);
+INSERT sys_role_menu VALUES (3, 100);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 101);
+INSERT sys_role_menu VALUES (3, 101);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 102);
+INSERT sys_role_menu VALUES (3, 102);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 103);
+INSERT sys_role_menu VALUES (3, 103);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 104);
+INSERT sys_role_menu VALUES (3, 104);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 105);
+INSERT sys_role_menu VALUES (3, 105);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 106);
+INSERT sys_role_menu VALUES (3, 106);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 107);
+INSERT sys_role_menu VALUES (3, 107);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 108);
+INSERT sys_role_menu VALUES (3, 108);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 500);
+INSERT sys_role_menu VALUES (3, 500);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 501);
+INSERT sys_role_menu VALUES (3, 501);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1001);
+INSERT sys_role_menu VALUES (3, 1001);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1002);
+INSERT sys_role_menu VALUES (3, 1002);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1003);
+INSERT sys_role_menu VALUES (3, 1003);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1004);
+INSERT sys_role_menu VALUES (3, 1004);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1005);
+INSERT sys_role_menu VALUES (3, 1005);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1006);
+INSERT sys_role_menu VALUES (3, 1006);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1007);
+INSERT sys_role_menu VALUES (3, 1007);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1008);
+INSERT sys_role_menu VALUES (3, 1008);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1009);
+INSERT sys_role_menu VALUES (3, 1009);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1010);
+INSERT sys_role_menu VALUES (3, 1010);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1011);
+INSERT sys_role_menu VALUES (3, 1011);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1012);
+INSERT sys_role_menu VALUES (3, 1012);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1013);
+INSERT sys_role_menu VALUES (3, 1013);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1014);
+INSERT sys_role_menu VALUES (3, 1014);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1015);
+INSERT sys_role_menu VALUES (3, 1015);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1016);
+INSERT sys_role_menu VALUES (3, 1016);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1017);
+INSERT sys_role_menu VALUES (3, 1017);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1018);
+INSERT sys_role_menu VALUES (3, 1018);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1019);
+INSERT sys_role_menu VALUES (3, 1019);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1020);
+INSERT sys_role_menu VALUES (3, 1020);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1021);
+INSERT sys_role_menu VALUES (3, 1021);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1022);
+INSERT sys_role_menu VALUES (3, 1022);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1023);
+INSERT sys_role_menu VALUES (3, 1023);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1024);
+INSERT sys_role_menu VALUES (3, 1024);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1025);
+INSERT sys_role_menu VALUES (3, 1025);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1026);
+INSERT sys_role_menu VALUES (3, 1026);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1027);
+INSERT sys_role_menu VALUES (3, 1027);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1028);
+INSERT sys_role_menu VALUES (3, 1028);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1029);
+INSERT sys_role_menu VALUES (3, 1029);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1030);
+INSERT sys_role_menu VALUES (3, 1030);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1031);
+INSERT sys_role_menu VALUES (3, 1031);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1032);
+INSERT sys_role_menu VALUES (3, 1032);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1033);
+INSERT sys_role_menu VALUES (3, 1033);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1034);
+INSERT sys_role_menu VALUES (3, 1034);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1035);
+INSERT sys_role_menu VALUES (3, 1035);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1036);
+INSERT sys_role_menu VALUES (3, 1036);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1037);
+INSERT sys_role_menu VALUES (3, 1037);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1038);
+INSERT sys_role_menu VALUES (3, 1038);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1039);
+INSERT sys_role_menu VALUES (3, 1039);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1040);
+INSERT sys_role_menu VALUES (3, 1040);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1041);
+INSERT sys_role_menu VALUES (3, 1041);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1042);
+INSERT sys_role_menu VALUES (3, 1042);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1043);
+INSERT sys_role_menu VALUES (3, 1043);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1044);
+INSERT sys_role_menu VALUES (3, 1044);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1045);
+INSERT sys_role_menu VALUES (3, 1045);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1500);
+INSERT sys_role_menu VALUES (3, 1500);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1501);
+INSERT sys_role_menu VALUES (3, 1501);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1502);
+INSERT sys_role_menu VALUES (3, 1502);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1503);
+INSERT sys_role_menu VALUES (3, 1503);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1504);
+INSERT sys_role_menu VALUES (3, 1504);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1505);
+INSERT sys_role_menu VALUES (3, 1505);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1506);
+INSERT sys_role_menu VALUES (3, 1506);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1507);
+INSERT sys_role_menu VALUES (3, 1507);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1508);
+INSERT sys_role_menu VALUES (3, 1508);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1509);
+INSERT sys_role_menu VALUES (3, 1509);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1510);
+INSERT sys_role_menu VALUES (3, 1510);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (3, 1511);
+INSERT sys_role_menu VALUES (3, 1511);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 5);
+INSERT sys_role_menu VALUES (4, 5);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1500);
+INSERT sys_role_menu VALUES (4, 1500);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1501);
+INSERT sys_role_menu VALUES (4, 1501);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1502);
+INSERT sys_role_menu VALUES (4, 1502);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1503);
+INSERT sys_role_menu VALUES (4, 1503);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1504);
+INSERT sys_role_menu VALUES (4, 1504);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1505);
+INSERT sys_role_menu VALUES (4, 1505);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1506);
+INSERT sys_role_menu VALUES (4, 1506);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1507);
+INSERT sys_role_menu VALUES (4, 1507);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1508);
+INSERT sys_role_menu VALUES (4, 1508);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1509);
+INSERT sys_role_menu VALUES (4, 1509);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1510);
+INSERT sys_role_menu VALUES (4, 1510);
 GO
-INSERT [sys_role_menu] ([role_id], [menu_id]) VALUES (4, 1511);
+INSERT sys_role_menu VALUES (4, 1511);
 GO
 
-INSERT [sys_user_role] ([user_id], [role_id]) VALUES (3, 3);
+INSERT sys_user_role VALUES (3, 3);
 GO
-INSERT [sys_user_role] ([user_id], [role_id]) VALUES (4, 4);
+INSERT sys_user_role VALUES (4, 4);
 GO
 
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (1, 102, 4, 1, N'娴嬭瘯鏁版嵁鏉冮檺', N'娴嬭瘯', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (1, 102, 4, 1, N'娴嬭瘯鏁版嵁鏉冮檺', N'娴嬭瘯', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (2, 102, 3, 2, N'瀛愯妭鐐�1', N'111', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (2, 102, 3, 2, N'瀛愯妭鐐�1', N'111', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (3, 102, 3, 3, N'瀛愯妭鐐�2', N'222', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (3, 102, 3, 3, N'瀛愯妭鐐�2', N'222', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (4, 108, 4, 4, N'娴嬭瘯鏁版嵁', N'demo', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (4, 108, 4, 4, N'娴嬭瘯鏁版嵁', N'demo', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (5, 108, 3, 13, N'瀛愯妭鐐�11', N'1111', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (5, 108, 3, 13, N'瀛愯妭鐐�11', N'1111', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (6, 108, 3, 12, N'瀛愯妭鐐�22', N'2222', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (6, 108, 3, 12, N'瀛愯妭鐐�22', N'2222', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (7, 108, 3, 11, N'瀛愯妭鐐�33', N'3333', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (7, 108, 3, 11, N'瀛愯妭鐐�33', N'3333', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (8, 108, 3, 10, N'瀛愯妭鐐�44', N'4444', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (8, 108, 3, 10, N'瀛愯妭鐐�44', N'4444', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (9, 108, 3, 9, N'瀛愯妭鐐�55', N'5555', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (9, 108, 3, 9, N'瀛愯妭鐐�55', N'5555', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (10, 108, 3, 8, N'瀛愯妭鐐�66', N'6666', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (10, 108, 3, 8, N'瀛愯妭鐐�66', N'6666', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (11, 108, 3, 7, N'瀛愯妭鐐�77', N'7777', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (11, 108, 3, 7, N'瀛愯妭鐐�77', N'7777', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (12, 108, 3, 6, N'瀛愯妭鐐�88', N'8888', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (12, 108, 3, 6, N'瀛愯妭鐐�88', N'8888', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_demo] ([id], [dept_id], [user_id], [order_num], [test_key], [value], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (13, 108, 3, 5, N'瀛愯妭鐐�99', N'9999', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_demo VALUES (13, 108, 3, 5, N'瀛愯妭鐐�99', N'9999', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
 
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (1, 0, 102, 4, N'娴嬭瘯鏁版嵁鏉冮檺', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (1, 0, 102, 4, N'娴嬭瘯鏁版嵁鏉冮檺', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (2, 1, 102, 3, N'瀛愯妭鐐�1', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (2, 1, 102, 3, N'瀛愯妭鐐�1', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (3, 2, 102, 3, N'瀛愯妭鐐�2', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (3, 2, 102, 3, N'瀛愯妭鐐�2', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (4, 0, 108, 4, N'娴嬭瘯鏍�1', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (4, 0, 108, 4, N'娴嬭瘯鏍�1', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (5, 4, 108, 3, N'瀛愯妭鐐�11', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (5, 4, 108, 3, N'瀛愯妭鐐�11', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (6, 4, 108, 3, N'瀛愯妭鐐�22', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (6, 4, 108, 3, N'瀛愯妭鐐�22', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (7, 4, 108, 3, N'瀛愯妭鐐�33', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (7, 4, 108, 3, N'瀛愯妭鐐�33', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (8, 5, 108, 3, N'瀛愯妭鐐�44', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (8, 5, 108, 3, N'瀛愯妭鐐�44', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (9, 6, 108, 3, N'瀛愯妭鐐�55', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (9, 6, 108, 3, N'瀛愯妭鐐�55', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (10, 7, 108, 3, N'瀛愯妭鐐�66', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (10, 7, 108, 3, N'瀛愯妭鐐�66', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (11, 7, 108, 3, N'瀛愯妭鐐�77', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (11, 7, 108, 3, N'瀛愯妭鐐�77', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (12, 10, 108, 3, N'瀛愯妭鐐�88', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (12, 10, 108, 3, N'瀛愯妭鐐�88', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
-INSERT [test_tree] ([id], [parent_id], [dept_id], [user_id], [tree_name], [version], [create_dept], [create_time], [create_by], [update_time], [update_by], [del_flag]) VALUES (13, 10, 108, 3, N'瀛愯妭鐐�99', 0, 103, getdate(), 1, NULL, NULL, 0);
+INSERT test_tree VALUES (13, 10, 108, 3, N'瀛愯妭鐐�99', 0, 103, getdate(), 1, NULL, NULL, 0);
 GO
diff --git a/script/sql/test.sql b/script/sql/test.sql
index b66e311..035e0b7 100644
--- a/script/sql/test.sql
+++ b/script/sql/test.sql
@@ -35,8 +35,8 @@
     PRIMARY KEY (id) USING BTREE
 ) ENGINE = InnoDB COMMENT = '娴嬭瘯鏍戣〃';
 
-INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, 108, 'test', '鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', 'sys_user', '', '', '0', '', '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 3, sysdate(), NULL);
-INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, 102, 'test1', '浠呮湰浜� 瀵嗙爜666666', 'sys_user', '', '', '0', '', '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 4, sysdate(), NULL);
+INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (3, 108, 'test', '鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 3, sysdate(), NULL);
+INSERT INTO sys_user(user_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (4, 102, 'test1', '浠呮湰浜� 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), 4, sysdate(), NULL);
 
 INSERT INTO sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) VALUES (5, '娴嬭瘯鑿滃崟', 0, 5, 'demo', NULL, 1, 0, 'M', '0', '0', NULL, 'star', 103, 1, sysdate(), NULL, NULL, '');
 

--
Gitblit v1.9.3