From c936e391f50eedf3d3aacfef42d2a541b46c61d8 Mon Sep 17 00:00:00 2001 From: Parker Date: Tue, 16 Nov 2021 23:57:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E7=9B=B8=E5=85=B3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增、修改组织机构清理当前用户组织树缓存 2. setOrg 方法取出没必要的 id去重 3. 超级管理员只查看自己的数据 4. 组织机构不可删除BUG --- db-file/opsli-boot.sql | 731 ++++++++++-------- .../opsli/api/web/system/user/UserApi.java | 16 + .../api/web/system/user/UserOrgRefApi.java | 8 - .../api/wrapper/system/user/UserModel.java | 8 + .../chain/QueryTenantHandler.java | 20 +- .../java/org/opsli/core/utils/UserUtil.java | 2 +- .../role/service/impl/RoleServiceImpl.java | 69 +- .../modulars/system/user/entity/SysUser.java | 3 + .../service/impl/UserOrgRefServiceImpl.java | 1 - .../user/service/impl/UserServiceImpl.java | 2 + .../user/web/UserOrgRefRestController.java | 73 -- .../system/user/web/UserRestController.java | 37 + 12 files changed, 498 insertions(+), 472 deletions(-) diff --git a/db-file/opsli-boot.sql b/db-file/opsli-boot.sql index 034b28fb..6b1c9172 100644 --- a/db-file/opsli-boot.sql +++ b/db-file/opsli-boot.sql @@ -1,17 +1,17 @@ /* Navicat Premium Data Transfer - Source Server : 开发环境-MySQL + Source Server : OPSLI 快速开发平台 Source Server Type : MySQL Source Server Version : 50733 - Source Host : 10.0.0.28:3306 + Source Host : 127.0.0.1 Source Schema : opsli-boot Target Server Type : MySQL Target Server Version : 50733 File Encoding : 65001 - Date: 15/10/2021 17:37:50 + Date: 16/11/2021 23:56:17 */ SET NAMES utf8mb4; @@ -21,97 +21,102 @@ SET FOREIGN_KEY_CHECKS = 0; -- Table structure for gen_logs -- ---------------------------- DROP TABLE IF EXISTS `gen_logs`; -CREATE TABLE `gen_logs` ( +CREATE TABLE `gen_logs` ( `id` bigint(19) NOT NULL COMMENT '主键', `table_id` bigint(19) NOT NULL COMMENT '归属表ID', - `table_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表类型', - `package_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '生成包名', - `module_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '生成模块名', - `sub_module_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成子模块名', - `code_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '代码标题', - `code_title_brief` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '代码标题简介', - `author_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '作者名', + `table_type` varchar(30) NOT NULL COMMENT '表类型', + `package_name` varchar(255) NOT NULL COMMENT '生成包名', + `module_name` varchar(40) NOT NULL COMMENT '生成模块名', + `sub_module_name` varchar(40) DEFAULT NULL COMMENT '生成子模块名', + `code_title` varchar(100) NOT NULL COMMENT '代码标题', + `code_title_brief` varchar(100) NOT NULL COMMENT '代码标题简介', + `author_name` varchar(64) NOT NULL COMMENT '作者名', `template_id` bigint(19) NOT NULL COMMENT '模板ID', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', + `update_time` datetime NOT NULL COMMENT '修改日期', PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `table`(`id`, `table_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成器 - 生成日志' ROW_FORMAT = Dynamic; + UNIQUE KEY `table` (`id`,`table_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代码生成器 - 生成日志'; -- ---------------------------- -- Records of gen_logs -- ---------------------------- +BEGIN; INSERT INTO `gen_logs` VALUES (1340631269252005889, 1340630022558056449, '', 'org.opsli.modulars', 'gentest', 'carinfo', '汽车信息', '汽车信息', 'Parker', 1398253704724828162, 0, 1313694379541635074, '2020-12-20 20:12:57', 1313694379541635074, '2021-06-01 20:33:43'); INSERT INTO `gen_logs` VALUES (1359429290382323714, 1359428685312028674, '', 'org.opsli.modulars.gentest', 'other', 'crypto', '非对称加密管理', '非对称加密', 'Parker', 1398253704724828162, 0, 1313694379541635074, '2021-02-10 17:09:34', 1, '2021-06-02 18:33:30'); +COMMIT; -- ---------------------------- -- Table structure for gen_table -- ---------------------------- DROP TABLE IF EXISTS `gen_table`; -CREATE TABLE `gen_table` ( +CREATE TABLE `gen_table` ( `id` bigint(19) NOT NULL COMMENT '主键', - `table_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表名称', - `old_table_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表名称', - `table_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表类型', - `comments` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '描述', - `jdbc_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '数据库类型 { MySQL\\Oracle\\SQLServer ...}', - `iz_sync` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '同步', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注信息', + `table_name` varchar(100) NOT NULL COMMENT '表名称', + `old_table_name` varchar(100) NOT NULL COMMENT '表名称', + `table_type` varchar(30) NOT NULL COMMENT '表类型', + `comments` varchar(200) NOT NULL COMMENT '描述', + `jdbc_type` varchar(30) NOT NULL DEFAULT '0' COMMENT '数据库类型 { MySQL\\Oracle\\SQLServer ...}', + `iz_sync` char(1) DEFAULT '0' COMMENT '同步', + `remark` varchar(255) DEFAULT NULL COMMENT '备注信息', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', + `update_time` datetime NOT NULL COMMENT '修改日期', PRIMARY KEY (`id`) USING BTREE, - INDEX `creater_table_name`(`table_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成器 - 表信息' ROW_FORMAT = Dynamic; + KEY `creater_table_name` (`table_name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代码生成器 - 表信息'; -- ---------------------------- -- Records of gen_table -- ---------------------------- +BEGIN; INSERT INTO `gen_table` VALUES (1340630022558056449, 'test_car', 'test_car', '0', '测试汽车', 'mysql', '1', NULL, 1, 1313694379541635074, '2020-12-20 20:08:00', 1313694379541635074, '2020-12-20 20:10:48'); INSERT INTO `gen_table` VALUES (1356152016136482817, 'test_car_copy1', 'test_car_copy1', '0', '测试', 'mysql', '1', NULL, 0, 1313694379541635074, '2021-02-01 16:06:51', 1313694379541635074, '2021-02-01 16:06:51'); INSERT INTO `gen_table` VALUES (1359428685312028674, 'other_crypto_asymmetric', 'other_crypto_asymmetric', '0', '非对称加密表', 'mysql', '1', NULL, 12, 1313694379541635074, '2021-02-10 17:07:10', 1313694379541635074, '2021-05-26 20:39:14'); INSERT INTO `gen_table` VALUES (1397541427197468673, 'test_user', 'test_user', '0', '某系统用户', 'mysql', '0', NULL, 1, 1313694379541635074, '2021-05-26 21:13:36', 1313694379541635074, '2021-05-26 21:29:06'); +COMMIT; -- ---------------------------- -- Table structure for gen_table_column -- ---------------------------- DROP TABLE IF EXISTS `gen_table_column`; -CREATE TABLE `gen_table_column` ( +CREATE TABLE `gen_table_column` ( `id` bigint(19) NOT NULL COMMENT '主键', `table_id` bigint(19) NOT NULL COMMENT '归属表ID', - `field_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字段名称', - `field_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字段类型', - `field_length` int(11) NULL DEFAULT NULL COMMENT '字段长度', - `field_precision` int(11) NULL DEFAULT NULL COMMENT '字段精度', - `field_comments` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字段描述', - `iz_pk` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否主键', - `iz_not_null` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否可为空', - `iz_show_list` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否列表字段', - `iz_show_form` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否表单显示', - `query_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '检索类别', - `java_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Java数据类型', - `show_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字段生成方案(文本框、文本域、下拉框、复选框、单选框、字典选择、人员选择、部门选择、区域选择)', - `dict_type_code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典类型', + `field_name` varchar(100) NOT NULL COMMENT '字段名称', + `field_type` varchar(100) NOT NULL COMMENT '字段类型', + `field_length` int(11) DEFAULT NULL COMMENT '字段长度', + `field_precision` int(11) DEFAULT NULL COMMENT '字段精度', + `field_comments` varchar(200) NOT NULL COMMENT '字段描述', + `iz_pk` char(1) DEFAULT NULL COMMENT '是否主键', + `iz_not_null` char(1) DEFAULT NULL COMMENT '是否可为空', + `iz_show_list` char(1) DEFAULT NULL COMMENT '是否列表字段', + `iz_show_form` char(1) DEFAULT NULL COMMENT '是否表单显示', + `query_type` varchar(100) DEFAULT NULL COMMENT '检索类别', + `java_type` varchar(50) NOT NULL COMMENT 'Java数据类型', + `show_type` char(1) DEFAULT NULL COMMENT '字段生成方案(文本框、文本域、下拉框、复选框、单选框、字典选择、人员选择、部门选择、区域选择)', + `dict_type_code` varchar(120) DEFAULT NULL COMMENT '字典类型', `sort` smallint(6) NOT NULL COMMENT '排序(升序)', - `validate_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '验证类别', + `validate_type` varchar(500) DEFAULT NULL COMMENT '验证类别', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', + `update_time` datetime NOT NULL COMMENT '修改日期', PRIMARY KEY (`id`) USING BTREE, - INDEX `creater_table_column_sort`(`sort`) USING BTREE, - INDEX `creater_table_column_table_id`(`table_id`, `field_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成器 - 表结构\r\n' ROW_FORMAT = Dynamic; + KEY `creater_table_column_sort` (`sort`) USING BTREE, + KEY `creater_table_column_table_id` (`table_id`,`field_name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代码生成器 - 表结构\r\n'; -- ---------------------------- -- Records of gen_table_column -- ---------------------------- +BEGIN; INSERT INTO `gen_table_column` VALUES (1340630728203567106, 1340630022558056449, 'id', 'bigint', 19, 0, '主键', '1', '1', '0', '0', NULL, 'String', NULL, NULL, 0, '', 0, 1313694379541635074, '2020-12-20 20:10:48', 1313694379541635074, '2020-12-20 20:10:48'); INSERT INTO `gen_table_column` VALUES (1340630728220344321, 1340630022558056449, 'car_name', 'varchar', 20, 0, '汽车名称', '0', '1', '1', '1', 'EQ', 'String', '0', NULL, 1, 'IS_GENERAL_WITH_CHINESE', 0, 1313694379541635074, '2020-12-20 20:10:48', 1313694379541635074, '2020-12-20 20:10:48'); INSERT INTO `gen_table_column` VALUES (1340630728232927234, 1340630022558056449, 'car_type', 'varchar', 20, 0, '汽车类型', '0', '1', '1', '1', 'LIKE', 'String', '0', NULL, 2, 'IS_GENERAL_WITH_CHINESE', 0, 1313694379541635074, '2020-12-20 20:10:48', 1313694379541635074, '2020-12-20 20:10:48'); @@ -161,53 +166,57 @@ INSERT INTO `gen_table_column` VALUES (1397545330886537218, 1397541427197468673, INSERT INTO `gen_table_column` VALUES (1397545330903314433, 1397541427197468673, 'update_by', 'bigint', 19, 0, '修改用户', '0', '1', '0', '0', NULL, 'String', NULL, NULL, 11, '', 0, 1313694379541635074, '2021-05-26 21:29:07', 1313694379541635074, '2021-05-26 21:29:07'); INSERT INTO `gen_table_column` VALUES (1397545330920091649, 1397541427197468673, 'update_time', 'datetime', 0, 0, '修改日期', '0', '1', '0', '0', NULL, 'String', NULL, NULL, 12, '', 0, 1313694379541635074, '2021-05-26 21:29:07', 1313694379541635074, '2021-05-26 21:29:07'); INSERT INTO `gen_table_column` VALUES (1397545330928480257, 1397541427197468673, 'ts', 'timestamp', 0, 0, '时间戳', '0', '1', '0', '0', NULL, 'String', NULL, NULL, 13, '', 0, 1313694379541635074, '2021-05-26 21:29:07', 1313694379541635074, '2021-05-26 21:29:07'); +COMMIT; -- ---------------------------- -- Table structure for gen_template -- ---------------------------- DROP TABLE IF EXISTS `gen_template`; -CREATE TABLE `gen_template` ( +CREATE TABLE `gen_template` ( `id` bigint(19) NOT NULL COMMENT '主键', - `temp_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模板名称', - `table_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表类型', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注信息', + `temp_name` varchar(100) NOT NULL COMMENT '模板名称', + `table_type` varchar(30) NOT NULL COMMENT '表类型', + `remark` varchar(255) DEFAULT NULL COMMENT '备注信息', `version` int(10) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', + `update_time` datetime NOT NULL COMMENT '修改日期', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成器 - 模板' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代码生成器 - 模板'; -- ---------------------------- -- Records of gen_template -- ---------------------------- +BEGIN; INSERT INTO `gen_template` VALUES (1398253704724828162, 'Form表单', '0', '默认Form表单', 32, 1313694379541635074, '2021-05-28 20:23:56', 1313694379541635074, '2021-10-13 15:13:26'); +COMMIT; -- ---------------------------- -- Table structure for gen_template_detail -- ---------------------------- DROP TABLE IF EXISTS `gen_template_detail`; -CREATE TABLE `gen_template_detail` ( +CREATE TABLE `gen_template_detail` ( `id` bigint(19) NOT NULL COMMENT '主键', `parent_id` bigint(19) NOT NULL COMMENT '父级ID', - `type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型 0 后端 / 1 前端', - `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '路径', - `file_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件名', - `file_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件内容', - `ignore_file_name` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '忽略文件名', + `type` char(1) NOT NULL COMMENT '类型 0 后端 / 1 前端', + `path` varchar(255) NOT NULL COMMENT '路径', + `file_name` varchar(100) NOT NULL COMMENT '文件名', + `file_content` text NOT NULL COMMENT '文件内容', + `ignore_file_name` char(1) NOT NULL DEFAULT '0' COMMENT '忽略文件名', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', + `update_time` datetime NOT NULL COMMENT '修改日期', PRIMARY KEY (`id`) USING BTREE, - INDEX `creater_table_name`(`path`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成器 - 表信息' ROW_FORMAT = Dynamic; + KEY `creater_table_name` (`path`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代码生成器 - 表信息'; -- ---------------------------- -- Records of gen_template_detail -- ---------------------------- +BEGIN; INSERT INTO `gen_template_detail` VALUES (1448185088918077441, 1398253704724828162, '0', '${packageName}/${moduleName}/${subModuleName}/entity', '${model.tableHumpName}Entity.java', '#if(data.subModuleName != null && data.subModuleName != \"\")\npackage #(data.packageName+\".\"+data.moduleName+\".\"+data.subModuleName).entity;\n#else\npackage #(data.packageName+\".\"+data.moduleName).entity;\n#end\n\n#for(pkg : data.model.entityPkgList)\nimport #(pkg);\n#end\nimport com.baomidou.mybatisplus.annotation.FieldStrategy;\nimport com.baomidou.mybatisplus.annotation.TableField;\nimport com.baomidou.mybatisplus.annotation.TableLogic;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport org.opsli.core.base.entity.BaseEntity;\n\n/**\n * #(data.codeTitle) Entity\n *\n * @author #(data.authorName)\n * @date #(currTime)\n */\n@Data\n@EqualsAndHashCode(callSuper = false)\npublic class #(data.model.tableHumpName) extends BaseEntity {\n\n\n #for(column : data.model.columnList)\n ### 不等于 删除字段 和 不等于 租户字段放入上边\n #if(column.fieldHumpName != \"deleted\" && column.fieldHumpName != \"tenantId\")\n /** #(column.fieldComments) */\n #if(!column.izNotNull)\n @TableField(updateStrategy = FieldStrategy.IGNORED)\n #end\n private #(column.javaType) #(column.fieldHumpName);\n\n #end\n #end\n\n // ========================================\n\n ### 专门处理 删除字段 和 租户字段\n #for(column : data.model.columnList)\n #if(column.fieldHumpName == \"deleted\")\n /** 逻辑删除字段 */\n @TableLogic\n private Integer deleted;\n #else if(column.fieldHumpName == \"tenantId\")\n /** 多租户字段 */\n private String tenantId;\n #end\n\n #end\n\n}', '1', 0, 1313694379541635074, '2021-10-13 15:13:26', 1313694379541635074, '2021-10-13 15:13:26'); INSERT INTO `gen_template_detail` VALUES (1448185089241038850, 1398253704724828162, '0', '${packageName}/${moduleName}/${subModuleName}/mapper', '${model.tableHumpName}Mapper.java', '#if(data.subModuleName != null && data.subModuleName != \"\")\npackage #(data.packageName+\".\"+data.moduleName+\".\"+data.subModuleName).mapper;\n#else\npackage #(data.packageName+\".\"+data.moduleName).mapper;\n#end\n\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Param;\n#if(data.subModuleName != null && data.subModuleName != \"\")\nimport #(data.packageName+\".\"+data.moduleName+\".\"+data.subModuleName).entity.#(data.model.tableHumpName);\n#else\nimport #(data.packageName+\".\"+data.moduleName).entity.#(data.model.tableHumpName);\n#end\n\n/**\n * #(data.codeTitle) Mapper\n *\n * @author #(data.authorName)\n * @date #(currTime)\n */\n@Mapper\npublic interface #(data.model.tableHumpName)Mapper extends BaseMapper<#(data.model.tableHumpName)> {\n\n}', '0', 0, 1313694379541635074, '2021-10-13 15:13:26', 1313694379541635074, '2021-10-13 15:13:26'); INSERT INTO `gen_template_detail` VALUES (1448185089689829378, 1398253704724828162, '0', '${packageName}/${moduleName}/${subModuleName}/mapper/xml', '${model.tableHumpName}Mapper.xml', '\n\n#if(data.subModuleName != null && data.subModuleName != \"\")\n\n#else\n\n#end\n\n\n', '0', 0, 1313694379541635074, '2021-10-13 15:13:26', 1313694379541635074, '2021-10-13 15:13:26'); @@ -220,32 +229,34 @@ INSERT INTO `gen_template_detail` VALUES (1448185107255574530, 13982537047248281 INSERT INTO `gen_template_detail` VALUES (1448185112708169729, 1398253704724828162, '1', 'src/views/modules/${moduleName}/${subModuleName}/components', '${model.tableHumpName}ManagementEdit.vue', '\n\n\n', '0', 0, 1313694379541635074, '2021-10-13 15:13:32', 1313694379541635074, '2021-10-13 15:13:32'); INSERT INTO `gen_template_detail` VALUES (1448185118160764930, 1398253704724828162, '1', 'src/views/modules/${moduleName}/${subModuleName}/components', '${model.tableHumpName}ManagementImport.vue', '\n\n\n', '0', 0, 1313694379541635074, '2021-10-13 15:13:33', 1313694379541635074, '2021-10-13 15:13:33'); INSERT INTO `gen_template_detail` VALUES (1448185124422860802, 1398253704724828162, '1', 'src/views/modules/${moduleName}/${subModuleName}', 'index.vue', '\n\n\n', '0', 0, 1313694379541635074, '2021-10-13 15:13:34', 1313694379541635074, '2021-10-13 15:13:34'); +COMMIT; -- ---------------------------- -- Table structure for sys_area -- ---------------------------- DROP TABLE IF EXISTS `sys_area`; -CREATE TABLE `sys_area` ( +CREATE TABLE `sys_area` ( `id` bigint(19) NOT NULL COMMENT '唯一主键', - `parent_id` bigint(19) NULL DEFAULT NULL COMMENT '上级ID', - `area_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '地域编号', - `area_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地域名称', + `parent_id` bigint(19) DEFAULT NULL COMMENT '上级ID', + `area_code` varchar(40) NOT NULL COMMENT '地域编号', + `area_name` varchar(40) DEFAULT NULL COMMENT '地域名称', `area_type` int(5) NOT NULL COMMENT '地域类型', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记:0未删除,1删除', - `version` int(11) NOT NULL DEFAULT 0 COMMENT '版本(乐观锁)', + `deleted` char(1) NOT NULL DEFAULT '0' COMMENT '删除标记:0未删除,1删除', + `version` int(11) NOT NULL DEFAULT '0' COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `area`(`area_code`) USING BTREE, - INDEX `parent_id`(`parent_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '地区表' ROW_FORMAT = Dynamic; + UNIQUE KEY `area` (`area_code`) USING BTREE, + KEY `parent_id` (`parent_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='地区表'; -- ---------------------------- -- Records of sys_area -- ---------------------------- +BEGIN; INSERT INTO `sys_area` VALUES (86, 0, '86', '中国', 0, '0', 3, 1, '2020-12-28 17:43:30', 1, '2021-01-25 17:36:59', '2021-04-08 23:50:42'); INSERT INTO `sys_area` VALUES (110000, 86, '110000', '北京市', 1, '0', 0, 1, '2020-12-28 17:43:30', 1, '2020-12-28 17:43:30', '2021-04-08 23:50:42'); INSERT INTO `sys_area` VALUES (110101, 110000, '110101', '东城区', 2, '0', 0, 1, '2020-12-28 17:43:30', 1, '2020-12-28 17:43:30', '2021-04-08 23:50:42'); @@ -3459,31 +3470,33 @@ INSERT INTO `sys_area` VALUES (659010, 650000, '659010', '胡杨河市', 2, '0', INSERT INTO `sys_area` VALUES (710000, 86, '710000', '台湾省', 1, '0', 0, 1, '2020-12-28 17:43:31', 1, '2020-12-28 17:43:31', '2021-04-08 23:50:42'); INSERT INTO `sys_area` VALUES (810000, 86, '810000', '香港特别行政区', 1, '0', 0, 1, '2020-12-28 17:43:31', 1, '2020-12-28 17:43:31', '2021-04-08 23:50:42'); INSERT INTO `sys_area` VALUES (820000, 86, '820000', '澳门特别行政区', 1, '0', 0, 1, '2020-12-28 17:43:31', 1, '2020-12-28 17:43:31', '2021-04-08 23:50:42'); +COMMIT; -- ---------------------------- -- Table structure for sys_dict -- ---------------------------- DROP TABLE IF EXISTS `sys_dict`; -CREATE TABLE `sys_dict` ( +CREATE TABLE `sys_dict` ( `id` bigint(19) NOT NULL COMMENT '字典主键', - `type_code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典编号', - `type_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称', - `iz_lock` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否内置 0否 1是', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记:0未删除,1删除', + `type_code` varchar(120) NOT NULL COMMENT '字典编号', + `type_name` varchar(120) NOT NULL COMMENT '字典名称', + `iz_lock` char(1) NOT NULL COMMENT '是否内置 0否 1是', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `deleted` char(1) NOT NULL DEFAULT '0' COMMENT '删除标记:0未删除,1删除', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建人', - `create_time` datetime(0) NOT NULL COMMENT '创建时间', + `create_time` datetime NOT NULL COMMENT '创建时间', `update_by` bigint(19) NOT NULL COMMENT '修改人', - `update_time` datetime(0) NOT NULL COMMENT '修改时间', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改时间', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `type_code_typename_unique`(`type_code`, `type_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典表' ROW_FORMAT = Dynamic; + KEY `type_code_typename_unique` (`type_code`,`type_name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典表'; -- ---------------------------- -- Records of sys_dict -- ---------------------------- +BEGIN; INSERT INTO `sys_dict` VALUES (1308396497528434689, '010110', '测试字典123', '1', '测试修改 - 123123', '1', 2, 1, '2020-09-22 08:23:28', 1, '2020-09-22 10:59:29', '2021-04-08 23:50:52'); INSERT INTO `sys_dict` VALUES (1308782322607058946, 'test_type', '测试类型', '1', '测试类型', '0', 23, 1, '2020-09-23 09:56:36', 1, '2020-11-21 17:55:50', '2021-04-08 23:50:52'); INSERT INTO `sys_dict` VALUES (1314920925140922369, 'test', '测试', '0', NULL, '0', 3, 1313694379541635074, '2020-10-10 21:29:13', 1313694379541635074, '2020-10-10 21:57:32', '2021-04-08 23:50:52'); @@ -3502,34 +3515,36 @@ INSERT INTO `sys_dict` VALUES (1380172509525946369, 'crypto_asymmetric', '非对 INSERT INTO `sys_dict` VALUES (1388562098925977601, 'storage_type', '存储位置', '1', NULL, '0', 1, 1313694379541635074, '2021-05-02 02:32:57', 1, '2021-05-02 02:34:39', '2021-05-02 02:34:38'); INSERT INTO `sys_dict` VALUES (1389291635615805442, 'password_level', '密码强度', '1', NULL, '0', 0, 1313694379541635074, '2021-05-04 02:51:52', 1313694379541635074, '2021-05-04 02:51:52', '2021-05-04 02:51:52'); INSERT INTO `sys_dict` VALUES (1448557351479685121, 'role_data_scope', '角色数据范围', '1', NULL, '0', 0, 1, '2021-10-14 15:52:40', 1, '2021-10-14 15:52:40', '2021-10-14 15:50:56'); +COMMIT; -- ---------------------------- -- Table structure for sys_dict_detail -- ---------------------------- DROP TABLE IF EXISTS `sys_dict_detail`; -CREATE TABLE `sys_dict_detail` ( +CREATE TABLE `sys_dict_detail` ( `id` bigint(19) NOT NULL COMMENT '字典明细主键', - `type_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型ID', - `type_code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型code 冗余字段', - `dict_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称', - `dict_value` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典值', - `iz_lock` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否内置 0否 1是', + `type_id` varchar(32) NOT NULL COMMENT '类型ID', + `type_code` varchar(120) NOT NULL COMMENT '类型code 冗余字段', + `dict_name` varchar(120) NOT NULL COMMENT '字典名称', + `dict_value` varchar(120) NOT NULL COMMENT '字典值', + `iz_lock` char(1) NOT NULL COMMENT '是否内置 0否 1是', `sort_no` int(11) NOT NULL COMMENT '排序', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除状态', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `deleted` char(1) NOT NULL DEFAULT '0' COMMENT '删除状态', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建人', - `create_time` datetime(0) NOT NULL COMMENT '创建时间', + `create_time` datetime NOT NULL COMMENT '创建时间', `update_by` bigint(19) NOT NULL COMMENT '修改人', - `update_time` datetime(0) NOT NULL COMMENT '修改时间', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改时间', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `dict_detail`(`type_code`, `dict_value`, `dict_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典表-明细' ROW_FORMAT = Dynamic; + KEY `dict_detail` (`type_code`,`dict_value`,`dict_name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典表-明细'; -- ---------------------------- -- Records of sys_dict_detail -- ---------------------------- +BEGIN; INSERT INTO `sys_dict_detail` VALUES (1308456445335597058, '1308396497528434689', '010110', 'abc', '0', '1', 0, '测试', '1', 1, 1, '2020-09-22 12:21:41', 1, '2020-09-22 12:22:11', '2021-04-08 23:50:57'); INSERT INTO `sys_dict_detail` VALUES (1308637708302524418, '1308396497528434689', '010110', '销售部', '0', '1', 0, '测试', '1', 0, 1, '2020-09-23 00:21:58', 1, '2020-09-23 00:21:58', '2021-04-08 23:50:57'); INSERT INTO `sys_dict_detail` VALUES (1308637974456291330, '1308396497528434689', '010110', '销售部', '0', '1', 0, '测试', '1', 0, 1, '2020-09-23 00:23:01', 1, '2020-09-23 00:23:01', '2021-04-08 23:50:57'); @@ -3636,38 +3651,40 @@ INSERT INTO `sys_dict_detail` VALUES (1448557451719356417, '1448557351479685121' INSERT INTO `sys_dict_detail` VALUES (1448557556665036802, '1448557351479685121', 'role_data_scope', '本部门数据', '1', '1', 2, NULL, '0', 0, 1, '2021-10-14 15:53:29', 1, '2021-10-14 15:53:29', '2021-10-14 15:51:45'); INSERT INTO `sys_dict_detail` VALUES (1448557649011027969, '1448557351479685121', 'role_data_scope', '本部门及以下数据', '2', '1', 3, NULL, '0', 0, 1, '2021-10-14 15:53:51', 1, '2021-10-14 15:53:51', '2021-10-14 15:52:07'); INSERT INTO `sys_dict_detail` VALUES (1448557740778205185, '1448557351479685121', 'role_data_scope', '全部数据', '3', '1', 4, NULL, '0', 0, 1, '2021-10-14 15:54:13', 1, '2021-10-14 15:54:13', '2021-10-14 15:52:29'); +COMMIT; -- ---------------------------- -- Table structure for sys_logs -- ---------------------------- DROP TABLE IF EXISTS `sys_logs`; -CREATE TABLE `sys_logs` ( +CREATE TABLE `sys_logs` ( `id` bigint(19) NOT NULL COMMENT '唯一主键', - `type` char(1) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT '1' COMMENT '日志类型', - `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '日志标题', - `remote_addr` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '操作IP地址', - `user_agent` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '用户代理', - `request_uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '请求URI', - `method` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '操作方式', - `timeout` bigint(20) NULL DEFAULT NULL COMMENT '执行时间', - `params` text CHARACTER SET utf8 COLLATE utf8_bin NULL COMMENT '操作提交的数据', - `exception` text CHARACTER SET utf8 COLLATE utf8_bin NULL COMMENT '异常信息', + `type` char(1) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT '1' COMMENT '日志类型', + `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '日志标题', + `remote_addr` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '操作IP地址', + `user_agent` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '用户代理', + `request_uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '请求URI', + `method` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '操作方式', + `timeout` bigint(20) DEFAULT NULL COMMENT '执行时间', + `params` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT '操作提交的数据', + `exception` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT '异常信息', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建者', - `create_time` datetime(0) NOT NULL COMMENT '创建时间', + `create_time` datetime NOT NULL COMMENT '创建时间', `update_by` bigint(19) NOT NULL COMMENT '修改人', - `update_time` datetime(0) NOT NULL COMMENT '修改时间', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改时间', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `sys_log_create_by`(`create_by`) USING BTREE, - INDEX `sys_log_request_uri`(`request_uri`) USING BTREE, - INDEX `sys_log_type`(`type`) USING BTREE, - INDEX `sys_log_create_date`(`create_time`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '日志表' ROW_FORMAT = Dynamic; + KEY `sys_log_create_by` (`create_by`) USING BTREE, + KEY `sys_log_request_uri` (`request_uri`) USING BTREE, + KEY `sys_log_type` (`type`) USING BTREE, + KEY `sys_log_create_date` (`create_time`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='日志表'; -- ---------------------------- -- Records of sys_logs -- ---------------------------- +BEGIN; INSERT INTO `sys_logs` VALUES (1314831905878708225, '1', 'org.opsli.modulars.system.logs.web.LogsRestController', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36', '/opsli-boot/api/v1/sys/logs/emptyByOneMonth', 'POST', 73, '[Ljava.lang.Object;@691f036b[{}]', NULL, 0, 1, '2020-10-10 15:35:29', 1, '2020-10-10 15:35:29', '2021-04-08 23:51:01'); INSERT INTO `sys_logs` VALUES (1314831950988447746, '1', 'org.opsli.modulars.system.logs.web.LogsRestController', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36', '/opsli-boot/api/v1/sys/logs/emptyByOneMonth', 'POST', 10, '[Ljava.lang.Object;@3b21612f[{}]', NULL, 0, 1, '2020-10-10 15:35:40', 1, '2020-10-10 15:35:40', '2021-04-08 23:51:01'); INSERT INTO `sys_logs` VALUES (1314847943487946753, '1', '运维工具-日志监控', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36', '/opsli-boot/api/v1/sys/logs/emptyByOneMonth', 'POST', 12, '[Ljava.lang.Object;@53e92d9[{}]', NULL, 0, 1, '2020-10-10 16:39:13', 1, '2020-10-10 16:39:13', '2021-04-08 23:51:01'); @@ -6277,38 +6294,59 @@ INSERT INTO `sys_logs` VALUES (1448940866092310529, '1', '系统配置-角色管 INSERT INTO `sys_logs` VALUES (1448940945654063106, '1', '系统配置-角色管理-修改', '', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36', '/opsli-boot/api/v1/system/role/update', 'POST', 114, '[{\"izApi\":false,\"dataScope\":\"2\",\"version\":1,\"createBy\":\"1313694379541635074\",\"izLock\":\"0\",\"izManual\":false,\"createTime\":1634285538000,\"roleCode\":\"003\",\"roleName\":\"部门负责人\",\"id\":\"1448924680386441217\"}]', NULL, 0, 1313694379541635074, '2021-10-15 17:16:56', 1313694379541635074, '2021-10-15 17:16:56', '2021-10-15 17:15:13'); INSERT INTO `sys_logs` VALUES (1448940975085494273, '1', '系统配置-角色管理-修改', '', 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36', '/opsli-boot/api/v1/system/role/update', 'POST', 133, '[{\"izApi\":false,\"dataScope\":\"3\",\"version\":0,\"createBy\":\"1313694379541635074\",\"izLock\":\"0\",\"izManual\":false,\"createTime\":1634285552000,\"roleCode\":\"004\",\"roleName\":\"管理员\",\"id\":\"1448924738452385794\"}]', NULL, 0, 1313694379541635074, '2021-10-15 17:17:03', 1313694379541635074, '2021-10-15 17:17:03', '2021-10-15 17:15:20'); INSERT INTO `sys_logs` VALUES (1448941313590992897, '1', '测试模块-汽车信息-导出', '', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36 Edg/94.0.992.47', '/opsli-boot/api/v1/gentest/carinfo/exportExcel', 'GET', 1651, '[{\"request\":{\"request\":{},\"orgRequest\":{}},\"servletContext\":{},\"session\":{\"servletContext\":{},\"session\":{}},\"httpSessions\":false},{\"request\":{\"request\":{\"request\":{},\"orgRequest\":{}},\"servletContext\":{},\"session\":{\"servletContext\":{},\"session\":{}},\"httpSessions\":false},\"response\":{\"response\":{},\"status\":200},\"context\":{}}]', NULL, 0, 1448923198635307009, '2021-10-15 17:18:24', 1448923198635307009, '2021-10-15 17:18:24', '2021-10-15 17:16:41'); +INSERT INTO `sys_logs` VALUES (1460603032088645633, '1', '系统配置-组织机构-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/org/insert', 'POST', 35, '[{\"orgName\":\"测试\",\"izApi\":false,\"version\":0,\"parentId\":\"0\",\"sortNo\":1,\"izManual\":false,\"orgCode\":\"test\",\"tenantId\":\"\"}]', NULL, 0, 1, '2021-11-16 21:37:54', 1, '2021-11-16 21:37:54', '2021-11-16 21:37:54'); +INSERT INTO `sys_logs` VALUES (1460603215102906369, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 55, '[{\"no\":\"11111111\",\"secretKey\":\"esixa4fzsrzgolxrnmp1\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"纯粹\",\"password\":\"24ab8bb3b28238f592de5fa20cf9efc2\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"\",\"username\":\"aaaaaa\"}]', NULL, 0, 1, '2021-11-16 21:38:38', 1, '2021-11-16 21:38:38', '2021-11-16 21:38:37'); +INSERT INTO `sys_logs` VALUES (1460603458649362433, '1', '系统配置-菜单管理-删除', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/menu/del', 'POST', 66, '[\"1400031876927660034\"]', NULL, 0, 1, '2021-11-16 21:39:36', 1, '2021-11-16 21:39:36', '2021-11-16 21:39:35'); +INSERT INTO `sys_logs` VALUES (1460604434332553218, '1', '系统配置-组织机构-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/org/insert', 'POST', 67726, '[{\"orgName\":\"测试2\",\"parentIds\":\"0,1460603031799238658\",\"izApi\":false,\"version\":0,\"parentId\":\"1460603031799238658\",\"sortNo\":1,\"izManual\":false,\"orgCode\":\"test_111\",\"tenantId\":\"0\"}]', NULL, 0, 1, '2021-11-16 21:43:29', 1, '2021-11-16 21:43:29', '2021-11-16 21:43:28'); +INSERT INTO `sys_logs` VALUES (1460605641906229250, '1', '系统配置-组织机构-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/org/insert', 'POST', 15504, '[{\"orgName\":\"测试111\",\"izApi\":false,\"version\":0,\"parentId\":\"0\",\"sortNo\":1,\"izManual\":false,\"orgCode\":\"test2\",\"tenantId\":\"\"}]', NULL, 0, 1, '2021-11-16 21:48:16', 1, '2021-11-16 21:48:16', '2021-11-16 21:48:16'); +INSERT INTO `sys_logs` VALUES (1460620465549635585, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 55, '[{\"no\":\"11111\",\"secretKey\":\"ktxobqp3mpvwl3174mgi\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"system111\",\"password\":\"e8e3a8c5d6a51c2fc3c18edd9ac605f0\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"\",\"username\":\"cccccccccc\"}]', NULL, 0, 1, '2021-11-16 22:47:11', 1, '2021-11-16 22:47:11', '2021-11-16 22:47:10'); +INSERT INTO `sys_logs` VALUES (1460629525032366082, '1', '系统配置-菜单管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/menu/insert', 'POST', 16, '[{\"hidden\":\"0\",\"izApi\":false,\"menuName\":\"设置管理用户\",\"type\":\"2\",\"version\":0,\"parentId\":\"1315201380721446914\",\"sortNo\":6,\"izManual\":false,\"permissions\":\"system_set_tenant_admin\",\"alwaysShow\":\"0\"}]', NULL, 0, 1, '2021-11-16 23:23:11', 1, '2021-11-16 23:23:11', '2021-11-16 23:23:10'); +INSERT INTO `sys_logs` VALUES (1460630856539389953, '2', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 20, '[{\"no\":\"11111111\",\"izApi\":false,\"version\":0,\"realName\":\"1111111111\",\"password\":\"Bb123456.\",\"izManual\":false,\"tenantId\":\"\",\"username\":\"111111111\"}]', '该工号已存在', 0, 1, '2021-11-16 23:28:28', 1, '2021-11-16 23:28:28', '2021-11-16 23:28:28'); +INSERT INTO `sys_logs` VALUES (1460630869600452609, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 61, '[{\"no\":\"1111111111\",\"secretKey\":\"vylxii0d6kqj6hoti8yb\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"1111111111\",\"password\":\"abc869073de27d13595484ac47bf0641\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"\",\"username\":\"111111111\"}]', NULL, 0, 1, '2021-11-16 23:28:31', 1, '2021-11-16 23:28:31', '2021-11-16 23:28:31'); +INSERT INTO `sys_logs` VALUES (1460632719565340674, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 24, '[{\"no\":\"1111111111111\",\"secretKey\":\"bivcjbfo10idxhbtourq\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"1111112222\",\"password\":\"68988def8be66480230b5ae2b4d69db2\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"\",\"username\":\"1111112222\"}]', NULL, 0, 1, '2021-11-16 23:35:52', 1, '2021-11-16 23:35:52', '2021-11-16 23:35:52'); +INSERT INTO `sys_logs` VALUES (1460632976156082178, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 27, '[{\"no\":\"111111111111\",\"secretKey\":\"3nbvbfrxsec7dwufugle\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"aa111111\",\"password\":\"6d411d09c8c733ac66e99e648aa258b2\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"\",\"username\":\"aa111111\"}]', NULL, 0, 1, '2021-11-16 23:36:53', 1, '2021-11-16 23:36:53', '2021-11-16 23:36:53'); +INSERT INTO `sys_logs` VALUES (1460633172969603074, '2', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 8, '[{\"no\":\"111111111111\",\"izApi\":false,\"version\":0,\"realName\":\"args111111\",\"password\":\"Bb123456.\",\"izManual\":false,\"tenantId\":\"\",\"username\":\"args111111\"}]', '该工号已存在', 0, 1, '2021-11-16 23:37:40', 1, '2021-11-16 23:37:40', '2021-11-16 23:37:40'); +INSERT INTO `sys_logs` VALUES (1460633199716679681, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 23, '[{\"no\":\"111111111111111111\",\"secretKey\":\"r6kfne3ty9q0klh17vxz\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"args111111\",\"password\":\"01b45123a01f8af069414f71e6066099\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"\",\"username\":\"args111111\"}]', NULL, 0, 1, '2021-11-16 23:37:47', 1, '2021-11-16 23:37:47', '2021-11-16 23:37:46'); +INSERT INTO `sys_logs` VALUES (1460633415769473025, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 21, '[{\"no\":\"121311111\",\"secretKey\":\"zotd4rg8454elzmlah39\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"11111122aaa\",\"password\":\"6cc878d025c287b1acd82fdfc83618da\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"1\",\"username\":\"11111122aaa\"}]', NULL, 0, 1, '2021-11-16 23:38:38', 1, '2021-11-16 23:38:38', '2021-11-16 23:38:38'); +INSERT INTO `sys_logs` VALUES (1460634264751083522, '1', '系统配置-用户管理-删除', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/del', 'POST', 17, '[\"1460633415622672386\"]', NULL, 0, 1, '2021-11-16 23:42:01', 1, '2021-11-16 23:42:01', '2021-11-16 23:42:00'); +INSERT INTO `sys_logs` VALUES (1460634814200713218, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 63, '[{\"no\":\"222121212\",\"secretKey\":\"fd7b8ew5rikd5n7tjjkc\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"izTenantAdmin11\",\"password\":\"2b311a8c3d6a5b23bdaf92ac08d3af55\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"1\",\"username\":\"izTenantAdmin11\"}]', NULL, 0, 1, '2021-11-16 23:44:12', 1, '2021-11-16 23:44:12', '2021-11-16 23:44:11'); +INSERT INTO `sys_logs` VALUES (1460635865918296066, '1', '系统配置-用户管理-增加', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/insert', 'POST', 9076, '[{\"no\":\"1231312321311\",\"secretKey\":\"p7wnts1y5oohqqoatkfu\",\"izApi\":false,\"version\":0,\"izExistOrg\":\"0\",\"passwordLevel\":\"2\",\"realName\":\"etIzTenantAd1\",\"password\":\"cf7c2113df50d71de26393bd8478af1d\",\"izTenantAdmin\":\"1\",\"izManual\":false,\"enable\":\"1\",\"tenantId\":\"1\",\"username\":\"etIzTenantAd1\"}]', NULL, 0, 1, '2021-11-16 23:48:22', 1, '2021-11-16 23:48:22', '2021-11-16 23:48:22'); +INSERT INTO `sys_logs` VALUES (1460636163676131329, '1', '系统配置-用户管理-删除', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/delAll', 'POST', 40, '[\"1460635686724997121,1460634813961637890,1460633199553101826,1460632975996698625,1460632719397568513,1460630869323628546,1460620465260228609,1460603214817693697\"]', NULL, 0, 1, '2021-11-16 23:49:33', 1, '2021-11-16 23:49:33', '2021-11-16 23:49:33'); +INSERT INTO `sys_logs` VALUES (1460636223239442433, '1', '系统配置-用户管理-删除', '', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', '/opsli-boot/api/v1/system/user/del', 'POST', 14, '[\"1460635865448534017\"]', NULL, 0, 1, '2021-11-16 23:49:48', 1, '2021-11-16 23:49:48', '2021-11-16 23:49:47'); +COMMIT; -- ---------------------------- -- Table structure for sys_menu -- ---------------------------- DROP TABLE IF EXISTS `sys_menu`; -CREATE TABLE `sys_menu` ( +CREATE TABLE `sys_menu` ( `id` bigint(19) NOT NULL COMMENT '功能主键', - `parent_id` bigint(19) NULL DEFAULT 0 COMMENT '父级主键', - `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称', - `permissions` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限', - `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标', - `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型: 1-菜单 2-按钮 3-链接', - `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'url地址', - `component` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件', - `redirect` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '重定向', + `parent_id` bigint(19) DEFAULT '0' COMMENT '父级主键', + `menu_name` varchar(50) NOT NULL COMMENT '名称', + `permissions` varchar(50) DEFAULT NULL COMMENT '权限', + `icon` varchar(50) DEFAULT NULL COMMENT '图标', + `type` varchar(20) NOT NULL COMMENT '类型: 1-菜单 2-按钮 3-链接', + `url` varchar(200) DEFAULT NULL COMMENT 'url地址', + `component` varchar(200) DEFAULT NULL COMMENT '组件', + `redirect` varchar(200) DEFAULT NULL COMMENT '重定向', `sort_no` int(11) NOT NULL COMMENT '排序', - `always_show` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否总是显示 0是 1否', - `hidden` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否隐藏 0是 1否', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除状态', + `always_show` char(1) NOT NULL DEFAULT '0' COMMENT '是否总是显示 0是 1否', + `hidden` char(1) NOT NULL DEFAULT '0' COMMENT '是否隐藏 0是 1否', + `deleted` char(1) NOT NULL DEFAULT '0' COMMENT '删除状态', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `pid`(`parent_id`) USING BTREE COMMENT '上级id' -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统功能表' ROW_FORMAT = Dynamic; + KEY `pid` (`parent_id`) USING BTREE COMMENT '上级id' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统功能表'; -- ---------------------------- -- Records of sys_menu -- ---------------------------- +BEGIN; INSERT INTO `sys_menu` VALUES (1, 0, '系统配置', NULL, 'cog', '1', '/system', 'Layout', NULL, 3, '0', '0', '0', 2, 1, '2020-04-14 19:07:31', 1, '2021-05-04 20:34:03', '2021-05-04 20:34:03'); INSERT INTO `sys_menu` VALUES (2, 1, '菜单管理', NULL, NULL, '1', 'menu', 'views/modules/system/menuManagement/index', NULL, 1, '0', '0', '0', 0, 1, '2020-04-14 19:07:31', 1, '2020-10-07 23:49:36', '2021-05-07 19:28:50'); INSERT INTO `sys_menu` VALUES (3, 1, '用户管理', NULL, '', '1', 'user', 'views/modules/system/userManagement/index', NULL, 2, '0', '0', '0', 0, 1, '2020-04-14 19:07:31', 1, '2020-10-10 17:03:04', '2021-05-07 19:28:50'); @@ -6451,39 +6489,42 @@ INSERT INTO `sys_menu` VALUES (1397807399439392770, 1397807399338729473, '删除 INSERT INTO `sys_menu` VALUES (1397807399456169985, 1397807399338729473, '导入', 'generator_template_import', NULL, '2', NULL, NULL, NULL, 5, '0', '0', '0', 0, 1, '2021-05-27 14:50:29', 1, '2021-05-27 14:50:29', '2021-05-27 14:50:28'); INSERT INTO `sys_menu` VALUES (1397807399481335810, 1397807399338729473, '导出', 'generator_template_export', NULL, '2', NULL, NULL, NULL, 6, '0', '0', '0', 0, 1, '2021-05-27 14:50:29', 1, '2021-05-27 14:50:29', '2021-05-27 14:50:28'); INSERT INTO `sys_menu` VALUES (1399667141430452225, 1397807399338729473, '复制', 'generator_template_copy', NULL, '2', NULL, NULL, NULL, 7, '0', '0', '0', 0, 1, '2021-06-01 18:00:26', 1, '2021-06-01 18:00:26', '2021-06-01 18:00:25'); -INSERT INTO `sys_menu` VALUES (1400031876927660034, 1327085543511293954, '非对称加密管理', NULL, NULL, '1', 'crypto', 'views/modules/other/crypto/index', NULL, 1, '0', '0', '0', 0, 1, '2021-06-02 18:09:45', 1, '2021-06-02 18:09:45', '2021-06-02 18:09:45'); -INSERT INTO `sys_menu` VALUES (1400031877045100546, 1400031876927660034, '查看', 'other_crypto_select', NULL, '2', NULL, NULL, NULL, 1, '0', '0', '0', 0, 1, '2021-06-02 18:09:45', 1, '2021-06-02 18:09:45', '2021-06-02 18:09:45'); -INSERT INTO `sys_menu` VALUES (1400031877108015105, 1400031876927660034, '新增', 'other_crypto_insert', NULL, '2', NULL, NULL, NULL, 2, '0', '0', '0', 0, 1, '2021-06-02 18:09:45', 1, '2021-06-02 18:09:45', '2021-06-02 18:09:45'); -INSERT INTO `sys_menu` VALUES (1400031877108015106, 1400031876927660034, '修改', 'other_crypto_update', NULL, '2', NULL, NULL, NULL, 3, '0', '0', '0', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-06-02 18:09:45'); -INSERT INTO `sys_menu` VALUES (1400031877175123969, 1400031876927660034, '删除', 'other_crypto_delete', NULL, '2', NULL, NULL, NULL, 4, '0', '0', '0', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-06-02 18:09:45'); -INSERT INTO `sys_menu` VALUES (1400031877175123970, 1400031876927660034, '导入', 'other_crypto_import', NULL, '2', NULL, NULL, NULL, 5, '0', '0', '0', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-06-02 18:09:45'); -INSERT INTO `sys_menu` VALUES (1400031877250621442, 1400031876927660034, '导出', 'other_crypto_export', NULL, '2', NULL, NULL, NULL, 6, '0', '0', '0', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-06-02 18:09:45'); +INSERT INTO `sys_menu` VALUES (1400031876927660034, 1327085543511293954, '非对称加密管理', NULL, NULL, '1', 'crypto', 'views/modules/other/crypto/index', NULL, 1, '0', '0', '1', 0, 1, '2021-06-02 18:09:45', 1, '2021-06-02 18:09:45', '2021-11-16 21:39:35'); +INSERT INTO `sys_menu` VALUES (1400031877045100546, 1400031876927660034, '查看', 'other_crypto_select', NULL, '2', NULL, NULL, NULL, 1, '0', '0', '1', 0, 1, '2021-06-02 18:09:45', 1, '2021-06-02 18:09:45', '2021-11-16 21:39:35'); +INSERT INTO `sys_menu` VALUES (1400031877108015105, 1400031876927660034, '新增', 'other_crypto_insert', NULL, '2', NULL, NULL, NULL, 2, '0', '0', '1', 0, 1, '2021-06-02 18:09:45', 1, '2021-06-02 18:09:45', '2021-11-16 21:39:35'); +INSERT INTO `sys_menu` VALUES (1400031877108015106, 1400031876927660034, '修改', 'other_crypto_update', NULL, '2', NULL, NULL, NULL, 3, '0', '0', '1', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-11-16 21:39:35'); +INSERT INTO `sys_menu` VALUES (1400031877175123969, 1400031876927660034, '删除', 'other_crypto_delete', NULL, '2', NULL, NULL, NULL, 4, '0', '0', '1', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-11-16 21:39:35'); +INSERT INTO `sys_menu` VALUES (1400031877175123970, 1400031876927660034, '导入', 'other_crypto_import', NULL, '2', NULL, NULL, NULL, 5, '0', '0', '1', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-11-16 21:39:35'); +INSERT INTO `sys_menu` VALUES (1400031877250621442, 1400031876927660034, '导出', 'other_crypto_export', NULL, '2', NULL, NULL, NULL, 6, '0', '0', '1', 0, 1, '2021-06-02 18:09:46', 1, '2021-06-02 18:09:46', '2021-11-16 21:39:35'); INSERT INTO `sys_menu` VALUES (1448537070279237634, 4, '设置数据权限', 'system_role_setDataPerms', NULL, '2', NULL, NULL, NULL, 6, '0', '0', '0', 0, 1, '2021-10-14 14:32:05', 1, '2021-10-14 14:32:05', '2021-10-14 14:30:20'); +INSERT INTO `sys_menu` VALUES (1460629524738764802, 1315201380721446914, '设置管理用户', 'system_set_tenant_admin', NULL, '2', NULL, NULL, NULL, 6, '0', '0', '0', 0, 1, '2021-11-16 23:23:11', 1, '2021-11-16 23:23:11', '2021-11-16 23:23:10'); +COMMIT; -- ---------------------------- -- Table structure for sys_options -- ---------------------------- DROP TABLE IF EXISTS `sys_options`; -CREATE TABLE `sys_options` ( +CREATE TABLE `sys_options` ( `id` bigint(19) NOT NULL COMMENT '唯一主键', - `option_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数编号', - `option_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数名称', - `option_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '参数值', - `iz_lock` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否内置 0否 1是', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `version` int(11) NOT NULL DEFAULT 0 COMMENT '版本(乐观锁)', + `option_code` varchar(100) NOT NULL COMMENT '参数编号', + `option_name` varchar(200) NOT NULL COMMENT '参数名称', + `option_value` text COMMENT '参数值', + `iz_lock` char(1) NOT NULL COMMENT '是否内置 0否 1是', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `version` int(11) NOT NULL DEFAULT '0' COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `index`(`option_code`) USING BTREE COMMENT '参数编号唯一' -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统参数表' ROW_FORMAT = Dynamic; + UNIQUE KEY `index` (`option_code`) USING BTREE COMMENT '参数编号唯一' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统参数表'; -- ---------------------------- -- Records of sys_options -- ---------------------------- +BEGIN; INSERT INTO `sys_options` VALUES (1, 'crypto_asymmetric', '非对称加解密算法', 'RSA', '1', NULL, 0, 1, '2021-02-10 23:19:35', 1313694379541635074, '2021-04-04 11:19:26', '2021-04-29 11:11:40'); INSERT INTO `sys_options` VALUES (2, 'crypto_asymmetric_public_key', '非对称加解密-公钥', 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCQS75ZTYUL6IJJBgylgFDtksWZx4OsVK5CBJGXi3n9LON1Jg7KsxkgindCD28gQRIEh6ZP1IuhlMs9N/QteRbM3b1oDKW7Cbr7lFk+EYUmpO5nwD1+IHowiNc0AK+XfICOVF5287wE4LFLqBDnWhV0WNQFjYYpAc7852ZfEwThSQIDAQAB', '1', NULL, 0, 1, '2021-02-10 23:19:35', 1313694379541635074, '2021-04-04 11:19:26', '2021-04-29 11:11:41'); INSERT INTO `sys_options` VALUES (3, 'crypto_asymmetric_private_key', '非对称加解密-私钥', 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJBLvllNhQvogkkGDKWAUO2SxZnHg6xUrkIEkZeLef0s43UmDsqzGSCKd0IPbyBBEgSHpk/Ui6GUyz039C15FszdvWgMpbsJuvuUWT4RhSak7mfAPX4gejCI1zQAr5d8gI5UXnbzvATgsUuoEOdaFXRY1AWNhikBzvznZl8TBOFJAgMBAAECgYAJvtCmFi7RK6ysIxhBj6JnmTN24ltJpuJ2zpL8Sc0J+B+LyIk6z9CROqjS5L+PM+kN0BEmCedwTBNTf1VV3BXzbPcX/prE004LXcbv5mjgaHf/PybzJQumYM5MuD9dJYBLc1PUNu2b9eGekEU+vzn0HCnmAkfwU7FCdU7Nh8/ZnQJBAMkY/nzYxue0rdfD4ZybM8chBksp9EA8mwmCW/PosJGJ6YVJ913PbfovYuSG4rwm0Ew6i/1zcXvAFjt5dW+L5EsCQQC3sMq5EF4Bfils0dTdn8Pwtv2t3H6wwaAc9QAExHYtZ5pipFH9NXiWn6KUJYq28mRxxKtfoara/8Ahb5yHY0w7AkEArGnmfyno123cgppqC7gxW3AgEj+FL7IGhs+igOumvxFMCsBQ+rhGpXMNSbuwF/r7KfAkaAgbaytUpGdNXXbGIwJAas7uoXsl3iJYvgCokJFkYmRUzzJlrCt6CTxgXWVK/g2+1FqNnfjofFSoORI3PTdmNkzQBRRA/4Q0WHzIfGS9nwJBAMLXrVKH6uhn67dwXKRCy2Xt54dLEtL43jL+xzWeHJibSkSyImLiAn1n2imSpB6ubJnBuvH19Y0nOXKBP0+VDGA=', '1', NULL, 0, 1, '2021-02-10 23:19:35', 1313694379541635074, '2021-04-04 11:19:26', '2021-04-29 11:11:41'); @@ -6507,36 +6548,38 @@ INSERT INTO `sys_options` VALUES (1400402255261159427, 'storage_upyun_path_prefi INSERT INTO `sys_options` VALUES (1400402255328268290, 'storage_upyun_bucket_name', 'storage_upyun_bucket_name', 'opsli-storage', '1', NULL, 3, 1, '2021-06-03 18:41:31', 1, '2021-06-03 19:47:51', '2021-06-03 19:47:51'); INSERT INTO `sys_options` VALUES (1400402255328268291, 'storage_upyun_username', 'storage_upyun_username', 'opsli', '1', NULL, 3, 1, '2021-06-03 18:41:31', 1, '2021-06-03 19:47:51', '2021-06-03 19:47:51'); INSERT INTO `sys_options` VALUES (1400402255328268292, 'storage_upyun_password', 'storage_upyun_password', 'DjWrspmr4UbfBdnkrgm4ssCOVK7rUTXF', '1', NULL, 3, 1, '2021-06-03 18:41:31', 1, '2021-06-03 19:47:51', '2021-06-03 19:47:51'); +COMMIT; -- ---------------------------- -- Table structure for sys_org -- ---------------------------- DROP TABLE IF EXISTS `sys_org`; -CREATE TABLE `sys_org` ( +CREATE TABLE `sys_org` ( `id` bigint(19) NOT NULL COMMENT '字典主键', - `parent_id` bigint(19) NOT NULL DEFAULT 0 COMMENT '父级主键', - `parent_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '父级主键集合', - `org_code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织机构编号', - `org_name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织机构名称', + `parent_id` bigint(19) NOT NULL DEFAULT '0' COMMENT '父级主键', + `parent_ids` varchar(500) NOT NULL DEFAULT '0' COMMENT '父级主键集合', + `org_code` varchar(120) NOT NULL COMMENT '组织机构编号', + `org_name` varchar(120) NOT NULL COMMENT '组织机构名称', `sort_no` int(11) NOT NULL COMMENT '排序', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除标记:0未删除,1删除', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `tenant_id` bigint(20) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL DEFAULT '0' COMMENT '删除标记:0未删除,1删除', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建人', - `create_time` datetime(0) NOT NULL COMMENT '创建时间', + `create_time` datetime NOT NULL COMMENT '创建时间', `update_by` bigint(19) NOT NULL COMMENT '修改人', - `update_time` datetime(0) NOT NULL COMMENT '修改时间', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改时间', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `org_index`(`org_code`, `org_name`) USING BTREE, - INDEX `pid`(`parent_id`) USING BTREE COMMENT '上级id', - INDEX `pids`(`parent_ids`) USING BTREE COMMENT '上级id集合' -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织机构表' ROW_FORMAT = Dynamic; + KEY `org_index` (`org_code`,`org_name`) USING BTREE, + KEY `pid` (`parent_id`) USING BTREE COMMENT '上级id', + KEY `pids` (`parent_ids`) USING BTREE COMMENT '上级id集合' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组织机构表'; -- ---------------------------- -- Records of sys_org -- ---------------------------- +BEGIN; INSERT INTO `sys_org` VALUES (1332710973848449026, 0, '0', '0011', 'A公司', 1, NULL, 1, '0', 11, 1313694379541635074, '2020-11-28 23:40:31', 1, '2021-06-08 11:38:29', '2021-06-08 11:38:28'); INSERT INTO `sys_org` VALUES (1332878633177477122, 0, '0', '0013', 'C公司', 3, NULL, 1, '0', 10, 1313694379541635074, '2020-11-29 10:46:44', 1, '2021-06-07 19:52:59', '2021-06-07 20:07:21'); INSERT INTO `sys_org` VALUES (1332879851278856193, 1332710973848449026, '0,1332710973848449026', '0011_123', 'A公司B部门', 1, NULL, 1, '0', 6, 1313694379541635074, '2020-11-29 10:51:35', 1313694379541635074, '2021-02-25 13:31:17', '2021-06-07 19:23:35'); @@ -6551,57 +6594,64 @@ INSERT INTO `sys_org` VALUES (1401874418988122114, 1401861991370293250, '0,14018 INSERT INTO `sys_org` VALUES (1448921834744115202, 1401873907685687297, '0,1401861234604605441,1401861575953842177,1401873907685687297', '123123_123_1212', '啊啊啊啊', 2, NULL, 1, '0', 0, 1, '2021-10-15 16:01:00', 1, '2021-10-15 16:01:00', '2021-10-15 15:59:17'); INSERT INTO `sys_org` VALUES (1448921889865658369, 1401873907685687297, '0,1401861234604605441,1401861575953842177,1401873907685687297', '123123_123_12312344', '测试测试', 3, NULL, 1, '0', 0, 1, '2021-10-15 16:01:13', 1, '2021-10-15 16:01:13', '2021-10-15 15:59:30'); INSERT INTO `sys_org` VALUES (1448921935340302337, 1401873907685687297, '0,1401861234604605441,1401861575953842177,1401873907685687297', '123123_123_45334', '不知道啊', 5, NULL, 1, '1', 0, 1, '2021-10-15 16:01:24', 1, '2021-10-15 16:01:24', '2021-10-15 15:59:44'); +INSERT INTO `sys_org` VALUES (1460603031799238658, 0, '0', 'test', '测试', 1, NULL, 0, '0', 0, 1, '2021-11-16 21:37:54', 1, '2021-11-16 21:37:54', '2021-11-16 21:37:54'); +INSERT INTO `sys_org` VALUES (1460604434219307009, 1460603031799238658, '0,1460603031799238658', 'test_111', '测试2', 1, NULL, 0, '0', 0, 1, '2021-11-16 21:43:28', 1, '2021-11-16 21:43:28', '2021-11-16 21:43:28'); +INSERT INTO `sys_org` VALUES (1460605641805565953, 0, '0', 'test2', '测试111', 1, NULL, 0, '0', 0, 1, '2021-11-16 21:48:16', 1, '2021-11-16 21:48:16', '2021-11-16 21:48:16'); +COMMIT; -- ---------------------------- -- Table structure for sys_role -- ---------------------------- DROP TABLE IF EXISTS `sys_role`; -CREATE TABLE `sys_role` ( +CREATE TABLE `sys_role` ( `id` bigint(19) NOT NULL COMMENT '角色主键', - `role_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码', - `role_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称', - `iz_lock` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否内置 0否 1是', - `data_scope` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '授权数据范围', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `role_code` varchar(50) NOT NULL COMMENT '角色编码', + `role_name` varchar(50) NOT NULL COMMENT '角色名称', + `iz_lock` char(1) NOT NULL COMMENT '是否内置 0否 1是', + `data_scope` varchar(10) NOT NULL DEFAULT '0' COMMENT '授权数据范围', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `tenant_id` bigint(20) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `role_code`(`role_code`, `role_name`, `tenant_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic; + KEY `role_code` (`role_code`,`role_name`,`tenant_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色信息表'; -- ---------------------------- -- Records of sys_role -- ---------------------------- -INSERT INTO `sys_role` VALUES (2, '001', '管理员', '1', '3', '测试角色1', NULL, '0', 13, 1, '2018-12-09 17:48:13', 1, '2021-10-15 17:11:23', '2021-10-15 17:09:40'); -INSERT INTO `sys_role` VALUES (1313050221249155074, '8', '测试8', '0', '0', NULL, NULL, '0', 1, 1, '2020-10-05 04:35:43', 1, '2020-10-11 17:08:44', '2021-10-14 14:36:06'); -INSERT INTO `sys_role` VALUES (1313050244015837185, '9', '测试9', '0', '0', NULL, NULL, '0', 2, 1, '2020-10-05 04:35:48', 1, '2020-10-11 17:08:29', '2021-10-14 14:36:07'); -INSERT INTO `sys_role` VALUES (1313146842146213890, '007', '普通用户', '1', '0', NULL, NULL, '0', 5, 1, '2020-10-05 10:59:39', 1, '2021-10-15 17:05:44', '2021-10-15 17:08:33'); +BEGIN; +INSERT INTO `sys_role` VALUES (2, '001', '管理员', '1', '3', '测试角色1', 0, '0', 13, 1, '2018-12-09 17:48:13', 1, '2021-10-15 17:11:23', '2021-11-16 21:34:44'); +INSERT INTO `sys_role` VALUES (1313050221249155074, '8', '测试8', '0', '0', NULL, 0, '0', 1, 1, '2020-10-05 04:35:43', 1, '2020-10-11 17:08:44', '2021-11-16 21:34:45'); +INSERT INTO `sys_role` VALUES (1313050244015837185, '9', '测试9', '0', '0', NULL, 0, '0', 2, 1, '2020-10-05 04:35:48', 1, '2020-10-11 17:08:29', '2021-11-16 21:34:47'); +INSERT INTO `sys_role` VALUES (1313146842146213890, '007', '普通用户', '1', '0', NULL, 0, '0', 5, 1, '2020-10-05 10:59:39', 1, '2021-10-15 17:05:44', '2021-11-16 21:34:48'); INSERT INTO `sys_role` VALUES (1448924556381843458, '001', '职员', '0', '0', NULL, 1, '0', 1, 1313694379541635074, '2021-10-15 16:11:49', 1313694379541635074, '2021-10-15 17:16:27', '2021-10-15 17:14:44'); INSERT INTO `sys_role` VALUES (1448924616192618497, '002', '业务员', '0', '1', NULL, 1, '0', 1, 1313694379541635074, '2021-10-15 16:12:03', 1313694379541635074, '2021-10-15 17:16:37', '2021-10-15 17:14:54'); INSERT INTO `sys_role` VALUES (1448924680386441217, '003', '部门负责人', '0', '2', NULL, 1, '0', 2, 1313694379541635074, '2021-10-15 16:12:18', 1313694379541635074, '2021-10-15 17:16:56', '2021-10-15 17:15:13'); INSERT INTO `sys_role` VALUES (1448924738452385794, '004', '管理员', '0', '3', NULL, 1, '0', 1, 1313694379541635074, '2021-10-15 16:12:32', 1313694379541635074, '2021-10-15 17:17:03', '2021-10-15 17:15:20'); +COMMIT; -- ---------------------------- -- Table structure for sys_role_menu_ref -- ---------------------------- DROP TABLE IF EXISTS `sys_role_menu_ref`; -CREATE TABLE `sys_role_menu_ref` ( +CREATE TABLE `sys_role_menu_ref` ( `id` bigint(19) NOT NULL COMMENT '用户角色关联', `menu_id` bigint(19) NOT NULL COMMENT '用户主键', `role_id` bigint(19) NOT NULL COMMENT '角色主键', PRIMARY KEY (`id`) USING BTREE, - INDEX `sys_role_menu`(`menu_id`, `role_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色功能关联表' ROW_FORMAT = Dynamic; + KEY `sys_role_menu` (`menu_id`,`role_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色功能关联表'; -- ---------------------------- -- Records of sys_role_menu_ref -- ---------------------------- +BEGIN; INSERT INTO `sys_role_menu_ref` VALUES (1399667214658805765, 1, 2); INSERT INTO `sys_role_menu_ref` VALUES (1312770352622878721, 1, 1312770323526991874); INSERT INTO `sys_role_menu_ref` VALUES (1399667214658805766, 3, 2); @@ -6836,114 +6886,134 @@ INSERT INTO `sys_role_menu_ref` VALUES (1399667214591696938, 1397807399439392770 INSERT INTO `sys_role_menu_ref` VALUES (1399667214591696939, 1397807399456169985, 2); INSERT INTO `sys_role_menu_ref` VALUES (1399667214591696940, 1397807399481335810, 2); INSERT INTO `sys_role_menu_ref` VALUES (1399667214591696941, 1399667141430452225, 2); +COMMIT; -- ---------------------------- -- Table structure for sys_tenant -- ---------------------------- DROP TABLE IF EXISTS `sys_tenant`; -CREATE TABLE `sys_tenant` ( +CREATE TABLE `sys_tenant` ( `id` bigint(19) NOT NULL COMMENT '唯一主键', - `tenant_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称', - `enable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用 0否 1是', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `tenant_name` varchar(50) NOT NULL COMMENT '租户名称', + `enable` char(1) NOT NULL COMMENT '是否启用 0否 1是', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `role_code`(`tenant_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic; + KEY `role_code` (`tenant_name`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='角色信息表'; -- ---------------------------- -- Records of sys_tenant -- ---------------------------- +BEGIN; INSERT INTO `sys_tenant` VALUES (1, '演示租户', '1', '演示租户', '0', 15, 1, '2017-03-08 15:00:42', 1313694379541635074, '2021-10-13 14:38:36', '2021-10-13 14:36:51'); INSERT INTO `sys_tenant` VALUES (1315203865179602945, '默认租户', '1', '系统默认租户 勿动', '0', 2, 1, '2020-10-11 16:13:31', 1, '2020-10-11 16:14:41', '2021-04-08 23:51:26'); INSERT INTO `sys_tenant` VALUES (1315214795665907713, '测试租户', '0', '不启用租户', '0', 0, 1, '2020-10-11 16:56:57', 1, '2020-10-11 16:56:57', '2021-04-08 23:51:26'); +COMMIT; -- ---------------------------- -- Table structure for sys_user -- ---------------------------- DROP TABLE IF EXISTS `sys_user`; -CREATE TABLE `sys_user` ( +CREATE TABLE `sys_user` ( `id` bigint(19) NOT NULL COMMENT '用户主键', - `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录账户', - `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '登录密码', - `password_level` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录密码强度', - `secret_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '盐值,密码秘钥', - `enable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `real_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '真实姓名', - `mobile` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机', - `no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工号', - `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户头像', - `login_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '最后登陆IP', - `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱', - `sign` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '签名', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', - `iz_exist_org` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否存在组织', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '删除状态', + `username` varchar(32) NOT NULL COMMENT '登录账户', + `password` varchar(50) NOT NULL COMMENT '登录密码', + `password_level` char(50) DEFAULT NULL COMMENT '登录密码强度', + `secret_key` varchar(50) NOT NULL COMMENT '盐值,密码秘钥', + `enable` char(1) NOT NULL COMMENT '是否启用', + `real_name` varchar(50) NOT NULL COMMENT '真实姓名', + `mobile` varchar(15) DEFAULT NULL COMMENT '手机', + `no` varchar(32) NOT NULL COMMENT '工号', + `avatar` varchar(255) DEFAULT NULL COMMENT '用户头像', + `login_ip` varchar(50) DEFAULT NULL COMMENT '最后登陆IP', + `email` varchar(100) DEFAULT NULL COMMENT '邮箱', + `sign` varchar(255) DEFAULT NULL COMMENT '签名', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `iz_exist_org` char(1) NOT NULL DEFAULT '0' COMMENT '是否存在组织', + `iz_tenant_admin` char(1) NOT NULL DEFAULT '0' COMMENT '是否租户管理员', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL DEFAULT '0' COMMENT '删除状态', `version` int(11) NOT NULL COMMENT '版本(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建人', - `create_time` datetime(0) NOT NULL COMMENT '创建时间', + `create_time` datetime NOT NULL COMMENT '创建时间', `update_by` bigint(19) NOT NULL COMMENT '修改人', - `update_time` datetime(0) NOT NULL COMMENT '修改时间', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改时间', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE, - INDEX `sys_user`(`username`, `real_name`) USING BTREE, - INDEX `tenant`(`tenant_id`) USING BTREE COMMENT '租户' -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic; + KEY `sys_user` (`username`,`real_name`) USING BTREE, + KEY `tenant` (`tenant_id`) USING BTREE COMMENT '租户' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户信息表'; -- ---------------------------- -- Records of sys_user -- ---------------------------- -INSERT INTO `sys_user` VALUES (1, 'system', '10b80e7442518fee52191617e602527a', '2', 'gu4ix7czy8g2x4xf5td7', '1', '超级管理员', '15321010110', '112', 'http://upload.bedebug.com/20210603/162433012495676994QGGVX.jpg', '', 'meet.parker@foxmail.com', '没有自学能力的人没有未来', '', '0', 1315203865179602945, '0', 95, 1, '2020-09-25 15:03:22', 1, '2021-05-04 01:59:11', '2021-06-03 19:48:02'); -INSERT INTO `sys_user` VALUES (1313694379541635074, 'demo', 'cc6875215ef04072164bc81b9e2ce496', '2', '489e0bs6p7du02t8ij8t', '1', '演示用户', '15321010110', 'test_001', 'http://upload.bedebug.com/20211013/1635589382475625280EW3N.jpg', '', 'meet.parker@foxmail.com', '没有自学能力的人没有未来', NULL, '1', 1, '0', 2, 1, '2020-10-06 23:15:22', 1, '2020-10-11 16:53:58', '2021-10-13 14:36:11'); -INSERT INTO `sys_user` VALUES (1315218541317750785, 'zhangsan', '4beeb20b06086f97744aa5de7d9bd499', '2', 'b3ab5dhf2j72e0a9f25f', '1', '张三', NULL, '123123', NULL, '', NULL, NULL, NULL, '1', 1, '0', 3, 1, '2020-10-11 17:11:50', 1, '2021-06-11 17:44:11', '2021-06-12 01:24:48'); -INSERT INTO `sys_user` VALUES (1315224823500120066, 'lyf', '6a1e7a25deca6805a653b55a27592600', '2', 'j6wyhiepqqgjg6kxgmy0', '1', '刘亦菲', NULL, '0101001', NULL, '', NULL, NULL, NULL, '1', 1, '0', 0, 1313694379541635074, '2020-10-11 17:36:48', 1313694379541635074, '2020-10-11 17:36:48', '2021-10-15 16:22:55'); -INSERT INTO `sys_user` VALUES (1448923198635307009, 'test1', '8b4d42032b1f60a59241e4de393831d9', '2', 'gcbvakpi75781z63nqyl', '1', '范冰冰', NULL, '1111', NULL, '', NULL, NULL, NULL, '1', 1, '0', 1, 1, '2021-10-15 16:06:25', 1, '2021-10-15 16:08:26', '2021-10-15 16:13:02'); +BEGIN; +INSERT INTO `sys_user` VALUES (1, 'system', '10b80e7442518fee52191617e602527a', '2', 'gu4ix7czy8g2x4xf5td7', '1', '超级管理员', '15321010110', '112', 'http://upload.bedebug.com/20210603/162433012495676994QGGVX.jpg', '', 'meet.parker@foxmail.com', '没有自学能力的人没有未来', '', '0', '0', 0, '0', 95, 1, '2020-09-25 15:03:22', 1, '2021-05-04 01:59:11', '2021-11-16 21:35:10'); +INSERT INTO `sys_user` VALUES (1313694379541635074, 'demo', 'cc6875215ef04072164bc81b9e2ce496', '2', '489e0bs6p7du02t8ij8t', '1', '演示用户', '15321010110', 'test_001', 'http://upload.bedebug.com/20211013/1635589382475625280EW3N.jpg', '', 'meet.parker@foxmail.com', '没有自学能力的人没有未来', NULL, '1', '1', 1, '0', 2, 1, '2020-10-06 23:15:22', 1, '2020-10-11 16:53:58', '2021-11-16 23:49:21'); +INSERT INTO `sys_user` VALUES (1315218541317750785, 'zhangsan', '4beeb20b06086f97744aa5de7d9bd499', '2', 'b3ab5dhf2j72e0a9f25f', '1', '张三', NULL, '123123', NULL, '', NULL, NULL, NULL, '1', '0', 1, '0', 3, 1, '2020-10-11 17:11:50', 1, '2021-06-11 17:44:11', '2021-06-12 01:24:48'); +INSERT INTO `sys_user` VALUES (1315224823500120066, 'lyf', '6a1e7a25deca6805a653b55a27592600', '2', 'j6wyhiepqqgjg6kxgmy0', '1', '刘亦菲', NULL, '0101001', NULL, '', NULL, NULL, NULL, '1', '0', 1, '0', 0, 1313694379541635074, '2020-10-11 17:36:48', 1313694379541635074, '2020-10-11 17:36:48', '2021-10-15 16:22:55'); +INSERT INTO `sys_user` VALUES (1448923198635307009, 'test1', '8b4d42032b1f60a59241e4de393831d9', '2', 'gcbvakpi75781z63nqyl', '1', '范冰冰', NULL, '1111', NULL, '', NULL, NULL, NULL, '1', '0', 1, '0', 1, 1, '2021-10-15 16:06:25', 1, '2021-10-15 16:08:26', '2021-10-15 16:13:02'); +INSERT INTO `sys_user` VALUES (1460603214817693697, 'aaaaaa', '24ab8bb3b28238f592de5fa20cf9efc2', '2', 'esixa4fzsrzgolxrnmp1', '1', '纯粹', NULL, '11111111', NULL, NULL, NULL, NULL, NULL, '1', '0', 0, '1', 0, 1, '2021-11-16 21:38:38', 1, '2021-11-16 21:38:38', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460620465260228609, 'cccccccccc', 'e8e3a8c5d6a51c2fc3c18edd9ac605f0', '2', 'ktxobqp3mpvwl3174mgi', '1', 'system111', NULL, '11111', NULL, NULL, NULL, NULL, NULL, '0', '0', 0, '1', 0, 1, '2021-11-16 22:47:11', 1, '2021-11-16 22:47:11', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460630869323628546, '111111111', 'abc869073de27d13595484ac47bf0641', '2', 'vylxii0d6kqj6hoti8yb', '1', '1111111111', NULL, '1111111111', NULL, NULL, NULL, NULL, NULL, '0', '0', 0, '1', 0, 1, '2021-11-16 23:28:31', 1, '2021-11-16 23:28:31', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460632719397568513, '1111112222', '68988def8be66480230b5ae2b4d69db2', '2', 'bivcjbfo10idxhbtourq', '1', '1111112222', NULL, '1111111111111', NULL, NULL, NULL, NULL, NULL, '0', '0', 0, '1', 0, 1, '2021-11-16 23:35:52', 1, '2021-11-16 23:35:52', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460632975996698625, 'aa111111', '6d411d09c8c733ac66e99e648aa258b2', '2', '3nbvbfrxsec7dwufugle', '1', 'aa111111', NULL, '111111111111', NULL, NULL, NULL, NULL, NULL, '0', '0', 0, '1', 0, 1, '2021-11-16 23:36:53', 1, '2021-11-16 23:36:53', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460633199553101826, 'args111111', '01b45123a01f8af069414f71e6066099', '2', 'r6kfne3ty9q0klh17vxz', '1', 'args111111', NULL, '111111111111111111', NULL, NULL, NULL, NULL, NULL, '0', '0', 0, '1', 0, 1, '2021-11-16 23:37:47', 1, '2021-11-16 23:37:47', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460633415622672386, '11111122aaa', '6cc878d025c287b1acd82fdfc83618da', '2', 'zotd4rg8454elzmlah39', '1', '11111122aaa', NULL, '121311111', NULL, NULL, NULL, NULL, NULL, '0', '1', 1, '1', 0, 1, '2021-11-16 23:38:38', 1, '2021-11-16 23:38:38', '2021-11-16 23:42:00'); +INSERT INTO `sys_user` VALUES (1460634813961637890, 'izTenantAdmin11', '2b311a8c3d6a5b23bdaf92ac08d3af55', '2', 'fd7b8ew5rikd5n7tjjkc', '1', 'izTenantAdmin11', NULL, '222121212', NULL, NULL, NULL, NULL, NULL, '0', '0', 1, '1', 0, 1, '2021-11-16 23:44:12', 1, '2021-11-16 23:44:12', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460635686724997121, 'etIzTenantAd', '50660b86e6ef05b473e85477e92daf9e', '2', 'de7l7ffavmbsa82xfde9', '1', 'etIzTenantAd', NULL, '12313123213', NULL, NULL, NULL, NULL, NULL, '0', '0', 1, '1', 0, 1, '2021-11-16 23:47:40', 1, '2021-11-16 23:47:40', '2021-11-16 23:49:33'); +INSERT INTO `sys_user` VALUES (1460635865448534017, 'etIzTenantAd1', 'cf7c2113df50d71de26393bd8478af1d', '2', 'p7wnts1y5oohqqoatkfu', '1', 'etIzTenantAd1', NULL, '1231312321311', NULL, NULL, NULL, NULL, NULL, '0', '1', 1, '1', 0, 1, '2021-11-16 23:48:22', 1, '2021-11-16 23:48:22', '2021-11-16 23:49:47'); +COMMIT; -- ---------------------------- -- Table structure for sys_user_org_ref -- ---------------------------- DROP TABLE IF EXISTS `sys_user_org_ref`; -CREATE TABLE `sys_user_org_ref` ( +CREATE TABLE `sys_user_org_ref` ( `id` bigint(19) NOT NULL COMMENT '用户角色关联', `user_id` bigint(19) NOT NULL COMMENT '用户主键', `org_id` bigint(19) NOT NULL COMMENT '当前组织机构', - `org_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织机构组', - `iz_def` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否默认', + `org_ids` varchar(500) NOT NULL COMMENT '组织机构组', + `iz_def` char(1) NOT NULL COMMENT '是否默认', PRIMARY KEY (`id`) USING BTREE, - INDEX `sys_org_user`(`user_id`, `org_ids`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织机构用户关联表' ROW_FORMAT = Dynamic; + KEY `sys_org_user` (`user_id`,`org_ids`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='组织机构用户关联表'; -- ---------------------------- -- Records of sys_user_org_ref -- ---------------------------- +BEGIN; INSERT INTO `sys_user_org_ref` VALUES (1403403014114373634, 1315218541317750785, 1332879851278856193, '0,1332710973848449026,1332879851278856193', '1'); INSERT INTO `sys_user_org_ref` VALUES (1448922152303259650, 1315224823500120066, 1448921834744115202, '0,1401861234604605441,1401861575953842177,1401873907685687297,1448921834744115202', '1'); INSERT INTO `sys_user_org_ref` VALUES (1448925001863065602, 1448923198635307009, 1401861575953842177, '0,1401861234604605441,1401861575953842177', '1'); INSERT INTO `sys_user_org_ref` VALUES (1448928324691341314, 1313694379541635074, 1401861575953842177, '0,1401861234604605441,1401861575953842177', '1'); +INSERT INTO `sys_user_org_ref` VALUES (1460606496244011009, 1460603214817693697, 1460604434219307009, '0,1460603031799238658,1460604434219307009', '1'); +COMMIT; -- ---------------------------- -- Table structure for sys_user_role_ref -- ---------------------------- DROP TABLE IF EXISTS `sys_user_role_ref`; -CREATE TABLE `sys_user_role_ref` ( +CREATE TABLE `sys_user_role_ref` ( `id` bigint(19) NOT NULL COMMENT '用户角色关联', `user_id` bigint(19) NOT NULL COMMENT '用户主键', `role_id` bigint(19) NOT NULL COMMENT '角色主键', - `iz_def` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否默认', + `iz_def` char(1) NOT NULL COMMENT '是否默认', PRIMARY KEY (`id`) USING BTREE, - INDEX `sys_user_role`(`user_id`, `role_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色关联表' ROW_FORMAT = Dynamic; + KEY `sys_user_role` (`user_id`,`role_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户角色关联表'; -- ---------------------------- -- Records of sys_user_role_ref -- ---------------------------- +BEGIN; INSERT INTO `sys_user_role_ref` VALUES (1340330479513047041, 1340328715309092866, 1313146842146213890, ''); INSERT INTO `sys_user_role_ref` VALUES (1365262284070248450, 1, 1313050074675007490, ''); INSERT INTO `sys_user_role_ref` VALUES (1365262284091219969, 1, 1313050098867752962, ''); @@ -6960,33 +7030,45 @@ INSERT INTO `sys_user_role_ref` VALUES (1448943254769410051, 1448923198635307009 INSERT INTO `sys_user_role_ref` VALUES (1448943254769410052, 1448923198635307009, 1448924616192618497, '0'); INSERT INTO `sys_user_role_ref` VALUES (1448943254769410053, 1448923198635307009, 1448924680386441217, '1'); INSERT INTO `sys_user_role_ref` VALUES (1448943254769410054, 1448923198635307009, 1448924738452385794, '0'); +INSERT INTO `sys_user_role_ref` VALUES (1460603214943522817, 1460603214817693697, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460620465348308993, 1460620465260228609, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460630869436874754, 1460630869323628546, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460632719431122946, 1460632719397568513, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460632976030253057, 1460632975996698625, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460633199590850561, 1460633199553101826, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460633415647838210, 1460633415622672386, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460634814041329666, 1460634813961637890, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460635686762745857, 1460635686724997121, 1313146842146213890, '1'); +INSERT INTO `sys_user_role_ref` VALUES (1460635992343007233, 1460635865448534017, 2, '1'); +COMMIT; -- ---------------------------- -- Table structure for test_car -- ---------------------------- DROP TABLE IF EXISTS `test_car`; -CREATE TABLE `test_car` ( +CREATE TABLE `test_car` ( `id` bigint(19) NOT NULL COMMENT '主键', - `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', - `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', - `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车品牌', + `car_name` varchar(20) NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) DEFAULT NULL COMMENT '汽车品牌', `produce_data` date NOT NULL COMMENT '生产日期', - `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `iz_usable` char(1) NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', - `org_ids` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织机构组', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', + `org_ids` varchar(500) NOT NULL COMMENT '组织机构组', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试汽车' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试汽车'; -- ---------------------------- -- Records of test_car -- ---------------------------- +BEGIN; INSERT INTO `test_car` VALUES (1340634224709677058, '奔驰GXX', 'Gxx', '奔驰', '2020-12-20', '1', 1, '0', 0, 1313694379541635074, '2020-12-20 20:24:42', 1313694379541635074, '2020-12-20 20:24:42', '2021-04-08 23:51:39', ''); INSERT INTO `test_car` VALUES (1340634337075081217, '北汽绅宝', '电动', '绅宝', '2020-12-13', '1', 1, '0', 0, 1313694379541635074, '2020-12-20 20:25:08', 1313694379541635074, '2020-12-20 20:25:08', '2021-04-08 23:51:39', ''); INSERT INTO `test_car` VALUES (1340634432696823810, '宝马7系', '烧油', '宝马', '2020-12-20', '0', 1, '0', 0, 1313694379541635074, '2020-12-20 20:25:31', 1313694379541635074, '2020-12-20 20:25:31', '2021-04-08 23:51:39', ''); @@ -6998,139 +7080,141 @@ INSERT INTO `test_car` VALUES (1448923884416593921, '演示汽车', '1111', '111 INSERT INTO `test_car` VALUES (1448927202366894081, '自己_范冰冰', '11111', '11111', '2021-10-04', '1', 1, '0', 1, 1448923198635307009, '2021-10-15 16:22:19', 1, '2021-10-15 16:34:37', '2021-10-15 16:32:54', '0,1401861234604605441,1401861575953842177'); INSERT INTO `test_car` VALUES (1448927860478357506, '自己_刘亦菲', '111', '2222', '2021-10-04', '1', 1, '0', 1, 1315224823500120066, '2021-10-15 16:24:56', 1, '2021-10-15 16:34:28', '2021-10-15 16:32:45', '0,1401861234604605441,1401861575953842177,1401873907685687297,1448921834744115202'); INSERT INTO `test_car` VALUES (1448940392903516161, '自己_演示', '123123', '123123', '2021-10-04', '1', 1, '0', 0, 1313694379541635074, '2021-10-15 17:14:44', 1313694379541635074, '2021-10-15 17:14:44', '2021-10-15 17:13:01', '0,1401861234604605441,1401861575953842177'); +COMMIT; -- ---------------------------- -- Table structure for test_car_copy1 -- ---------------------------- DROP TABLE IF EXISTS `test_car_copy1`; -CREATE TABLE `test_car_copy1` ( +CREATE TABLE `test_car_copy1` ( `id` bigint(19) NOT NULL COMMENT '主键', - `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', - `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', - `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车品牌', + `car_name` varchar(20) NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) DEFAULT NULL COMMENT '汽车品牌', `produce_data` date NOT NULL COMMENT '生产日期', - `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `iz_usable` char(1) NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试'; -- ---------------------------- -- Table structure for test_car_copy2 -- ---------------------------- DROP TABLE IF EXISTS `test_car_copy2`; -CREATE TABLE `test_car_copy2` ( +CREATE TABLE `test_car_copy2` ( `id` bigint(19) NOT NULL COMMENT '主键', - `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', - `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', - `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车品牌', + `car_name` varchar(20) NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) DEFAULT NULL COMMENT '汽车品牌', `produce_data` date NOT NULL COMMENT '生产日期', - `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `iz_usable` char(1) NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试'; -- ---------------------------- -- Table structure for test_car_copy3 -- ---------------------------- DROP TABLE IF EXISTS `test_car_copy3`; -CREATE TABLE `test_car_copy3` ( +CREATE TABLE `test_car_copy3` ( `id` bigint(19) NOT NULL COMMENT '主键', - `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', - `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', - `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车品牌', + `car_name` varchar(20) NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) DEFAULT NULL COMMENT '汽车品牌', `produce_data` date NOT NULL COMMENT '生产日期', - `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `iz_usable` char(1) NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试'; -- ---------------------------- -- Table structure for test_car_copy4 -- ---------------------------- DROP TABLE IF EXISTS `test_car_copy4`; -CREATE TABLE `test_car_copy4` ( +CREATE TABLE `test_car_copy4` ( `id` bigint(19) NOT NULL COMMENT '主键', - `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', - `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', - `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车品牌', + `car_name` varchar(20) NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) DEFAULT NULL COMMENT '汽车品牌', `produce_data` date NOT NULL COMMENT '生产日期', - `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `iz_usable` char(1) NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试'; -- ---------------------------- -- Table structure for test_car_copy5 -- ---------------------------- DROP TABLE IF EXISTS `test_car_copy5`; -CREATE TABLE `test_car_copy5` ( +CREATE TABLE `test_car_copy5` ( `id` bigint(19) NOT NULL COMMENT '主键', - `car_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车名称', - `car_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '汽车类型', - `car_brand` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车品牌', + `car_name` varchar(20) NOT NULL COMMENT '汽车名称', + `car_type` varchar(20) NOT NULL COMMENT '汽车类型', + `car_brand` varchar(50) DEFAULT NULL COMMENT '汽车品牌', `produce_data` date NOT NULL COMMENT '生产日期', - `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `iz_usable` char(1) NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='测试'; -- ---------------------------- -- Table structure for test_entity -- ---------------------------- DROP TABLE IF EXISTS `test_entity`; -CREATE TABLE `test_entity` ( +CREATE TABLE `test_entity` ( `id` bigint(19) NOT NULL, - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `type` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', + `name` varchar(255) DEFAULT NULL, + `type` varchar(120) NOT NULL, + `remark` varchar(255) DEFAULT NULL, + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', `create_by` bigint(19) NOT NULL, - `create_time` datetime(0) NOT NULL, + `create_time` datetime NOT NULL, `update_by` bigint(19) NOT NULL, - `update_time` datetime(0) NOT NULL, + `update_time` datetime NOT NULL, `version` int(11) NOT NULL, - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- ---------------------------- -- Records of test_entity -- ---------------------------- +BEGIN; INSERT INTO `test_entity` VALUES (1364199553082777601, '测试名称1607593481', '1', '测试备注138092174', 1, 1313694379541635074, '2021-02-23 21:04:54', 1313694379541635074, '2021-02-23 21:04:54', 0, '2021-04-08 23:52:08'); INSERT INTO `test_entity` VALUES (1364199553678368770, '测试名称612578871', '4', '测试备注-861279371', 1, 1313694379541635074, '2021-02-23 21:04:54', 1313694379541635074, '2021-02-23 21:04:54', 0, '2021-04-08 23:52:08'); INSERT INTO `test_entity` VALUES (1364199553732894722, '测试名称-520336040', '4', '测试备注-20781738', 1, 1313694379541635074, '2021-02-23 21:04:54', 1313694379541635074, '2021-02-23 21:04:54', 0, '2021-04-08 23:52:08'); @@ -31855,32 +31939,34 @@ INSERT INTO `test_entity` VALUES (1365267353196998658, '测试名称948161445', INSERT INTO `test_entity` VALUES (1365267353243136001, '测试名称2080299310', '4', '测试备注1396804893', 1, 1313694379541635074, '2021-02-26 19:47:57', 1313694379541635074, '2021-02-26 19:47:57', 0, '2021-04-08 23:52:08'); INSERT INTO `test_entity` VALUES (1365267353289273346, '测试名称39969223', '4', '测试备注-1782248735', 1, 1313694379541635074, '2021-02-26 19:47:57', 1313694379541635074, '2021-02-26 19:47:57', 0, '2021-04-08 23:52:08'); INSERT INTO `test_entity` VALUES (1365267353335410690, '测试名称2131386477', '0', '测试备注-431824416', 1, 1313694379541635074, '2021-02-26 19:47:57', 1313694379541635074, '2021-02-26 19:47:57', 0, '2021-04-08 23:52:08'); +COMMIT; -- ---------------------------- -- Table structure for test_user -- ---------------------------- DROP TABLE IF EXISTS `test_user`; -CREATE TABLE `test_user` ( +CREATE TABLE `test_user` ( `id` bigint(19) NOT NULL COMMENT '主键', - `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称', - `money` double(8, 2) NOT NULL COMMENT '金钱', + `name` varchar(50) DEFAULT NULL COMMENT '名称', + `money` double(8,2) NOT NULL COMMENT '金钱', `age` smallint(5) NOT NULL COMMENT '年龄', `birth` date NOT NULL COMMENT '生日', - `iz_usable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用', - `tenant_id` bigint(19) NULL DEFAULT NULL COMMENT '多租户ID', - `deleted` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '删除标记:0未删除,1删除', + `iz_usable` char(1) NOT NULL COMMENT '是否启用', + `tenant_id` bigint(19) DEFAULT NULL COMMENT '多租户ID', + `deleted` char(1) NOT NULL COMMENT '删除标记:0未删除,1删除', `version` int(10) NOT NULL COMMENT '版本号(乐观锁)', `create_by` bigint(19) NOT NULL COMMENT '创建用户', - `create_time` datetime(0) NOT NULL COMMENT '创建日期', + `create_time` datetime NOT NULL COMMENT '创建日期', `update_by` bigint(19) NOT NULL COMMENT '修改用户', - `update_time` datetime(0) NOT NULL COMMENT '修改日期', - `ts` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '时间戳', + `update_time` datetime NOT NULL COMMENT '修改日期', + `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间戳', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '某系统用户' ROW_FORMAT = Dynamic; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='某系统用户'; -- ---------------------------- -- Records of test_user -- ---------------------------- +BEGIN; INSERT INTO `test_user` VALUES (1330395579818037249, '张三', 123.00, 11, '2020-11-03', '1', NULL, '0', 1, 1, '2020-11-22 14:19:58', 1, '2020-11-22 14:21:53', '2021-04-08 23:52:13'); INSERT INTO `test_user` VALUES (1330395677499183106, '李四', 123.00, 19, '2020-11-04', '0', NULL, '0', 0, 1, '2020-11-22 14:20:22', 1, '2020-11-22 14:20:22', '2021-04-08 23:52:13'); INSERT INTO `test_user` VALUES (1330395764019286017, '王五', 123.00, 12, '2020-11-02', '1', NULL, '0', 0, 1, '2020-11-22 14:20:42', 1, '2020-11-22 14:20:42', '2021-04-08 23:52:13'); @@ -31900,5 +31986,6 @@ INSERT INTO `test_user` VALUES (1336252034586361857, '李四', 1000.00, 22, '199 INSERT INTO `test_user` VALUES (1338285518968438785, '周宇琪', 9999.00, 21, '1979-12-01', '0', 1, '0', 9, 1313694379541635074, '2020-12-14 08:51:47', 1313694379541635074, '2021-01-18 17:08:18', '2021-04-08 23:52:13'); INSERT INTO `test_user` VALUES (1338682114751184897, '张世荣', 565433.00, 20, '2020-12-01', '0', 1, '1', 1, 1313694379541635074, '2020-12-15 11:07:42', 1313694379541635074, '2020-12-16 14:10:22', '2021-04-08 23:52:13'); INSERT INTO `test_user` VALUES (1339439636625866754, '李佳昌', 1111.00, 111, '2020-12-01', '1', 1, '1', 0, 1313694379541635074, '2020-12-17 13:17:50', 1313694379541635074, '2020-12-17 13:17:50', '2021-04-08 23:52:13'); +COMMIT; SET FOREIGN_KEY_CHECKS = 1; diff --git a/opsli-api/src/main/java/org/opsli/api/web/system/user/UserApi.java b/opsli-api/src/main/java/org/opsli/api/web/system/user/UserApi.java index b82d0790..a00250d7 100644 --- a/opsli-api/src/main/java/org/opsli/api/web/system/user/UserApi.java +++ b/opsli-api/src/main/java/org/opsli/api/web/system/user/UserApi.java @@ -162,6 +162,22 @@ public interface UserApi { HttpServletRequest request ); + /** + * 用户信息 根据租户Id 查询 查询分页 + * @param pageNo 当前页 + * @param pageSize 每页条数 + * @param request request + * @return ResultVo + */ + @GetMapping("/findPageByTenant") + ResultVo findPageByTenant( + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest request + ); + + + /** * 用户信息 新增 * @param model 模型 diff --git a/opsli-api/src/main/java/org/opsli/api/web/system/user/UserOrgRefApi.java b/opsli-api/src/main/java/org/opsli/api/web/system/user/UserOrgRefApi.java index c64a3dcd..97f24a0c 100644 --- a/opsli-api/src/main/java/org/opsli/api/web/system/user/UserOrgRefApi.java +++ b/opsli-api/src/main/java/org/opsli/api/web/system/user/UserOrgRefApi.java @@ -68,12 +68,4 @@ public interface UserOrgRefApi { //@GetMapping("/getRolesByUserId") ResultVo getDefOrgByUserId(String userId); - /** - * 当前登陆用户信息 - * - * @param userId 用户ID - * @return ResultVo - */ - ResultVo getOrgInfoByUserId(String userId); - } diff --git a/opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UserModel.java b/opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UserModel.java index 9f61752f..d934960b 100644 --- a/opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UserModel.java +++ b/opsli-api/src/main/java/org/opsli/api/wrapper/system/user/UserModel.java @@ -136,6 +136,12 @@ public class UserModel extends ApiWrapper { @ValidatorLenMax(20) private String tenantId; + /** 是否租户管理员 */ + @ApiModelProperty(value = "是否租户管理员") + @ExcelIgnore + @ValidatorLenMax(1) + private String izTenantAdmin; + /** 是否存在组织 */ @JsonIgnore @ExcelIgnore @@ -143,4 +149,6 @@ public class UserModel extends ApiWrapper { private String izExistOrg; + + } diff --git a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/persistence/querybuilder/chain/QueryTenantHandler.java b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/persistence/querybuilder/chain/QueryTenantHandler.java index b3b1be2d..20727edd 100644 --- a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/persistence/querybuilder/chain/QueryTenantHandler.java +++ b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/persistence/querybuilder/chain/QueryTenantHandler.java @@ -60,13 +60,13 @@ public class QueryTenantHandler implements QueryBuilderChain{ boolean tenantFlag = ReflectUtil.hasField(entityClazz, MyBatisConstants.FIELD_TENANT); if(tenantFlag) { String tenantId = UserUtil.getTenantId(); - UserModel user = UserUtil.getUser(); + //UserModel user = UserUtil.getUser(); // 超级管理员可以操作 无租户限制, 其余用户全部有租户限制 - if(!UserUtil.SUPER_ADMIN.equals(user.getUsername()) && - StringUtils.isNotEmpty(tenantId) - ){ +// if(!UserUtil.SUPER_ADMIN.equals(user.getUsername()) && +// StringUtils.isNotEmpty(tenantId) +// ){ wrapper.eq(FieldUtil.humpToUnderline(MyBatisConstants.FIELD_TENANT), tenantId); - } + //} } return wrapper; } @@ -82,18 +82,18 @@ public class QueryTenantHandler implements QueryBuilderChain{ boolean tenantFlag = ReflectUtil.hasField(entityClazz, MyBatisConstants.FIELD_TENANT); if(tenantFlag) { String tenantId = UserUtil.getTenantId(); - UserModel user = UserUtil.getUser(); + //UserModel user = UserUtil.getUser(); // 超级管理员可以操作 无租户限制, 其余用户全部有租户限制 - if(!UserUtil.SUPER_ADMIN.equals(user.getUsername()) && - StringUtils.isNotEmpty(tenantId) - ){ +// if(!UserUtil.SUPER_ADMIN.equals(user.getUsername()) && +// StringUtils.isNotEmpty(tenantId) +// ){ String fieldName = webQueryConf.get(MyBatisConstants.FIELD_TENANT); if(StringUtils.isEmpty(fieldName)){ fieldName = FieldUtil.humpToUnderline(MyBatisConstants.FIELD_TENANT); } wrapper.eq(fieldName, tenantId); - } + //} } return wrapper; } diff --git a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/utils/UserUtil.java b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/utils/UserUtil.java index 83bae125..d2162c32 100644 --- a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/utils/UserUtil.java +++ b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/utils/UserUtil.java @@ -61,7 +61,7 @@ public class UserUtil { public static final String PREFIX_ID = "userId:"; public static final String PREFIX_ID_ROLES = "userId:roles:"; public static final String PREFIX_ID_DEF_ROLE = "userId:def_role:"; - public static final String PREFIX_ID_ORGS = "userId:orgs"; + public static final String PREFIX_ID_ORGS = "userId:orgs:"; public static final String PREFIX_ID_DEF_ORG = "userId:def_org:"; public static final String PREFIX_ID_PERMISSIONS = "userId:permissions:"; public static final String PREFIX_ID_MENUS = "userId:menus:"; diff --git a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/role/service/impl/RoleServiceImpl.java b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/role/service/impl/RoleServiceImpl.java index e3de4435..6e478c36 100644 --- a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/role/service/impl/RoleServiceImpl.java +++ b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/role/service/impl/RoleServiceImpl.java @@ -144,35 +144,6 @@ public class RoleServiceImpl extends CrudServiceImpl findList(QueryWrapper queryWrapper) { - // 如果没有租户修改能力 则默认增加租户限制 - if(!UserUtil.isHasUpdateTenantPerms(UserUtil.getUser())){ - // 数据处理责任链 - queryWrapper = new QueryTenantHandler( - new QueryDataPermsHandler() - ).handler(entityClazz, queryWrapper); - } - - return super.list(queryWrapper); - } - - @Override - public List findAllList() { - QueryBuilder queryBuilder = new GenQueryBuilder<>(); - QueryWrapper queryWrapper = queryBuilder.build(); - - // 如果没有租户修改能力 则默认增加租户限制 - if(!UserUtil.isHasUpdateTenantPerms(UserUtil.getUser())){ - // 数据处理责任链 - queryWrapper = new QueryTenantHandler( - new QueryDataPermsHandler() - ).handler(entityClazz, queryWrapper); - } - - return super.list(queryWrapper); - } - /** * 唯一验证 * @param model model @@ -193,22 +164,15 @@ public class RoleServiceImpl extends CrudServiceImpl orgRefList = super.list(wrapper); if(CollUtil.isEmpty(orgRefList)){ - // 判断是否是超级管理员 如果是超级管理员 则默认享有全部权限 if(StringUtils.equals(UserUtil.SUPER_ADMIN, userModel.getUsername())){ QueryWrapper queryWrapper = new QueryWrapper<>(); diff --git a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/service/impl/UserServiceImpl.java b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/service/impl/UserServiceImpl.java index 6f370408..4bd6b9c0 100644 --- a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/service/impl/UserServiceImpl.java +++ b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/service/impl/UserServiceImpl.java @@ -98,6 +98,7 @@ public class UserServiceImpl extends CrudServiceImpl> findListByUserId(String userId) { List listByUserId = iUserOrgRefService.findListByUserId(userId); @@ -103,76 +100,6 @@ public class UserOrgRefRestController implements UserOrgRefApi { return ResultVo.success(userOrgRefModel); } - /** - * 用户组织机构 - * @param userId 用户ID - * @return ResultVo - */ - @ApiOperation(value = "用户组织机构", notes = "用户组织机构") - @Override - public ResultVo getOrgInfoByUserId(String userId) { - UserOrgRefWebModel org = null; - // 不写SQL了 直接分页 第一页 取第一条 - QueryBuilder queryBuilder = new GenQueryBuilder<>(); - Page page = new Page<>(1, 1); - QueryWrapper queryWrapper = queryBuilder.build(); - queryWrapper.eq( - "a.id", - userId - ); - page.setQueryWrapper(queryWrapper); - page = iUserService.findPageByCus(page); - List list = page.getList(); - if(CollUtil.isNotEmpty(list)){ - UserWebModel userWebModel = list.get(0); - if(userWebModel != null){ -// org = userAndOrgModel.getOrg(); -// if(org != null){ -// -// org.setUserId(userId); - -// List orgIds = Lists.newArrayListWithCapacity(3); -// orgIds.add(org.getCompanyId()); -// orgIds.add(org.getDepartmentId()); -// orgIds.add(org.getPostId()); -// QueryWrapper orgQueryWrapper = new QueryWrapper<>(); -// orgQueryWrapper.in( -// FieldUtil.humpToUnderline(MyBatisConstants.FIELD_ID), -// orgIds); -// List orgList = iSysOrgService.findList(orgQueryWrapper); -// if(CollUtil.isNotEmpty(orgList)){ -// Map tmp = Maps.newHashMap(); -// for (SysOrg sysOrg : orgList) { -// tmp.put(sysOrg.getId(), sysOrg); -// } -// -// // 设置 名称 -// SysOrg company = tmp.get(org.getCompanyId()); -// if(company != null){ -// org.setCompanyName(company.getOrgName()); -// } -// -// SysOrg department = tmp.get(org.getDepartmentId()); -// if(department != null){ -// org.setDepartmentName(department.getOrgName()); -// } -// -// SysOrg post = tmp.get(org.getPostId()); -// if(post != null){ -// org.setPostName(post.getOrgName()); -// } -// } - -// } - } - } - return ResultVo.success(org); - } - - - - - /** * 演示模式 diff --git a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/web/UserRestController.java b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/web/UserRestController.java index b513ef54..0d24a189 100644 --- a/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/web/UserRestController.java +++ b/opsli-modulars/opsli-modulars-system/src/main/java/org/opsli/modulars/system/user/web/UserRestController.java @@ -35,8 +35,11 @@ import org.opsli.api.wrapper.system.user.*; import org.opsli.common.annotation.ApiRestController; import org.opsli.common.annotation.EnableLog; import org.opsli.common.annotation.RequiresPermissionsCus; +import org.opsli.common.constants.MyBatisConstants; +import org.opsli.common.enums.DictType; import org.opsli.common.exception.ServiceException; import org.opsli.common.exception.TokenException; +import org.opsli.common.utils.FieldUtil; import org.opsli.common.utils.WrapperUtil; import org.opsli.core.base.controller.BaseRestController; import org.opsli.core.msg.TokenMsg; @@ -322,6 +325,9 @@ public class UserRestController extends BaseRestController page = new Page<>(pageNo, pageSize); QueryWrapper queryWrapper = queryBuilder.build(); + // 不查看 为租户管理员的用户 + queryWrapper.notIn("iz_tenant_admin", DictType.NO_YES_YES.getValue()); + // 处理组织权限 OrgUtil.handleOrgIdGroupCondition(orgIdGroup, queryWrapper); @@ -336,6 +342,37 @@ public class UserRestController extends BaseRestController findPageByTenant(Integer pageNo, Integer pageSize, + HttpServletRequest request) { + + QueryBuilder queryBuilder = new WebQueryBuilder<>( + SysUserWeb.class, request.getParameterMap()); + Page page = new Page<>(pageNo, pageSize); + QueryWrapper queryWrapper = queryBuilder.build(); + // 只查看 为租户管理员的用户 + queryWrapper.eq("iz_tenant_admin", DictType.NO_YES_YES.getValue()); + + page.setQueryWrapper(queryWrapper); + page = IService.findPageByCus(page); + // 密码防止分页泄露处理 + for (UserWebModel userModel : page.getList()) { + userModel.setSecretKey(null); + userModel.setPassword(null); + userModel.setPasswordLevel(null); + } + return ResultVo.success(page.getPageData()); + } + /** * 用户信息 新增 * @param model 模型