diff --git a/pom.xml b/pom.xml
index 72b9a49..2daf837 100644
--- a/pom.xml
+++ b/pom.xml
@@ -517,24 +517,6 @@
com.alibaba
transmittable-thread-local
-
-
- org.dromara.sms4j
- sms4j-spring-boot-starter
-
-
-
- com.alibaba
- fastjson
-
-
-
-
-
-
- org.apache.velocity
- velocity-engine-core
-
diff --git a/script/sql/powerjob.sql b/script/sql/powerjob.sql
deleted file mode 100644
index 9381b88..0000000
--- a/script/sql/powerjob.sql
+++ /dev/null
@@ -1,233 +0,0 @@
--- ----------------------------
--- Table structure for pj_app_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_app_info`;
-CREATE TABLE `pj_app_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `app_name` varchar(255) NULL DEFAULT NULL,
- `current_server` varchar(255) NULL DEFAULT NULL,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `password` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `uidx01_app_info`(`app_name`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of pj_app_info
--- ----------------------------
-INSERT INTO `pj_app_info` VALUES (1, 'ruoyi-worker', '127.0.0.1:10010', '2023-06-13 16:32:59.263000', '2023-07-04 17:25:49.798000', '123456');
-
--- ----------------------------
--- Table structure for pj_container_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_container_info`;
-CREATE TABLE `pj_container_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `app_id` bigint(0) NULL DEFAULT NULL,
- `container_name` varchar(255) NULL DEFAULT NULL,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `last_deploy_time` datetime(6) NULL DEFAULT NULL,
- `source_info` varchar(255) NULL DEFAULT NULL,
- `source_type` int(0) NULL DEFAULT NULL,
- `status` int(0) NULL DEFAULT NULL,
- `version` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `idx01_container_info`(`app_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for pj_instance_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_instance_info`;
-CREATE TABLE `pj_instance_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `actual_trigger_time` bigint(0) NULL DEFAULT NULL,
- `app_id` bigint(0) NULL DEFAULT NULL,
- `expected_trigger_time` bigint(0) NULL DEFAULT NULL,
- `finished_time` bigint(0) NULL DEFAULT NULL,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `instance_id` bigint(0) NULL DEFAULT NULL,
- `instance_params` longtext NULL,
- `job_id` bigint(0) NULL DEFAULT NULL,
- `job_params` longtext NULL,
- `last_report_time` bigint(0) NULL DEFAULT NULL,
- `result` longtext NULL,
- `running_times` bigint(0) NULL DEFAULT NULL,
- `status` int(0) NULL DEFAULT NULL,
- `task_tracker_address` varchar(255) NULL DEFAULT NULL,
- `type` int(0) NULL DEFAULT NULL,
- `wf_instance_id` bigint(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `idx01_instance_info`(`job_id`, `status`) USING BTREE,
- INDEX `idx02_instance_info`(`app_id`, `status`) USING BTREE,
- INDEX `idx03_instance_info`(`instance_id`, `status`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for pj_job_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_job_info`;
-CREATE TABLE `pj_job_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `alarm_config` varchar(255) NULL DEFAULT NULL,
- `app_id` bigint(0) NULL DEFAULT NULL,
- `concurrency` int(0) NULL DEFAULT NULL,
- `designated_workers` varchar(255) NULL DEFAULT NULL,
- `dispatch_strategy` int(0) NULL DEFAULT NULL,
- `execute_type` int(0) NULL DEFAULT NULL,
- `extra` varchar(255) NULL DEFAULT NULL,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `instance_retry_num` int(0) NULL DEFAULT NULL,
- `instance_time_limit` bigint(0) NULL DEFAULT NULL,
- `job_description` varchar(255) NULL DEFAULT NULL,
- `job_name` varchar(255) NULL DEFAULT NULL,
- `job_params` longtext NULL,
- `lifecycle` varchar(255) NULL DEFAULT NULL,
- `log_config` varchar(255) NULL DEFAULT NULL,
- `max_instance_num` int(0) NULL DEFAULT NULL,
- `max_worker_count` int(0) NULL DEFAULT NULL,
- `min_cpu_cores` double NOT NULL,
- `min_disk_space` double NOT NULL,
- `min_memory_space` double NOT NULL,
- `next_trigger_time` bigint(0) NULL DEFAULT NULL,
- `notify_user_ids` varchar(255) NULL DEFAULT NULL,
- `processor_info` varchar(255) NULL DEFAULT NULL,
- `processor_type` int(0) NULL DEFAULT NULL,
- `status` int(0) NULL DEFAULT NULL,
- `tag` varchar(255) NULL DEFAULT NULL,
- `task_retry_num` int(0) NULL DEFAULT NULL,
- `time_expression` varchar(255) NULL DEFAULT NULL,
- `time_expression_type` int(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `idx01_job_info`(`app_id`, `status`, `time_expression_type`, `next_trigger_time`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 5 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of pj_job_info
--- ----------------------------
-INSERT INTO `pj_job_info` VALUES (1, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 2, 1, NULL, '2023-06-02 15:01:27.717000', '2023-07-04 17:22:12.374000', 1, 0, '', '单机处理器执行测试', NULL, '{}', '{\"type\":1}', 0, 0, 0, 0, 0, NULL, NULL, 'org.dromara.job.processors.StandaloneProcessorDemo', 1, 2, NULL, 1, '30000', 3);
-INSERT INTO `pj_job_info` VALUES (2, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 2, NULL, '2023-06-02 15:04:45.342000', '2023-07-04 17:22:12.816000', 0, 0, NULL, '广播处理器测试', NULL, '{}', '{\"type\":1}', 0, 0, 0, 0, 0, NULL, NULL, 'org.dromara.job.processors.BroadcastProcessorDemo', 1, 2, NULL, 1, '30000', 3);
-INSERT INTO `pj_job_info` VALUES (3, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 4, NULL, '2023-06-02 15:13:23.519000', '2023-06-02 16:03:22.421000', 0, 0, NULL, 'Map处理器测试', NULL, '{}', '{\"type\":1}', 0, 0, 0, 0, 0, NULL, NULL, 'org.dromara.job.processors.MapProcessorDemo', 1, 2, NULL, 1, '1000', 3);
-INSERT INTO `pj_job_info` VALUES (4, '{\"alertThreshold\":0,\"silenceWindowLen\":0,\"statisticWindowLen\":0}', 1, 5, '', 1, 3, NULL, '2023-06-02 15:45:25.896000', '2023-06-02 16:03:23.125000', 0, 0, NULL, 'MapReduce处理器测试', NULL, '{}', '{\"type\":1}', 0, 0, 0, 0, 0, NULL, NULL, 'org.dromara.job.processors.MapReduceProcessorDemo', 1, 2, NULL, 1, '1000', 3);
-
--- ----------------------------
--- Table structure for pj_oms_lock
--- ----------------------------
-DROP TABLE IF EXISTS `pj_oms_lock`;
-CREATE TABLE `pj_oms_lock` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `lock_name` varchar(255) NULL DEFAULT NULL,
- `max_lock_time` bigint(0) NULL DEFAULT NULL,
- `ownerip` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `uidx01_oms_lock`(`lock_name`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 6 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for pj_server_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_server_info`;
-CREATE TABLE `pj_server_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `ip` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `uidx01_server_info`(`ip`) USING BTREE,
- INDEX `idx01_server_info`(`gmt_modified`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for pj_user_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_user_info`;
-CREATE TABLE `pj_user_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `email` varchar(255) NULL DEFAULT NULL,
- `extra` varchar(255) NULL DEFAULT NULL,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `password` varchar(255) NULL DEFAULT NULL,
- `phone` varchar(255) NULL DEFAULT NULL,
- `username` varchar(255) NULL DEFAULT NULL,
- `web_hook` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `uidx01_user_info`(`username`) USING BTREE,
- INDEX `uidx02_user_info`(`email`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for pj_workflow_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_workflow_info`;
-CREATE TABLE `pj_workflow_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `app_id` bigint(0) NULL DEFAULT NULL,
- `extra` varchar(255) NULL DEFAULT NULL,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `lifecycle` varchar(255) NULL DEFAULT NULL,
- `max_wf_instance_num` int(0) NULL DEFAULT NULL,
- `next_trigger_time` bigint(0) NULL DEFAULT NULL,
- `notify_user_ids` varchar(255) NULL DEFAULT NULL,
- `pedag` longtext NULL,
- `status` int(0) NULL DEFAULT NULL,
- `time_expression` varchar(255) NULL DEFAULT NULL,
- `time_expression_type` int(0) NULL DEFAULT NULL,
- `wf_description` varchar(255) NULL DEFAULT NULL,
- `wf_name` varchar(255) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `idx01_workflow_info`(`app_id`, `status`, `time_expression_type`, `next_trigger_time`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for pj_workflow_instance_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_workflow_instance_info`;
-CREATE TABLE `pj_workflow_instance_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `actual_trigger_time` bigint(0) NULL DEFAULT NULL,
- `app_id` bigint(0) NULL DEFAULT NULL,
- `dag` longtext NULL,
- `expected_trigger_time` bigint(0) NULL DEFAULT NULL,
- `finished_time` bigint(0) NULL DEFAULT NULL,
- `gmt_create` datetime(6) NULL DEFAULT NULL,
- `gmt_modified` datetime(6) NULL DEFAULT NULL,
- `parent_wf_instance_id` bigint(0) NULL DEFAULT NULL,
- `result` longtext NULL,
- `status` int(0) NULL DEFAULT NULL,
- `wf_context` longtext NULL,
- `wf_init_params` longtext NULL,
- `wf_instance_id` bigint(0) NULL DEFAULT NULL,
- `workflow_id` bigint(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `uidx01_wf_instance`(`wf_instance_id`) USING BTREE,
- INDEX `idx01_wf_instance`(`workflow_id`, `status`, `app_id`, `expected_trigger_time`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for pj_workflow_node_info
--- ----------------------------
-DROP TABLE IF EXISTS `pj_workflow_node_info`;
-CREATE TABLE `pj_workflow_node_info` (
- `id` bigint(0) NOT NULL AUTO_INCREMENT,
- `app_id` bigint(0) NOT NULL,
- `enable` bit(1) NOT NULL,
- `extra` longtext NULL,
- `gmt_create` datetime(6) NULL,
- `gmt_modified` datetime(6) NULL,
- `job_id` bigint(0) NULL DEFAULT NULL,
- `node_name` varchar(255) NULL DEFAULT NULL,
- `node_params` longtext NULL,
- `skip_when_failed` bit(1) NOT NULL,
- `type` int(0) NULL DEFAULT NULL,
- `workflow_id` bigint(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `idx01_workflow_node_info`(`workflow_id`, `gmt_create`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 ROW_FORMAT = Dynamic;
diff --git a/script/sql/ry_vue_5.X.sql b/script/sql/ry_vue_5.X.sql
index c9bdf65..0dd725a 100644
--- a/script/sql/ry_vue_5.X.sql
+++ b/script/sql/ry_vue_5.X.sql
@@ -37,7 +37,6 @@ insert into sys_user values(2, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazy
drop table if exists sys_role;
create table sys_role (
role_id bigint(20) not null comment '角色ID',
- tenant_id varchar(20) default '000000' comment '租户编号',
role_name varchar(30) not null comment '角色名称',
role_key varchar(100) not null comment '角色权限字符串',
role_sort int(4) not null comment '显示顺序',
@@ -56,8 +55,8 @@ create table sys_role (
-- ----------------------------
-- 初始化-角色信息表数据
-- ----------------------------
-insert into sys_role values(1, '000000', '超级管理员', 'superadmin', 1, 1, 1, '0', '0', 1, sysdate(), null, null, '超级管理员');
-insert into sys_role values(2, '000000', '普通角色', 'common', 2, 2, 1, '0', '0', 1, sysdate(), null, null, '普通角色');
+insert into sys_role values(1, '超级管理员', 'superadmin', 1, 1, 1, '0', '0', 1, sysdate(), null, null, '超级管理员');
+insert into sys_role values(2, '普通角色', 'common', 2, 2, 1, '0', '0', 1, sysdate(), null, null, '普通角色');
-- ----------------------------
@@ -92,18 +91,13 @@ create table sys_menu (
-- ----------------------------
-- 一级菜单
insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 1, sysdate(), null, null, '系统管理目录');
-insert into sys_menu values('6', '租户管理', '0', '2', 'tenant', null, '', 1, 0, 'M', '0', '0', '', 'chart', 1, sysdate(), null, null, '租户管理目录');
insert into sys_menu values('2', '系统监控', '0', '3', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 1, sysdate(), null, null, '系统监控目录');
-insert into sys_menu values('3', '系统工具', '0', '4', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 1, sysdate(), null, null, '系统工具目录');
-insert into sys_menu values('4', 'PLUS官网', '0', '5', 'https://gitee.com/dromara/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide', 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', 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', 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', 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', 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', 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', 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', 1, sysdate(), null, null, '缓存监控菜单');
insert into sys_menu values('123', '客户端管理', '1', '11', 'client', 'system/client/index', '', 1, 0, 'C', '0', '0', 'system:client:list', 'international', 1, sysdate(), null, null, '客户端管理菜单');
-- 三级菜单
@@ -278,7 +272,6 @@ drop table if exists sys_dict_type;
create table sys_dict_type
(
dict_id bigint(20) not null comment '字典主键',
- tenant_id varchar(20) default '000000' comment '租户编号',
dict_name varchar(100) default '' comment '字典名称',
dict_type varchar(100) default '' comment '字典类型',
create_by bigint(20) default null comment '创建者',
@@ -287,19 +280,19 @@ create table sys_dict_type
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (dict_id),
- unique (tenant_id, dict_type)
+ unique (dict_type)
) engine=innodb comment = '字典类型表';
-insert into sys_dict_type values(1, '000000', '用户性别', 'sys_user_sex', 1, sysdate(), null, null, '用户性别列表');
-insert into sys_dict_type values(2, '000000', '菜单状态', 'sys_show_hide', 1, sysdate(), null, null, '菜单状态列表');
-insert into sys_dict_type values(3, '000000', '系统开关', 'sys_normal_disable', 1, sysdate(), null, null, '系统开关列表');
-insert into sys_dict_type values(6, '000000', '系统是否', 'sys_yes_no', 1, sysdate(), null, null, '系统是否列表');
-insert into sys_dict_type values(7, '000000', '通知类型', 'sys_notice_type', 1, sysdate(), null, null, '通知类型列表');
-insert into sys_dict_type values(8, '000000', '通知状态', 'sys_notice_status', 1, sysdate(), null, null, '通知状态列表');
-insert into sys_dict_type values(9, '000000', '操作类型', 'sys_oper_type', 1, sysdate(), null, null, '操作类型列表');
-insert into sys_dict_type values(10, '000000', '系统状态', 'sys_common_status', 1, sysdate(), null, null, '登录状态列表');
-insert into sys_dict_type values(11, '000000', '授权类型', 'sys_grant_type', 1, sysdate(), null, null, '认证授权类型');
-insert into sys_dict_type values(12, '000000', '设备类型', 'sys_device_type', 1, sysdate(), null, null, '客户端设备类型');
+insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', 1, sysdate(), null, null, '用户性别列表');
+insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', 1, sysdate(), null, null, '菜单状态列表');
+insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', 1, sysdate(), null, null, '系统开关列表');
+insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', 1, sysdate(), null, null, '系统是否列表');
+insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', 1, sysdate(), null, null, '通知类型列表');
+insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', 1, sysdate(), null, null, '通知状态列表');
+insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', 1, sysdate(), null, null, '操作类型列表');
+insert into sys_dict_type values(10, '系统状态', 'sys_common_status', 1, sysdate(), null, null, '登录状态列表');
+insert into sys_dict_type values(11, '授权类型', 'sys_grant_type', 1, sysdate(), null, null, '认证授权类型');
+insert into sys_dict_type values(12, '设备类型', 'sys_device_type', 1, sysdate(), null, null, '客户端设备类型');
-- ----------------------------
@@ -309,7 +302,6 @@ drop table if exists sys_dict_data;
create table sys_dict_data
(
dict_code bigint(20) not null comment '字典编码',
- tenant_id varchar(20) default '000000' comment '租户编号',
dict_sort int(4) default 0 comment '字典排序',
dict_label varchar(100) default '' comment '字典标签',
dict_value varchar(100) default '' comment '字典键值',
@@ -325,40 +317,40 @@ create table sys_dict_data
primary key (dict_code)
) engine=innodb comment = '字典数据表';
-insert into sys_dict_data values(1, '000000', 1, '男', '0', 'sys_user_sex', '', '', 'Y', 1, sysdate(), null, null, '性别男');
-insert into sys_dict_data values(2, '000000', 2, '女', '1', 'sys_user_sex', '', '', 'N', 1, sysdate(), null, null, '性别女');
-insert into sys_dict_data values(3, '000000', 3, '未知', '2', 'sys_user_sex', '', '', 'N', 1, sysdate(), null, null, '性别未知');
-insert into sys_dict_data values(4, '000000', 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', 1, sysdate(), null, null, '显示菜单');
-insert into sys_dict_data values(5, '000000', 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', 1, sysdate(), null, null, '隐藏菜单');
-insert into sys_dict_data values(6, '000000', 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', 1, sysdate(), null, null, '正常状态');
-insert into sys_dict_data values(7, '000000', 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', 1, sysdate(), null, null, '停用状态');
-insert into sys_dict_data values(12, '000000', 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', 1, sysdate(), null, null, '系统默认是');
-insert into sys_dict_data values(13, '000000', 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', 1, sysdate(), null, null, '系统默认否');
-insert into sys_dict_data values(14, '000000', 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', 1, sysdate(), null, null, '通知');
-insert into sys_dict_data values(15, '000000', 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', 1, sysdate(), null, null, '公告');
-insert into sys_dict_data values(16, '000000', 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', 1, sysdate(), null, null, '正常状态');
-insert into sys_dict_data values(17, '000000', 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', 1, sysdate(), null, null, '关闭状态');
-insert into sys_dict_data values(29, '000000', 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', 1, sysdate(), null, null, '其他操作');
-insert into sys_dict_data values(18, '000000', 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', 1, sysdate(), null, null, '新增操作');
-insert into sys_dict_data values(19, '000000', 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', 1, sysdate(), null, null, '修改操作');
-insert into sys_dict_data values(20, '000000', 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', 1, sysdate(), null, null, '删除操作');
-insert into sys_dict_data values(21, '000000', 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', 1, sysdate(), null, null, '授权操作');
-insert into sys_dict_data values(22, '000000', 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', 1, sysdate(), null, null, '导出操作');
-insert into sys_dict_data values(23, '000000', 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', 1, sysdate(), null, null, '导入操作');
-insert into sys_dict_data values(24, '000000', 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', 1, sysdate(), null, null, '强退操作');
-insert into sys_dict_data values(25, '000000', 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', 1, sysdate(), null, null, '生成操作');
-insert into sys_dict_data values(26, '000000', 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', 1, sysdate(), null, null, '清空操作');
-insert into sys_dict_data values(27, '000000', 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', 1, sysdate(), null, null, '正常状态');
-insert into sys_dict_data values(28, '000000', 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', 1, sysdate(), null, null, '停用状态');
-insert into sys_dict_data values(30, '000000', 0, '密码认证', 'password', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '密码认证');
-insert into sys_dict_data values(31, '000000', 0, '短信认证', 'sms', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '短信认证');
-insert into sys_dict_data values(32, '000000', 0, '邮件认证', 'email', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '邮件认证');
-insert into sys_dict_data values(33, '000000', 0, '小程序认证', 'xcx', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '小程序认证');
-insert into sys_dict_data values(34, '000000', 0, '三方登录认证', 'social', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '三方登录认证');
-insert into sys_dict_data values(35, '000000', 0, 'PC', 'pc', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, 'PC');
-insert into sys_dict_data values(36, '000000', 0, '安卓', 'android', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, '安卓');
-insert into sys_dict_data values(37, '000000', 0, 'iOS', 'ios', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, 'iOS');
-insert into sys_dict_data values(38, '000000', 0, '小程序', 'xcx', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, '小程序');
+insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', 1, sysdate(), null, null, '性别男');
+insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', 1, sysdate(), null, null, '性别女');
+insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', 1, sysdate(), null, null, '性别未知');
+insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', 1, sysdate(), null, null, '显示菜单');
+insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', 1, sysdate(), null, null, '隐藏菜单');
+insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', 1, sysdate(), null, null, '正常状态');
+insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', 1, sysdate(), null, null, '停用状态');
+insert into sys_dict_data values(12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', 1, sysdate(), null, null, '系统默认是');
+insert into sys_dict_data values(13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', 1, sysdate(), null, null, '系统默认否');
+insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', 1, sysdate(), null, null, '通知');
+insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', 1, sysdate(), null, null, '公告');
+insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', 1, sysdate(), null, null, '正常状态');
+insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', 1, sysdate(), null, null, '关闭状态');
+insert into sys_dict_data values(29, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', 1, sysdate(), null, null, '其他操作');
+insert into sys_dict_data values(18, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', 1, sysdate(), null, null, '新增操作');
+insert into sys_dict_data values(19, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', 1, sysdate(), null, null, '修改操作');
+insert into sys_dict_data values(20, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', 1, sysdate(), null, null, '删除操作');
+insert into sys_dict_data values(21, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', 1, sysdate(), null, null, '授权操作');
+insert into sys_dict_data values(22, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', 1, sysdate(), null, null, '导出操作');
+insert into sys_dict_data values(23, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', 1, sysdate(), null, null, '导入操作');
+insert into sys_dict_data values(24, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', 1, sysdate(), null, null, '强退操作');
+insert into sys_dict_data values(25, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', 1, sysdate(), null, null, '生成操作');
+insert into sys_dict_data values(26, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', 1, sysdate(), null, null, '清空操作');
+insert into sys_dict_data values(27, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', 1, sysdate(), null, null, '正常状态');
+insert into sys_dict_data values(28, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', 1, sysdate(), null, null, '停用状态');
+insert into sys_dict_data values(30, 0, '密码认证', 'password', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '密码认证');
+insert into sys_dict_data values(31, 0, '短信认证', 'sms', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '短信认证');
+insert into sys_dict_data values(32, 0, '邮件认证', 'email', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '邮件认证');
+insert into sys_dict_data values(33, 0, '小程序认证', 'xcx', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '小程序认证');
+insert into sys_dict_data values(34, 0, '三方登录认证', 'social', 'sys_grant_type', 'el-check-tag', 'default', 'N', 1, sysdate(), null, null, '三方登录认证');
+insert into sys_dict_data values(35, 0, 'PC', 'pc', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, 'PC');
+insert into sys_dict_data values(36, 0, '安卓', 'android', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, '安卓');
+insert into sys_dict_data values(37, 0, 'iOS', 'ios', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, 'iOS');
+insert into sys_dict_data values(38, 0, '小程序', 'xcx', 'sys_device_type', '', 'default', 'N', 1, sysdate(), null, null, '小程序');
-- ----------------------------
@@ -367,7 +359,6 @@ insert into sys_dict_data values(38, '000000', 0, '小程序', 'xcx', 'sy
drop table if exists sys_config;
create table sys_config (
config_id bigint(20) not null comment '参数主键',
- tenant_id varchar(20) default '000000' comment '租户编号',
config_name varchar(100) default '' comment '参数名称',
config_key varchar(100) default '' comment '参数键名',
config_value varchar(500) default '' comment '参数键值',
@@ -380,11 +371,11 @@ create table sys_config (
primary key (config_id)
) engine=innodb comment = '参数配置表';
-insert into sys_config values(1, '000000', '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 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', 1, sysdate(), null, null, '初始化密码 123456' );
-insert into sys_config values(3, '000000', '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 1, sysdate(), null, null, '深色主题theme-dark,浅色主题theme-light' );
-insert into sys_config values(5, '000000', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 1, sysdate(), null, null, '是否开启注册用户功能(true开启,false关闭)');
-insert into sys_config values(11, '000000', 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 1, sysdate(), null, null, 'true:开启, false:关闭');
+insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 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', 1, sysdate(), null, null, '初始化密码 123456' );
+insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 1, sysdate(), null, null, '深色主题theme-dark,浅色主题theme-light' );
+insert into sys_config values(5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 1, sysdate(), null, null, '是否开启注册用户功能(true开启,false关闭)');
+insert into sys_config values(11, 'OSS预览列表资源开关', 'sys.oss.previewListResource', 'true', 'Y', 1, sysdate(), null, null, 'true:开启, false:关闭');
-- ----------------------------
@@ -393,7 +384,6 @@ insert into sys_config values(11, '000000', 'OSS预览列表资源开关',
drop table if exists sys_logininfor;
create table sys_logininfor (
info_id bigint(20) not null comment '访问ID',
- tenant_id varchar(20) default '000000' comment '租户编号',
user_name varchar(50) default '' comment '用户账号',
client_key varchar(32) default '' comment '客户端',
device_type varchar(32) default '' comment '设备类型',
diff --git a/script/sql/test.sql b/script/sql/test.sql
index d4cea05..622e6f1 100644
--- a/script/sql/test.sql
+++ b/script/sql/test.sql
@@ -2,14 +2,11 @@ DROP TABLE if EXISTS test_demo;
CREATE TABLE test_demo
(
id bigint(0) NOT NULL COMMENT '主键',
- tenant_id varchar(20) NULL DEFAULT '000000' COMMENT '租户编号',
- dept_id bigint(0) NULL DEFAULT NULL COMMENT '部门id',
user_id bigint(0) NULL DEFAULT NULL COMMENT '用户id',
order_num int(0) NULL DEFAULT 0 COMMENT '排序号',
test_key varchar(255) NULL DEFAULT NULL COMMENT 'key键',
value varchar(255) NULL DEFAULT NULL COMMENT '值',
version int(0) NULL DEFAULT 0 COMMENT '版本',
- create_dept bigint(0) NULL DEFAULT NULL COMMENT '创建部门',
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
create_by bigint(0) NULL DEFAULT NULL COMMENT '创建人',
update_time datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
@@ -22,13 +19,10 @@ DROP TABLE if EXISTS test_tree;
CREATE TABLE test_tree
(
id bigint(0) NOT NULL COMMENT '主键',
- tenant_id varchar(20) NULL DEFAULT '000000' COMMENT '租户编号',
parent_id bigint(0) NULL DEFAULT 0 COMMENT '父id',
- dept_id bigint(0) NULL DEFAULT NULL COMMENT '部门id',
user_id bigint(0) NULL DEFAULT NULL COMMENT '用户id',
tree_name varchar(255) NULL DEFAULT NULL COMMENT '值',
version int(0) NULL DEFAULT 0 COMMENT '版本',
- create_dept bigint(0) NULL DEFAULT NULL COMMENT '创建部门',
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
create_by bigint(0) NULL DEFAULT NULL COMMENT '创建人',
update_time datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
@@ -37,27 +31,27 @@ CREATE TABLE test_tree
PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB COMMENT = '测试树表';
-INSERT INTO sys_user(user_id, tenant_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, '000000', 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, tenant_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, '000000', 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_user(user_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark) VALUES (3, 'test', '本部门及以下 密码666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate(), 1, sysdate(), 3, sysdate(), NULL);
+INSERT INTO sys_user(user_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark) VALUES (4, 'test1', '仅本人 密码666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', 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(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (5, '测试菜单', 0, 5, 'demo', NULL, 1, 0, 'M', '0', '0', NULL, 'star', 1, sysdate(), NULL, 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 (1500, '测试单表', 5, 1, 'demo', 'demo/demo/index', 1, 0, 'C', '0', '0', 'demo:demo:list', '#', 103, 1, sysdate(), NULL, 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 (1501, '测试单表查询', 1500, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:query', '#', 103, 1, sysdate(), NULL, 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 (1502, '测试单表新增', 1500, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:add', '#', 103, 1, sysdate(), NULL, 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 (1503, '测试单表修改', 1500, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:edit', '#', 103, 1, sysdate(), NULL, 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 (1504, '测试单表删除', 1500, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:remove', '#', 103, 1, sysdate(), NULL, 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 (1505, '测试单表导出', 1500, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:export', '#', 103, 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1500, '测试单表', 5, 1, 'demo', 'demo/demo/index', 1, 0, 'C', '0', '0', 'demo:demo:list', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1501, '测试单表查询', 1500, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:query', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1502, '测试单表新增', 1500, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:add', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1503, '测试单表修改', 1500, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:edit', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1504, '测试单表删除', 1500, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:remove', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1505, '测试单表导出', 1500, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:export', '#', 1, sysdate(), NULL, 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 (1506, '测试树表', 5, 1, 'tree', 'demo/tree/index', 1, 0, 'C', '0', '0', 'demo:tree:list', '#', 103, 1, sysdate(), NULL, 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 (1507, '测试树表查询', 1506, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:query', '#', 103, 1, sysdate(), NULL, 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 (1508, '测试树表新增', 1506, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:add', '#', 103, 1, sysdate(), NULL, 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 (1509, '测试树表修改', 1506, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:edit', '#', 103, 1, sysdate(), NULL, 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 (1510, '测试树表删除', 1506, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:remove', '#', 103, 1, sysdate(), NULL, 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 (1511, '测试树表导出', 1506, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:export', '#', 103, 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1506, '测试树表', 5, 1, 'tree', 'demo/tree/index', 1, 0, 'C', '0', '0', 'demo:tree:list', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1507, '测试树表查询', 1506, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:query', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1508, '测试树表新增', 1506, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:add', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1509, '测试树表修改', 1506, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:edit', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1510, '测试树表删除', 1506, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:remove', '#', 1, sysdate(), NULL, 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_by, create_time, update_by, update_time, remark) VALUES (1511, '测试树表导出', 1506, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:export', '#', 1, sysdate(), NULL, NULL, '');
-INSERT INTO sys_role(role_id, tenant_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, '000000', '本部门及以下', 'test1', 3, '4', 1, 1, '0', '0', 103, 1, sysdate(), 1, NULL, NULL);
-INSERT INTO sys_role(role_id, tenant_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, '000000', '仅本人', 'test2', 4, '5', 1, 1, '0', '0', 103, 1, sysdate(), 1, NULL, NULL);
+INSERT INTO sys_role(role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark) VALUES (3, '本部门及以下', 'test1', 3, '4', 1, '0', '0', 1, sysdate(), 1, NULL, NULL);
+INSERT INTO sys_role(role_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, status, del_flag, create_by, create_time, update_by, update_time, remark) VALUES (4, '仅本人', 'test2', 4, '5', 1, '0', '0', 1, sysdate(), 1, NULL, NULL);
INSERT INTO sys_role_menu(role_id, menu_id) VALUES (3, 1);
INSERT INTO sys_role_menu(role_id, menu_id) VALUES (3, 5);
@@ -146,30 +140,30 @@ INSERT INTO sys_role_menu(role_id, menu_id) VALUES (4, 1511);
INSERT INTO sys_user_role(user_id, role_id) VALUES (3, 3);
INSERT INTO sys_user_role(user_id, role_id) VALUES (4, 4);
-INSERT INTO test_demo(id, tenant_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, '000000', 102, 4, 1, '测试数据权限', '测试', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 102, 3, 2, '子节点1', '111', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 102, 3, 3, '子节点2', '222', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 4, 4, '测试数据', 'demo', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 13, '子节点11', '1111', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 12, '子节点22', '2222', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 11, '子节点33', '3333', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 10, '子节点44', '4444', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 9, '子节点55', '5555', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 8, '子节点66', '6666', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 7, '子节点77', '7777', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 6, '子节点88', '8888', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_demo(id, tenant_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, '000000', 108, 3, 5, '子节点99', '9999', 0, 103, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (1, 4, 1, '测试数据权限', '测试', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (2, 3, 2, '子节点1', '111', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (3, 3, 3, '子节点2', '222', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (4, 4, 4, '测试数据', 'demo', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (5, 3, 13, '子节点11', '1111', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (6, 3, 12, '子节点22', '2222', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (7, 3, 11, '子节点33', '3333', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (8, 3, 10, '子节点44', '4444', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (9, 3, 9, '子节点55', '5555', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (10, 3, 8, '子节点66', '6666', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (11, 3, 7, '子节点77', '7777', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (12, 3, 6, '子节点88', '8888', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_demo(id, user_id, order_num, test_key, value, version, create_time, create_by, update_time, update_by, del_flag) VALUES (13, 3, 5, '子节点99', '9999', 0, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (1, '000000', 0, 102, 4, '测试数据权限', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (2, '000000', 1, 102, 3, '子节点1', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (3, '000000', 2, 102, 3, '子节点2', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (4, '000000', 0, 108, 4, '测试树1', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (5, '000000', 4, 108, 3, '子节点11', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (6, '000000', 4, 108, 3, '子节点22', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (7, '000000', 4, 108, 3, '子节点33', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (8, '000000', 5, 108, 3, '子节点44', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (9, '000000', 6, 108, 3, '子节点55', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (10, '000000', 7, 108, 3, '子节点66', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (11, '000000', 7, 108, 3, '子节点77', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (12, '000000', 10, 108, 3, '子节点88', 0, 103, sysdate(), 1, NULL, NULL, 0);
-INSERT INTO test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) VALUES (13, '000000', 10, 108, 3, '子节点99', 0, 103, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (1, 0, 4, '测试数据权限', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (2, 1, 3, '子节点1', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (3, 2, 3, '子节点2', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (4, 0, 4, '测试树1', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (5, 4, 3, '子节点11', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (6, 4, 3, '子节点22', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (7, 4, 3, '子节点33', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (8, 5, 3, '子节点44', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (9, 6, 3, '子节点55', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (10, 7, 3, '子节点66', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (11, 7, 3, '子节点77', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (12, 10, 3, '子节点88', 0, sysdate(), 1, NULL, NULL, 0);
+INSERT INTO test_tree(id, parent_id, user_id, tree_name, version, create_time, create_by, update_time, update_by, del_flag) VALUES (13, 10, 3, '子节点99', 0, sysdate(), 1, NULL, NULL, 0);
diff --git a/script/sql/update/update_5.0-5.1.sql b/script/sql/update/update_5.0-5.1.sql
deleted file mode 100644
index 1d70a06..0000000
--- a/script/sql/update/update_5.0-5.1.sql
+++ /dev/null
@@ -1,62 +0,0 @@
-ALTER TABLE gen_table ADD COLUMN data_name varchar(200) NULL DEFAULT '' COMMENT '数据源名称' AFTER table_id;
-
-UPDATE sys_menu SET path = 'powerjob', component = 'monitor/powerjob/index', perms = 'monitor:powerjob:list', remark = 'powerjob控制台菜单' WHERE menu_id = 120;
-
--- ----------------------------
--- 系统授权表
--- ----------------------------
-drop table if exists sys_client;
-create table sys_client (
- id bigint(20) not null comment 'id',
- client_id varchar(64) default null comment '客户端id',
- client_key varchar(32) default null comment '客户端key',
- client_secret varchar(255) default null comment '客户端秘钥',
- grant_type varchar(255) default null comment '授权类型',
- device_type varchar(32) default null comment '设备类型',
- active_timeout int(11) default 1800 comment 'token活跃超时时间',
- timeout int(11) default 604800 comment 'token固定超时',
- status char(1) default '0' comment '状态(0正常 1停用)',
- del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
- 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 '更新者',
- update_time datetime default null comment '更新时间',
- primary key (id)
-) engine=innodb comment='系统授权表';
-
-insert into sys_client values (1, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', 1800, 604800, 0, 0, 103, 1, sysdate(), 1, sysdate());
-insert into sys_client values (2, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'android', 1800, 604800, 0, 0, 103, 1, sysdate(), 1, sysdate());
-
-insert into sys_dict_type values(11, '000000', '授权类型', 'sys_grant_type', 103, 1, sysdate(), null, null, '认证授权类型');
-insert into sys_dict_type values(12, '000000', '设备类型', 'sys_device_type', 103, 1, sysdate(), null, null, '客户端设备类型');
-
-insert into sys_dict_data values(30, '000000', 0, '密码认证', 'password', 'sys_grant_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '密码认证');
-insert into sys_dict_data values(31, '000000', 0, '短信认证', 'sms', 'sys_grant_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '短信认证');
-insert into sys_dict_data values(32, '000000', 0, '邮件认证', 'email', 'sys_grant_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '邮件认证');
-insert into sys_dict_data values(33, '000000', 0, '小程序认证', 'xcx', 'sys_grant_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '小程序认证');
-insert into sys_dict_data values(34, '000000', 0, '三方登录认证', 'social', 'sys_grant_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '三方登录认证');
-insert into sys_dict_data values(35, '000000', 0, 'PC', 'pc', 'sys_device_type', '', 'default', 'N', 103, 1, sysdate(), null, null, 'PC');
-insert into sys_dict_data values(36, '000000', 0, '安卓', 'android', 'sys_device_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '安卓');
-insert into sys_dict_data values(37, '000000', 0, 'iOS', 'ios', 'sys_device_type', '', 'default', 'N', 103, 1, sysdate(), null, null, 'iOS');
-insert into sys_dict_data values(38, '000000', 0, '小程序', 'xcx', 'sys_device_type', '', 'default', 'N', 103, 1, sysdate(), null, null, '小程序');
-
--- 二级菜单
-insert into sys_menu values('123', '客户端管理', '1', '11', 'client', 'system/client/index', '', 1, 0, 'C', '0', '0', 'system:client:list', 'international', 103, 1, sysdate(), null, null, '客户端管理菜单');
--- 客户端管理按钮
-insert into sys_menu values('1061', '客户端管理查询', '123', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:query', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1062', '客户端管理新增', '123', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1063', '客户端管理修改', '123', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1064', '客户端管理删除', '123', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:remove', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1065', '客户端管理导出', '123', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:client:export', '#', 103, 1, sysdate(), null, null, '');
-
--- 角色菜单权限
-insert into sys_role_menu values ('2', '1061');
-insert into sys_role_menu values ('2', '1062');
-insert into sys_role_menu values ('2', '1063');
-insert into sys_role_menu values ('2', '1064');
-insert into sys_role_menu values ('2', '1065');
-
-
-update sys_dept set leader = null;
-alter table sys_dept modify column leader bigint null default null comment '负责人' after order_num;
diff --git a/script/sql/update/update_5.1.0-5.1.1.sql b/script/sql/update/update_5.1.0-5.1.1.sql
deleted file mode 100644
index 1dea49b..0000000
--- a/script/sql/update/update_5.1.0-5.1.1.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-ALTER TABLE sys_logininfor
- ADD COLUMN client_key VARCHAR(32) NULL DEFAULT NULL COMMENT '客户端' AFTER `user_name`,
- ADD COLUMN device_type VARCHAR(32) NULL DEFAULT NULL COMMENT '设备类型' AFTER `client_key`;
diff --git a/script/sql/update/update_5.1.1-5.1.2.sql b/script/sql/update/update_5.1.1-5.1.2.sql
deleted file mode 100644
index 6813949..0000000
--- a/script/sql/update/update_5.1.1-5.1.2.sql
+++ /dev/null
@@ -1,6 +0,0 @@
-delete from sys_menu where menu_id in (1604, 1605);
-insert into sys_menu values('1620', '配置列表', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:list', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1621', '配置添加', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:add', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1622', '配置编辑', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:edit', '#', 103, 1, sysdate(), null, null, '');
-insert into sys_menu values('1623', '配置删除', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:ossConfig:remove', '#', 103, 1, sysdate(), null, null, '');
-
diff --git a/src/main/java/org/dromara/common/core/constant/TenantConstants.java b/src/main/java/org/dromara/common/core/constant/TenantConstants.java
index 86b63c9..50a0696 100644
--- a/src/main/java/org/dromara/common/core/constant/TenantConstants.java
+++ b/src/main/java/org/dromara/common/core/constant/TenantConstants.java
@@ -7,21 +7,6 @@ package org.dromara.common.core.constant;
*/
public interface TenantConstants {
- /**
- * 租户正常状态
- */
- String NORMAL = "0";
-
- /**
- * 租户封禁状态
- */
- String DISABLE = "1";
-
- /**
- * 超级管理员ID
- */
- Long SUPER_ADMIN_ID = 1L;
-
/**
* 超级管理员角色 roleKey
*/
@@ -32,14 +17,4 @@ public interface TenantConstants {
*/
String TENANT_ADMIN_ROLE_KEY = "admin";
- /**
- * 租户管理员角色名称
- */
- String TENANT_ADMIN_ROLE_NAME = "管理员";
-
- /**
- * 默认租户ID
- */
- String DEFAULT_TENANT_ID = "000000";
-
}
diff --git a/src/main/java/org/dromara/common/core/domain/model/LoginBody.java b/src/main/java/org/dromara/common/core/domain/model/LoginBody.java
index 63bee0d..7fd5b70 100644
--- a/src/main/java/org/dromara/common/core/domain/model/LoginBody.java
+++ b/src/main/java/org/dromara/common/core/domain/model/LoginBody.java
@@ -30,11 +30,6 @@ public class LoginBody implements Serializable {
@NotBlank(message = "{auth.grant.type.not.blank}")
private String grantType;
- /**
- * 租户ID
- */
- private String tenantId;
-
/**
* 验证码
*/
diff --git a/src/main/java/org/dromara/common/core/domain/model/LoginUser.java b/src/main/java/org/dromara/common/core/domain/model/LoginUser.java
index 71b3429..943fb08 100644
--- a/src/main/java/org/dromara/common/core/domain/model/LoginUser.java
+++ b/src/main/java/org/dromara/common/core/domain/model/LoginUser.java
@@ -22,11 +22,6 @@ public class LoginUser implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
- /**
- * 租户ID
- */
- private String tenantId;
-
/**
* 用户ID
*/
diff --git a/src/main/java/org/dromara/common/log/event/LogininforEvent.java b/src/main/java/org/dromara/common/log/event/LogininforEvent.java
index 938eaad..e54693c 100644
--- a/src/main/java/org/dromara/common/log/event/LogininforEvent.java
+++ b/src/main/java/org/dromara/common/log/event/LogininforEvent.java
@@ -19,11 +19,6 @@ public class LogininforEvent implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
- /**
- * 租户ID
- */
- private String tenantId;
-
/**
* 用户账号
*/
diff --git a/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java b/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java
index 6ddaa24..2f81145 100644
--- a/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java
+++ b/src/main/java/org/dromara/common/mybatis/handler/PlusDataPermissionHandler.java
@@ -67,7 +67,7 @@ public class PlusDataPermissionHandler {
DataPermissionHelper.setVariable("user", currentUser);
}
// 如果是超级管理员或租户管理员,则不过滤数据
- if (LoginHelper.isSuperAdmin() || LoginHelper.isTenantAdmin()) {
+ if (LoginHelper.isSuperAdmin()) {
return where;
}
String dataFilterSql = buildDataFilter(dataColumns, isSelect);
diff --git a/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java b/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java
index edfb2f4..aad6409 100644
--- a/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java
+++ b/src/main/java/org/dromara/common/satoken/utils/LoginHelper.java
@@ -9,12 +9,10 @@ import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import org.dromara.common.core.constant.TenantConstants;
import org.dromara.common.core.constant.UserConstants;
import org.dromara.common.core.domain.model.LoginUser;
import org.dromara.common.core.enums.UserType;
-import java.util.Set;
import java.util.function.Supplier;
/**
@@ -33,10 +31,8 @@ import java.util.function.Supplier;
public class LoginHelper {
public static final String LOGIN_USER_KEY = "loginUser";
- public static final String TENANT_KEY = "tenantId";
public static final String USER_KEY = "userId";
public static final String CLIENT_KEY = "clientid";
- public static final String TENANT_ADMIN_KEY = "isTenantAdmin";
/**
* 登录系统 基于 设备类型
@@ -48,12 +44,10 @@ public class LoginHelper {
public static void login(LoginUser loginUser, SaLoginModel model) {
SaStorage storage = SaHolder.getStorage();
storage.set(LOGIN_USER_KEY, loginUser);
- storage.set(TENANT_KEY, loginUser.getTenantId());
storage.set(USER_KEY, loginUser.getUserId());
model = ObjectUtil.defaultIfNull(model, new SaLoginModel());
StpUtil.login(loginUser.getLoginId(),
- model.setExtra(TENANT_KEY, loginUser.getTenantId())
- .setExtra(USER_KEY, loginUser.getUserId())
+ model.setExtra(USER_KEY, loginUser.getUserId())
);
StpUtil.getTokenSession().set(LOGIN_USER_KEY, loginUser);
}
@@ -89,13 +83,6 @@ public class LoginHelper {
return Convert.toLong(getExtra(USER_KEY));
}
- /**
- * 获取租户ID
- */
- public static String getTenantId() {
- return Convert.toStr(getExtra(TENANT_KEY));
- }
-
private static Object getExtra(String key) {
return getStorageIfAbsentSet(key, () -> StpUtil.getExtra(key));
}
@@ -129,23 +116,6 @@ public class LoginHelper {
return isSuperAdmin(getUserId());
}
- /**
- * 是否为超级管理员
- *
- * @param rolePermission 角色权限标识组
- * @return 结果
- */
- public static boolean isTenantAdmin(Set rolePermission) {
- return rolePermission.contains(TenantConstants.TENANT_ADMIN_ROLE_KEY);
- }
-
- public static boolean isTenantAdmin() {
- Object value = getStorageIfAbsentSet(TENANT_ADMIN_KEY, () -> {
- return isTenantAdmin(getLoginUser().getRolePermission());
- });
- return Convert.toBool(value);
- }
-
public static boolean isLogin() {
return getLoginUser() != null;
}
diff --git a/src/main/java/org/dromara/system/controller/system/SysMenuController.java b/src/main/java/org/dromara/system/controller/system/SysMenuController.java
index 68c570f..d677859 100644
--- a/src/main/java/org/dromara/system/controller/system/SysMenuController.java
+++ b/src/main/java/org/dromara/system/controller/system/SysMenuController.java
@@ -100,22 +100,6 @@ public class SysMenuController extends BaseController {
return R.ok(selectVo);
}
- /**
- * 加载对应租户套餐菜单列表树
- *
- * @param packageId 租户套餐ID
- */
- @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY)
- @SaCheckPermission("system:menu:query")
- @GetMapping(value = "/tenantPackageMenuTreeselect/{packageId}")
- public R tenantPackageMenuTreeselect(@PathVariable("packageId") Long packageId) {
- List menus = menuService.selectMenuList(LoginHelper.getUserId());
- MenuTreeSelectVo selectVo = new MenuTreeSelectVo();
- selectVo.setCheckedKeys(menuService.selectMenuListByPackageId(packageId));
- selectVo.setMenus(menuService.buildMenuTreeSelect(menus));
- return R.ok(selectVo);
- }
-
/**
* 新增菜单
*/
diff --git a/src/main/java/org/dromara/system/domain/SysLogininfor.java b/src/main/java/org/dromara/system/domain/SysLogininfor.java
index c57dc0a..e646fc8 100644
--- a/src/main/java/org/dromara/system/domain/SysLogininfor.java
+++ b/src/main/java/org/dromara/system/domain/SysLogininfor.java
@@ -27,11 +27,6 @@ public class SysLogininfor implements Serializable {
@TableId(value = "info_id")
private Long infoId;
- /**
- * 租户编号
- */
- private String tenantId;
-
/**
* 用户账号
*/
diff --git a/src/main/java/org/dromara/system/domain/bo/SysLogininforBo.java b/src/main/java/org/dromara/system/domain/bo/SysLogininforBo.java
index 4646162..8cce254 100644
--- a/src/main/java/org/dromara/system/domain/bo/SysLogininforBo.java
+++ b/src/main/java/org/dromara/system/domain/bo/SysLogininforBo.java
@@ -23,11 +23,6 @@ public class SysLogininforBo {
*/
private Long infoId;
- /**
- * 租户编号
- */
- private String tenantId;
-
/**
* 用户账号
*/
diff --git a/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java b/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java
index de19aea..3292159 100644
--- a/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java
+++ b/src/main/java/org/dromara/system/domain/vo/SysLogininforVo.java
@@ -34,11 +34,6 @@ public class SysLogininforVo implements Serializable {
@ExcelProperty(value = "序号")
private Long infoId;
- /**
- * 租户编号
- */
- private String tenantId;
-
/**
* 用户账号
*/
diff --git a/src/main/java/org/dromara/system/domain/vo/SysUserVo.java b/src/main/java/org/dromara/system/domain/vo/SysUserVo.java
index c46ea37..321c73e 100644
--- a/src/main/java/org/dromara/system/domain/vo/SysUserVo.java
+++ b/src/main/java/org/dromara/system/domain/vo/SysUserVo.java
@@ -33,11 +33,6 @@ public class SysUserVo implements Serializable {
*/
private Long userId;
- /**
- * 租户ID
- */
- private String tenantId;
-
/**
* 用户账号
*/
diff --git a/src/main/java/org/dromara/system/service/ISysConfigService.java b/src/main/java/org/dromara/system/service/ISysConfigService.java
index f7efda7..82eb3b0 100644
--- a/src/main/java/org/dromara/system/service/ISysConfigService.java
+++ b/src/main/java/org/dromara/system/service/ISysConfigService.java
@@ -35,10 +35,9 @@ public interface ISysConfigService {
/**
* 获取注册开关
- * @param tenantId 租户id
* @return true开启,false关闭
*/
- boolean selectRegisterEnabled(String tenantId);
+ boolean selectRegisterEnabled();
/**
* 查询参数配置列表
diff --git a/src/main/java/org/dromara/system/service/ISysUserService.java b/src/main/java/org/dromara/system/service/ISysUserService.java
index c631833..d8be432 100644
--- a/src/main/java/org/dromara/system/service/ISysUserService.java
+++ b/src/main/java/org/dromara/system/service/ISysUserService.java
@@ -121,11 +121,10 @@ public interface ISysUserService {
/**
* 注册用户信息
- *
* @param user 用户信息
* @return 结果
*/
- boolean registerUser(SysUserBo user, String tenantId);
+ boolean registerUser(SysUserBo user);
/**
* 修改用户信息
diff --git a/src/main/java/org/dromara/system/service/impl/SysConfigServiceImpl.java b/src/main/java/org/dromara/system/service/impl/SysConfigServiceImpl.java
index ef7ed93..b64f4af 100644
--- a/src/main/java/org/dromara/system/service/impl/SysConfigServiceImpl.java
+++ b/src/main/java/org/dromara/system/service/impl/SysConfigServiceImpl.java
@@ -80,11 +80,10 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
/**
* 获取注册开关
- * @param tenantId 租户id
* @return true开启,false关闭
*/
@Override
- public boolean selectRegisterEnabled(String tenantId) {
+ public boolean selectRegisterEnabled() {
SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper()
.eq(SysConfig::getConfigKey, "sys.account.registerUser")
);
diff --git a/src/main/java/org/dromara/system/service/impl/SysLogininforServiceImpl.java b/src/main/java/org/dromara/system/service/impl/SysLogininforServiceImpl.java
index bb115f1..c642851 100644
--- a/src/main/java/org/dromara/system/service/impl/SysLogininforServiceImpl.java
+++ b/src/main/java/org/dromara/system/service/impl/SysLogininforServiceImpl.java
@@ -80,7 +80,6 @@ public class SysLogininforServiceImpl implements ISysLogininforService {
String browser = userAgent.getBrowser().getName();
// 封装对象
SysLogininforBo logininfor = new SysLogininforBo();
- logininfor.setTenantId(logininforEvent.getTenantId());
logininfor.setUserName(logininforEvent.getUsername());
if (ObjectUtil.isNotNull(client)) {
logininfor.setClientKey(client.getClientKey());
diff --git a/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java b/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java
index 6b4b0e2..2f227a3 100644
--- a/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java
+++ b/src/main/java/org/dromara/system/service/impl/SysUserServiceImpl.java
@@ -258,12 +258,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
/**
* 注册用户信息
- *
* @param user 用户信息
* @return 结果
*/
@Override
- public boolean registerUser(SysUserBo user, String tenantId) {
+ public boolean registerUser(SysUserBo user) {
user.setCreateBy(user.getUserId());
user.setUpdateBy(user.getUserId());
SysUser sysUser = MapstructUtils.convert(user, SysUser.class);
diff --git a/src/main/java/org/dromara/web/controller/AuthController.java b/src/main/java/org/dromara/web/controller/AuthController.java
index ca253c5..140862d 100644
--- a/src/main/java/org/dromara/web/controller/AuthController.java
+++ b/src/main/java/org/dromara/web/controller/AuthController.java
@@ -97,7 +97,7 @@ public class AuthController {
@ApiEncrypt
@PostMapping("/register")
public R register(@Validated @RequestBody RegisterBody user) {
- if (!configService.selectRegisterEnabled(user.getTenantId())) {
+ if (!configService.selectRegisterEnabled()) {
return R.fail("当前系统没有开启注册功能!");
}
registerService.register(user);
diff --git a/src/main/java/org/dromara/web/listener/UserActionListener.java b/src/main/java/org/dromara/web/listener/UserActionListener.java
index ced42d6..caf2b49 100644
--- a/src/main/java/org/dromara/web/listener/UserActionListener.java
+++ b/src/main/java/org/dromara/web/listener/UserActionListener.java
@@ -61,7 +61,6 @@ public class UserActionListener implements SaTokenListener {
}
// 记录登录日志
LogininforEvent logininforEvent = new LogininforEvent();
- logininforEvent.setTenantId(user.getTenantId());
logininforEvent.setUsername(user.getUsername());
logininforEvent.setStatus(Constants.LOGIN_SUCCESS);
logininforEvent.setMessage(MessageUtils.message("user.login.success"));
diff --git a/src/main/java/org/dromara/web/service/SysLoginService.java b/src/main/java/org/dromara/web/service/SysLoginService.java
index 8e1ae7b..ae95992 100644
--- a/src/main/java/org/dromara/web/service/SysLoginService.java
+++ b/src/main/java/org/dromara/web/service/SysLoginService.java
@@ -60,7 +60,7 @@ public class SysLoginService {
if (ObjectUtil.isNull(loginUser)) {
return;
}
- recordLogininfor(loginUser.getTenantId(), loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success"));
+ recordLogininfor(loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success"));
} catch (NotLoginException ignored) {
} finally {
try {
@@ -73,14 +73,12 @@ public class SysLoginService {
/**
* 记录登录信息
*
- * @param tenantId 租户ID
* @param username 用户名
* @param status 状态
* @param message 消息内容
*/
- public void recordLogininfor(String tenantId, String username, String status, String message) {
+ public void recordLogininfor(String username, String status, String message) {
LogininforEvent logininforEvent = new LogininforEvent();
- logininforEvent.setTenantId(tenantId);
logininforEvent.setUsername(username);
logininforEvent.setStatus(status);
logininforEvent.setMessage(message);
@@ -94,7 +92,6 @@ public class SysLoginService {
*/
public LoginUser buildLoginUser(SysUserVo user) {
LoginUser loginUser = new LoginUser();
- loginUser.setTenantId(user.getTenantId());
loginUser.setUserId(user.getUserId());
loginUser.setUsername(user.getUserName());
loginUser.setNickname(user.getNickName());
@@ -123,7 +120,7 @@ public class SysLoginService {
/**
* 登录校验
*/
- public void checkLogin(LoginType loginType, String tenantId, String username, Supplier supplier) {
+ public void checkLogin(LoginType loginType, String username, Supplier supplier) {
String errorKey = GlobalConstants.PWD_ERR_CNT_KEY + username;
String loginFail = Constants.LOGIN_FAIL;
@@ -131,7 +128,7 @@ public class SysLoginService {
int errorNumber = ObjectUtil.defaultIfNull(RedisUtils.getCacheObject(errorKey), 0);
// 锁定时间内登录 则踢出
if (errorNumber >= maxRetryCount) {
- recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
+ recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime);
}
@@ -141,11 +138,11 @@ public class SysLoginService {
RedisUtils.setCacheObject(errorKey, errorNumber, Duration.ofMinutes(lockTime));
// 达到规定错误次数 则锁定登录
if (errorNumber >= maxRetryCount) {
- recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
+ recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime));
throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime);
} else {
// 未达到规定错误次数
- recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber));
+ recordLogininfor(username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber));
throw new UserException(loginType.getRetryLimitCount(), errorNumber);
}
}
diff --git a/src/main/java/org/dromara/web/service/SysRegisterService.java b/src/main/java/org/dromara/web/service/SysRegisterService.java
index fee412c..e70de27 100644
--- a/src/main/java/org/dromara/web/service/SysRegisterService.java
+++ b/src/main/java/org/dromara/web/service/SysRegisterService.java
@@ -41,7 +41,6 @@ public class SysRegisterService {
* 注册
*/
public void register(RegisterBody registerBody) {
- String tenantId = registerBody.getTenantId();
String username = registerBody.getUsername();
String password = registerBody.getPassword();
// 校验用户类型是否存在
@@ -50,7 +49,7 @@ public class SysRegisterService {
boolean captchaEnabled = captchaProperties.getEnable();
// 验证码开关
if (captchaEnabled) {
- validateCaptcha(tenantId, username, registerBody.getCode(), registerBody.getUuid());
+ validateCaptcha(username, registerBody.getCode(), registerBody.getUuid());
}
SysUserBo sysUser = new SysUserBo();
sysUser.setUserName(username);
@@ -64,11 +63,11 @@ public class SysRegisterService {
if (exist) {
throw new UserException("user.register.save.error", username);
}
- boolean regFlag = userService.registerUser(sysUser, tenantId);
+ boolean regFlag = userService.registerUser(sysUser);
if (!regFlag) {
throw new UserException("user.register.error");
}
- recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.register.success"));
+ recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success"));
}
/**
@@ -78,16 +77,16 @@ public class SysRegisterService {
* @param code 验证码
* @param uuid 唯一标识
*/
- public void validateCaptcha(String tenantId, String username, String code, String uuid) {
+ public void validateCaptcha(String username, String code, String uuid) {
String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, "");
String captcha = RedisUtils.getCacheObject(verifyKey);
RedisUtils.deleteObject(verifyKey);
if (captcha == null) {
- recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.expire"));
+ recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.expire"));
throw new CaptchaExpireException();
}
if (!code.equalsIgnoreCase(captcha)) {
- recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.error"));
+ recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.error"));
throw new CaptchaException();
}
}
@@ -95,15 +94,13 @@ public class SysRegisterService {
/**
* 记录登录信息
*
- * @param tenantId 租户ID
* @param username 用户名
* @param status 状态
* @param message 消息内容
* @return
*/
- private void recordLogininfor(String tenantId, String username, String status, String message) {
+ private void recordLogininfor(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/src/main/java/org/dromara/web/service/impl/PasswordAuthStrategy.java b/src/main/java/org/dromara/web/service/impl/PasswordAuthStrategy.java
index df64ac4..dcb0714 100644
--- a/src/main/java/org/dromara/web/service/impl/PasswordAuthStrategy.java
+++ b/src/main/java/org/dromara/web/service/impl/PasswordAuthStrategy.java
@@ -50,7 +50,6 @@ public class PasswordAuthStrategy implements IAuthStrategy {
public LoginVo login(String body, SysClient client) {
PasswordLoginBody loginBody = JsonUtils.parseObject(body, PasswordLoginBody.class);
ValidatorUtils.validate(loginBody);
- String tenantId = loginBody.getTenantId();
String username = loginBody.getUsername();
String password = loginBody.getPassword();
String code = loginBody.getCode();
@@ -59,11 +58,11 @@ public class PasswordAuthStrategy implements IAuthStrategy {
boolean captchaEnabled = captchaProperties.getEnable();
// 验证码开关
if (captchaEnabled) {
- validateCaptcha(tenantId, username, code, uuid);
+ validateCaptcha(username, code, uuid);
}
- SysUserVo user = loadUserByUsername(tenantId, username);
- loginService.checkLogin(LoginType.PASSWORD, tenantId, username, () -> !BCrypt.checkpw(password, user.getPassword()));
+ SysUserVo user = loadUserByUsername(username);
+ loginService.checkLogin(LoginType.PASSWORD, username, () -> !BCrypt.checkpw(password, user.getPassword()));
// 此处可根据登录用户的数据不同 自行创建 loginUser
LoginUser loginUser = loginService.buildLoginUser(user);
loginUser.setClientKey(client.getClientKey());
@@ -92,21 +91,21 @@ public class PasswordAuthStrategy implements IAuthStrategy {
* @param code 验证码
* @param uuid 唯一标识
*/
- private void validateCaptcha(String tenantId, String username, String code, String uuid) {
+ private void validateCaptcha(String username, String code, String uuid) {
String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, "");
String captcha = RedisUtils.getCacheObject(verifyKey);
RedisUtils.deleteObject(verifyKey);
if (captcha == null) {
- loginService.recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
+ loginService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"));
throw new CaptchaExpireException();
}
if (!code.equalsIgnoreCase(captcha)) {
- loginService.recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"));
+ loginService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"));
throw new CaptchaException();
}
}
- private SysUserVo loadUserByUsername(String tenantId, String username) {
+ private SysUserVo loadUserByUsername(String username) {
SysUser user = userMapper.selectOne(new LambdaQueryWrapper()
.select(SysUser::getUserName, SysUser::getStatus)
.eq(SysUser::getUserName, username));
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 4aaea57..dcffb01 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -8,22 +8,6 @@ spring.boot.admin.client:
username: ruoyi
password: 123456
---- # powerjob 配置
-powerjob:
- worker:
- # 如何开启调度中心请查看文档教程
- enabled: false
- # 需要先在 powerjob 登录页执行应用注册后才能使用
- app-name: ruoyi-worker
- allow-lazy-connect-server: false
- max-appended-wf-context-length: 4096
- max-result-length: 4096
- # 28080 端口 随着主应用端口飘逸 避免集群冲突
- port: 2${server.port}
- protocol: http
- server-address: 127.0.0.1:7700
- store-strategy: disk
-
--- # 数据源配置
spring:
datasource:
@@ -125,123 +109,3 @@ redisson:
timeout: 3000
# 发布和订阅连接池大小
subscriptionConnectionPoolSize: 50
-
---- # mail 邮件发送
-mail:
- enabled: false
- host: smtp.163.com
- port: 465
- # 是否需要用户名密码验证
- auth: true
- # 发送方,遵循RFC-822标准
- from: xxx@163.com
- # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
- user: xxx@163.com
- # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
- pass: xxxxxxxxxx
- # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
- starttlsEnable: true
- # 使用SSL安全连接
- sslEnable: true
- # SMTP超时时长,单位毫秒,缺省值不超时
- timeout: 0
- # Socket连接超时值,单位毫秒,缺省值不超时
- connectionTimeout: 0
-
---- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
-# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
-sms:
- # 阿里云 dysmsapi.aliyuncs.com
- alibaba:
- #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
- requestUrl: dysmsapi.aliyuncs.com
- #阿里云的accessKey
- accessKeyId: xxxxxxx
- #阿里云的accessKeySecret
- accessKeySecret: xxxxxxx
- #短信签名
- signature: 测试
- tencent:
- #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
- requestUrl: sms.tencentcloudapi.com
- #腾讯云的accessKey
- accessKeyId: xxxxxxx
- #腾讯云的accessKeySecret
- accessKeySecret: xxxxxxx
- #短信签名
- signature: 测试
- #短信sdkAppId
- sdkAppId: appid
- #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
- territory: ap-guangzhou
-
-
---- # 三方授权
-justauth:
- enabled: true
- # 前端外网访问地址
- address: http://localhost:80
- type:
- maxkey:
- # maxkey 服务器地址
- # 注意 如下均配置均不需要修改 maxkey 已经内置好了数据
- server-url: http://sso.maxkey.top
- client-id: 876892492581044224
- client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8
- redirect-uri: ${justauth.address}/social-callback?source=maxkey
- qq:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=qq
- union-id: false
- weibo:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=weibo
- gitee:
- client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98
- client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac
- redirect-uri: ${justauth.address}/social-callback?source=gitee
- dingtalk:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=dingtalk
- baidu:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=baidu
- csdn:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=csdn
- coding:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=coding
- coding-group-name: xx
- oschina:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=oschina
- alipay_wallet:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet
- alipay-public-key: MIIB**************DAQAB
- wechat_open:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=wechat_open
- wechat_mp:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=wechat_mp
- wechat_enterprise:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise
- agent-id: 1000002
- gitlab:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=gitlab
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index 782a680..174510f 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -11,22 +11,6 @@ spring.boot.admin.client:
username: ruoyi
password: 123456
---- # powerjob 配置
-powerjob:
- worker:
- # 如何开启调度中心请查看文档教程
- enabled: false
- # 需要先在 powerjob 登录页执行应用注册后才能使用
- app-name: ruoyi-worker
- allow-lazy-connect-server: false
- max-appended-wf-context-length: 4096
- max-result-length: 4096
- # 28080 端口 随着主应用端口飘逸 避免集群冲突
- port: 2${server.port}
- protocol: http
- server-address: 127.0.0.1:7700
- store-strategy: disk
-
--- # 数据源配置
spring:
datasource:
@@ -128,122 +112,3 @@ redisson:
timeout: 3000
# 发布和订阅连接池大小
subscriptionConnectionPoolSize: 50
-
---- # mail 邮件发送
-mail:
- enabled: false
- host: smtp.163.com
- port: 465
- # 是否需要用户名密码验证
- auth: true
- # 发送方,遵循RFC-822标准
- from: xxx@163.com
- # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
- user: xxx@163.com
- # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
- pass: xxxxxxxxxx
- # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
- starttlsEnable: true
- # 使用SSL安全连接
- sslEnable: true
- # SMTP超时时长,单位毫秒,缺省值不超时
- timeout: 0
- # Socket连接超时值,单位毫秒,缺省值不超时
- connectionTimeout: 0
-
---- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
-# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
-sms:
- # 阿里云 dysmsapi.aliyuncs.com
- alibaba:
- #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
- requestUrl: dysmsapi.aliyuncs.com
- #阿里云的accessKey
- accessKeyId: xxxxxxx
- #阿里云的accessKeySecret
- accessKeySecret: xxxxxxx
- #短信签名
- signature: 测试
- tencent:
- #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
- requestUrl: sms.tencentcloudapi.com
- #腾讯云的accessKey
- accessKeyId: xxxxxxx
- #腾讯云的accessKeySecret
- accessKeySecret: xxxxxxx
- #短信签名
- signature: 测试
- #短信sdkAppId
- sdkAppId: appid
- #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
- territory: ap-guangzhou
-
---- # 三方授权
-justauth:
- enabled: true
- # 前端外网访问地址
- address: http://localhost:80
- type:
- maxkey:
- # maxkey 服务器地址
- # 注意 如下均配置均不需要修改 maxkey 已经内置好了数据
- server-url: http://sso.maxkey.top
- client-id: 876892492581044224
- client-secret: x1Y5MTMwNzIwMjMxNTM4NDc3Mzche8
- redirect-uri: ${justauth.address}/social-callback?source=maxkey
- qq:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=qq
- union-id: false
- weibo:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=weibo
- gitee:
- client-id: 91436b7940090d09c72c7daf85b959cfd5f215d67eea73acbf61b6b590751a98
- client-secret: 02c6fcfd70342980cd8dd2f2c06c1a350645d76c754d7a264c4e125f9ba915ac
- redirect-uri: ${justauth.address}/social-callback?source=gitee
- dingtalk:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=dingtalk
- baidu:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=baidu
- csdn:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=csdn
- coding:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=coding
- coding-group-name: xx
- oschina:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=oschina
- alipay_wallet:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=alipay_wallet
- alipay-public-key: MIIB**************DAQAB
- wechat_open:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=wechat_open
- wechat_mp:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=wechat_mp
- wechat_enterprise:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=wechat_enterprise
- agent-id: 1000002
- gitlab:
- client-id: 10**********6
- client-secret: 1f7d08**********5b7**********29e
- redirect-uri: ${justauth.address}/social-callback?source=gitlab
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 696f00e..ec76df3 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -119,19 +119,6 @@ security:
- /actuator
- /actuator/**
-# 多租户配置
-tenant:
- # 是否开启
- enable: true
- # 排除表
- excludes:
- - sys_menu
- - sys_role_menu
- - sys_user_post
- - sys_user_role
- - sys_client
- - sys_oss_config
-
# MyBatisPlus配置
# https://baomidou.com/config/
mybatis-plus:
diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties
index cce11c8..9876158 100644
--- a/src/main/resources/i18n/messages.properties
+++ b/src/main/resources/i18n/messages.properties
@@ -54,8 +54,3 @@ xcx.code.not.blank=小程序[code]不能为空
social.source.not.blank=第三方登录平台[source]不能为空
social.code.not.blank=第三方登录平台[code]不能为空
social.state.not.blank=第三方登录平台[state]不能为空
-##租户
-tenant.number.not.blank=租户编号不能为空
-tenant.not.exists=对不起, 您的租户不存在,请联系管理员
-tenant.blocked=对不起,您的租户已禁用,请联系管理员
-tenant.expired=对不起,您的租户已过期,请联系管理员
diff --git a/src/main/resources/i18n/messages_en_US.properties b/src/main/resources/i18n/messages_en_US.properties
index f948c4a..0dc99ab 100644
--- a/src/main/resources/i18n/messages_en_US.properties
+++ b/src/main/resources/i18n/messages_en_US.properties
@@ -54,8 +54,3 @@ xcx.code.not.blank=Mini program [code] cannot be blank
social.source.not.blank=Social login platform [source] cannot be blank
social.code.not.blank=Social login platform [code] cannot be blank
social.state.not.blank=Social login platform [state] 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/src/main/resources/i18n/messages_zh_CN.properties b/src/main/resources/i18n/messages_zh_CN.properties
index cce11c8..9876158 100644
--- a/src/main/resources/i18n/messages_zh_CN.properties
+++ b/src/main/resources/i18n/messages_zh_CN.properties
@@ -54,8 +54,3 @@ xcx.code.not.blank=小程序[code]不能为空
social.source.not.blank=第三方登录平台[source]不能为空
social.code.not.blank=第三方登录平台[code]不能为空
social.state.not.blank=第三方登录平台[state]不能为空
-##租户
-tenant.number.not.blank=租户编号不能为空
-tenant.not.exists=对不起, 您的租户不存在,请联系管理员
-tenant.blocked=对不起,您的租户已禁用,请联系管理员
-tenant.expired=对不起,您的租户已过期,请联系管理员
diff --git a/src/main/resources/mapper/system/SysUserMapper.xml b/src/main/resources/mapper/system/SysUserMapper.xml
index 72b1f17..9bc829e 100644
--- a/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/src/main/resources/mapper/system/SysUserMapper.xml
@@ -18,7 +18,6 @@
select u.user_id,
- u.tenant_id,
u.user_name,
u.nick_name,
u.user_type,