From c258e323520793bb457da085ce40cd0e37cb0af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=B2=90?= Date: Tue, 11 Oct 2022 11:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9SQL=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/mysql/maku-boot.sql | 291 -------------------------------- db/mysql/maku.sql | 291 ++++++++++++++++++++++++++++++++ db/mysql/module/maku-boot-message.sql | 57 ------- db/mysql/module/maku-boot-quartz.sql | 216 ------------------------ db/mysql/module/maku-module-message.sql | 57 +++++++ db/mysql/module/maku-module-quartz.sql | 216 ++++++++++++++++++++++++ 6 files changed, 564 insertions(+), 564 deletions(-) delete mode 100644 db/mysql/maku-boot.sql create mode 100644 db/mysql/maku.sql delete mode 100644 db/mysql/module/maku-boot-message.sql delete mode 100644 db/mysql/module/maku-boot-quartz.sql create mode 100644 db/mysql/module/maku-module-message.sql create mode 100644 db/mysql/module/maku-module-quartz.sql diff --git a/db/mysql/maku-boot.sql b/db/mysql/maku-boot.sql deleted file mode 100644 index 8856ffe..0000000 --- a/db/mysql/maku-boot.sql +++ /dev/null @@ -1,291 +0,0 @@ -CREATE TABLE sys_user -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - username varchar(50) NOT NULL COMMENT '用户名', - password varchar(100) COMMENT '密码', - real_name varchar(50) COMMENT '姓名', - avatar varchar(200) COMMENT '头像', - gender tinyint COMMENT '性别 0:男 1:女 2:未知', - email varchar(100) COMMENT '邮箱', - mobile varchar(20) COMMENT '手机号', - org_id bigint COMMENT '机构ID', - super_admin tinyint COMMENT '超级管理员 0:否 1:是', - status tinyint COMMENT '状态 0:停用 1:正常', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='用户管理'; - -CREATE TABLE sys_org -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - pid bigint COMMENT '上级ID', - name varchar(50) COMMENT '机构名称', - sort int COMMENT '排序', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id), - key idx_pid (pid) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='机构管理'; - -create table sys_role -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - name varchar(50) COMMENT '角色名称', - remark varchar(100) COMMENT '备注', - data_scope tinyint COMMENT '数据范围 0:全部数据 1:本部门及子部门数据 2:本部门数据 3:本人数据 4:自定义数据', - org_id bigint COMMENT '机构ID', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id), - key idx_org_id (org_id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色管理'; - -create table sys_user_role -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - role_id bigint COMMENT '角色ID', - user_id bigint COMMENT '用户ID', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id), - key idx_role_id (role_id), - key idx_user_id (user_id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='用户角色关系'; - -CREATE TABLE sys_post -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - post_code varchar(100) COMMENT '岗位编码', - post_name varchar(100) COMMENT '岗位名称', - sort int COMMENT '排序', - status tinyint COMMENT '状态 0:停用 1:正常', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='岗位管理'; - -CREATE TABLE sys_user_post -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - user_id bigint COMMENT '用户ID', - post_id bigint COMMENT '岗位ID', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id), - key idx_user_id (user_id), - key idx_post_id (post_id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='用户岗位关系'; - -create table sys_menu -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - pid bigint COMMENT '上级ID,一级菜单为0', - name varchar(200) COMMENT '菜单名称', - url varchar(200) COMMENT '菜单URL', - authority varchar(500) COMMENT '授权标识(多个用逗号分隔,如:sys:menu:list,sys:menu:save)', - type tinyint COMMENT '类型 0:菜单 1:按钮 2:接口', - open_style tinyint COMMENT '打开方式 0:内部 1:外部', - icon varchar(50) COMMENT '菜单图标', - sort int COMMENT '排序', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id), - key idx_pid (pid) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='菜单管理'; - -create table sys_role_menu -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - role_id bigint COMMENT '角色ID', - menu_id bigint COMMENT '菜单ID', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id), - key idx_role_id (role_id), - key idx_menu_id (menu_id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色菜单关系'; - -create table sys_role_data_scope -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - role_id bigint COMMENT '角色ID', - org_id bigint COMMENT '机构ID', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id), - key idx_role_id (role_id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色数据权限'; - -create table sys_dict_type -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - dict_type varchar(100) NOT NULL COMMENT '字典类型', - dict_name varchar(255) NOT NULL COMMENT '字典名称', - remark varchar(255) COMMENT '备注', - sort int COMMENT '排序', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='字典类型'; - -create table sys_dict_data -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - dict_type_id bigint NOT NULL COMMENT '字典类型ID', - dict_label varchar(255) NOT NULL COMMENT '字典标签', - dict_value varchar(255) COMMENT '字典值', - remark varchar(255) COMMENT '备注', - sort int COMMENT '排序', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='字典数据'; - -create table sys_attachment -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - name varchar(255) NOT NULL COMMENT '附件名称', - url varchar(255) NOT NULL COMMENT '附件地址', - size bigint COMMENT '附件大小', - platform varchar(50) COMMENT '存储平台', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='附件管理'; - - -create table sys_log_login -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - username varchar(50) COMMENT '用户名', - ip varchar(32) COMMENT '登录IP', - address varchar(32) COMMENT '登录地点', - user_agent varchar(500) COMMENT 'User Agent', - status tinyint COMMENT '登录状态 0:失败 1:成功', - operation tinyint unsigned COMMENT '操作信息 0:登录成功 1:退出成功 2:验证码错误 3:账号密码错误', - create_time datetime COMMENT '创建时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='登录日志'; - - - -INSERT INTO sys_user (id, username, password, real_name, avatar, gender, email, mobile, status, org_id, super_admin, version, deleted, creator, create_time, updater, update_time) VALUES (10000, 'admin', '{bcrypt}$2a$10$mW/yJPHjyueQ1g26WNBz0uxVPa0GQdJO1fFZmqdkqgMTGnyszlXxu', 'admin', 'https://cdn.maku.net/images/avatar.png', 0, 'babamu@126.com', '13612345678', 1, null, 1, 0, 0, 10000, now(), 10000, now()); - -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, 0, '系统设置', NULL, NULL, 0, 0, 'icon-setting', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (2, 1, '菜单管理', 'sys/menu/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (3, 2, '查看', '', 'sys:menu:list', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (4, 2, '新增', '', 'sys:menu:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (5, 2, '修改', '', 'sys:menu:update,sys:menu:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (6, 2, '删除', '', 'sys:menu:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (7, 1, '数据字典', 'sys/dict/type', '', 0, 0, 'icon-insertrowabove', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (8, 7, '查询', '', 'sys:dict:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (9, 7, '新增', '', 'sys:dict:save', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (10, 7, '修改', '', 'sys:dict:update,sys:dict:info', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (11, 7, '删除', '', 'sys:dict:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (12, 0, '权限管理', '', '', 0, 0, 'icon-safetycertificate', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (13, 12, '岗位管理', 'sys/post/index', '', 0, 0, 'icon-solution', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (14, 13, '查询', '', 'sys:post:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (15, 13, '新增', '', 'sys:post:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (16, 13, '修改', '', 'sys:post:update,sys:post:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (17, 13, '删除', '', 'sys:post:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (18, 12, '机构管理', 'sys/org/index', '', 0, 0, 'icon-cluster', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (19, 18, '查询', '', 'sys:org:list', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (20, 18, '新增', '', 'sys:org:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (21, 18, '修改', '', 'sys:org:update,sys:org:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (22, 18, '删除', '', 'sys:org:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (23, 12, '角色管理', 'sys/role/index', '', 0, 0, 'icon-team', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (24, 23, '查询', '', 'sys:role:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (25, 23, '新增', '', 'sys:role:save,sys:role:menu,sys:org:list', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (26, 23, '修改', '', 'sys:role:update,sys:role:info,sys:role:menu,sys:org:list,sys:user:page', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (27, 23, '删除', '', 'sys:role:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (28, 12, '用户管理', 'sys/user/index', '', 0, 0, 'icon-user', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (29, 28, '查询', '', 'sys:user:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (30, 28, '新增', '', 'sys:user:save,sys:role:list', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (31, 28, '修改', '', 'sys:user:update,sys:user:info,sys:role:list', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (32, 28, '删除', '', 'sys:user:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (33, 0, '应用管理', '', '', 0, 0, 'icon-appstore', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (34, 1, '附件管理', 'sys/attachment/index', NULL, 0, 0, 'icon-folder-fill', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (35, 34, '查看', '', 'sys:attachment:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (36, 34, '上传', '', 'sys:attachment:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (37, 34, '删除', '', 'sys:attachment:delete', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (38, 0, '日志管理', '', '', 0, 0, 'icon-filedone', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (39, 38, '登录日志', 'sys/log/login', 'sys:log:login', 0, 0, 'icon-solution', 0, 0, 0, 10000, now(), 10000, now()); - - -INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, 'post_status', '状态', '岗位管理', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (2, 'user_gender', '性别', '用户管理', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (3, 'user_status', '状态', '用户管理', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (4, 'role_data_scope', '数据范围', '角色管理', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (5, 'enable_disable', '状态', '功能状态:启用 | 禁用 ', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (6, 'success_fail', '状态', '操作状态:成功 | 失败', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (7, 'login_operation', '操作信息', '登录管理', 0, 0, 0, 10000, now(), 10000, now()); - -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, 1, '停用', '0', '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (2, 1, '正常', '1', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (3, 2, '男', '0', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (4, 2, '女', '1', '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (5, 2, '未知', '2', '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (6, 3, '正常', '1', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (7, 3, '停用', '0', '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (8, 4, '全部数据', '0', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (9, 4, '本部门及子部门数据', '1', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (10, 4, '本部门数据', '2', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (11, 4, '本人数据', '3', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (12, 4, '自定义数据', '4', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (13, 5, '禁用', '0', '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (14, 5, '启用', '1', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (15, 6, '失败', '0', '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (16, 6, '成功', '1', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (17, 7, '登录成功', '0', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (18, 7, '退出成功', '1', '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (19, 7, '验证码错误', '2', '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (20, 7, '账号密码错误', '3', '', 3, 0, 0, 10000, now(), 10000, now()); diff --git a/db/mysql/maku.sql b/db/mysql/maku.sql new file mode 100644 index 0000000..8856ffe --- /dev/null +++ b/db/mysql/maku.sql @@ -0,0 +1,291 @@ +CREATE TABLE sys_user +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + username varchar(50) NOT NULL COMMENT '用户名', + password varchar(100) COMMENT '密码', + real_name varchar(50) COMMENT '姓名', + avatar varchar(200) COMMENT '头像', + gender tinyint COMMENT '性别 0:男 1:女 2:未知', + email varchar(100) COMMENT '邮箱', + mobile varchar(20) COMMENT '手机号', + org_id bigint COMMENT '机构ID', + super_admin tinyint COMMENT '超级管理员 0:否 1:是', + status tinyint COMMENT '状态 0:停用 1:正常', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='用户管理'; + +CREATE TABLE sys_org +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + pid bigint COMMENT '上级ID', + name varchar(50) COMMENT '机构名称', + sort int COMMENT '排序', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id), + key idx_pid (pid) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='机构管理'; + +create table sys_role +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + name varchar(50) COMMENT '角色名称', + remark varchar(100) COMMENT '备注', + data_scope tinyint COMMENT '数据范围 0:全部数据 1:本部门及子部门数据 2:本部门数据 3:本人数据 4:自定义数据', + org_id bigint COMMENT '机构ID', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id), + key idx_org_id (org_id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色管理'; + +create table sys_user_role +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + role_id bigint COMMENT '角色ID', + user_id bigint COMMENT '用户ID', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id), + key idx_role_id (role_id), + key idx_user_id (user_id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='用户角色关系'; + +CREATE TABLE sys_post +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + post_code varchar(100) COMMENT '岗位编码', + post_name varchar(100) COMMENT '岗位名称', + sort int COMMENT '排序', + status tinyint COMMENT '状态 0:停用 1:正常', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='岗位管理'; + +CREATE TABLE sys_user_post +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + user_id bigint COMMENT '用户ID', + post_id bigint COMMENT '岗位ID', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id), + key idx_user_id (user_id), + key idx_post_id (post_id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='用户岗位关系'; + +create table sys_menu +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + pid bigint COMMENT '上级ID,一级菜单为0', + name varchar(200) COMMENT '菜单名称', + url varchar(200) COMMENT '菜单URL', + authority varchar(500) COMMENT '授权标识(多个用逗号分隔,如:sys:menu:list,sys:menu:save)', + type tinyint COMMENT '类型 0:菜单 1:按钮 2:接口', + open_style tinyint COMMENT '打开方式 0:内部 1:外部', + icon varchar(50) COMMENT '菜单图标', + sort int COMMENT '排序', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id), + key idx_pid (pid) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='菜单管理'; + +create table sys_role_menu +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + role_id bigint COMMENT '角色ID', + menu_id bigint COMMENT '菜单ID', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id), + key idx_role_id (role_id), + key idx_menu_id (menu_id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色菜单关系'; + +create table sys_role_data_scope +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + role_id bigint COMMENT '角色ID', + org_id bigint COMMENT '机构ID', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id), + key idx_role_id (role_id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='角色数据权限'; + +create table sys_dict_type +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + dict_type varchar(100) NOT NULL COMMENT '字典类型', + dict_name varchar(255) NOT NULL COMMENT '字典名称', + remark varchar(255) COMMENT '备注', + sort int COMMENT '排序', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='字典类型'; + +create table sys_dict_data +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + dict_type_id bigint NOT NULL COMMENT '字典类型ID', + dict_label varchar(255) NOT NULL COMMENT '字典标签', + dict_value varchar(255) COMMENT '字典值', + remark varchar(255) COMMENT '备注', + sort int COMMENT '排序', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='字典数据'; + +create table sys_attachment +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + name varchar(255) NOT NULL COMMENT '附件名称', + url varchar(255) NOT NULL COMMENT '附件地址', + size bigint COMMENT '附件大小', + platform varchar(50) COMMENT '存储平台', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='附件管理'; + + +create table sys_log_login +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + username varchar(50) COMMENT '用户名', + ip varchar(32) COMMENT '登录IP', + address varchar(32) COMMENT '登录地点', + user_agent varchar(500) COMMENT 'User Agent', + status tinyint COMMENT '登录状态 0:失败 1:成功', + operation tinyint unsigned COMMENT '操作信息 0:登录成功 1:退出成功 2:验证码错误 3:账号密码错误', + create_time datetime COMMENT '创建时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT ='登录日志'; + + + +INSERT INTO sys_user (id, username, password, real_name, avatar, gender, email, mobile, status, org_id, super_admin, version, deleted, creator, create_time, updater, update_time) VALUES (10000, 'admin', '{bcrypt}$2a$10$mW/yJPHjyueQ1g26WNBz0uxVPa0GQdJO1fFZmqdkqgMTGnyszlXxu', 'admin', 'https://cdn.maku.net/images/avatar.png', 0, 'babamu@126.com', '13612345678', 1, null, 1, 0, 0, 10000, now(), 10000, now()); + +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, 0, '系统设置', NULL, NULL, 0, 0, 'icon-setting', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (2, 1, '菜单管理', 'sys/menu/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (3, 2, '查看', '', 'sys:menu:list', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (4, 2, '新增', '', 'sys:menu:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (5, 2, '修改', '', 'sys:menu:update,sys:menu:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (6, 2, '删除', '', 'sys:menu:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (7, 1, '数据字典', 'sys/dict/type', '', 0, 0, 'icon-insertrowabove', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (8, 7, '查询', '', 'sys:dict:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (9, 7, '新增', '', 'sys:dict:save', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (10, 7, '修改', '', 'sys:dict:update,sys:dict:info', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (11, 7, '删除', '', 'sys:dict:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (12, 0, '权限管理', '', '', 0, 0, 'icon-safetycertificate', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (13, 12, '岗位管理', 'sys/post/index', '', 0, 0, 'icon-solution', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (14, 13, '查询', '', 'sys:post:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (15, 13, '新增', '', 'sys:post:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (16, 13, '修改', '', 'sys:post:update,sys:post:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (17, 13, '删除', '', 'sys:post:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (18, 12, '机构管理', 'sys/org/index', '', 0, 0, 'icon-cluster', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (19, 18, '查询', '', 'sys:org:list', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (20, 18, '新增', '', 'sys:org:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (21, 18, '修改', '', 'sys:org:update,sys:org:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (22, 18, '删除', '', 'sys:org:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (23, 12, '角色管理', 'sys/role/index', '', 0, 0, 'icon-team', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (24, 23, '查询', '', 'sys:role:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (25, 23, '新增', '', 'sys:role:save,sys:role:menu,sys:org:list', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (26, 23, '修改', '', 'sys:role:update,sys:role:info,sys:role:menu,sys:org:list,sys:user:page', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (27, 23, '删除', '', 'sys:role:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (28, 12, '用户管理', 'sys/user/index', '', 0, 0, 'icon-user', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (29, 28, '查询', '', 'sys:user:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (30, 28, '新增', '', 'sys:user:save,sys:role:list', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (31, 28, '修改', '', 'sys:user:update,sys:user:info,sys:role:list', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (32, 28, '删除', '', 'sys:user:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (33, 0, '应用管理', '', '', 0, 0, 'icon-appstore', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (34, 1, '附件管理', 'sys/attachment/index', NULL, 0, 0, 'icon-folder-fill', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (35, 34, '查看', '', 'sys:attachment:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (36, 34, '上传', '', 'sys:attachment:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (37, 34, '删除', '', 'sys:attachment:delete', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (38, 0, '日志管理', '', '', 0, 0, 'icon-filedone', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (39, 38, '登录日志', 'sys/log/login', 'sys:log:login', 0, 0, 'icon-solution', 0, 0, 0, 10000, now(), 10000, now()); + + +INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, 'post_status', '状态', '岗位管理', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (2, 'user_gender', '性别', '用户管理', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (3, 'user_status', '状态', '用户管理', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (4, 'role_data_scope', '数据范围', '角色管理', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (5, 'enable_disable', '状态', '功能状态:启用 | 禁用 ', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (6, 'success_fail', '状态', '操作状态:成功 | 失败', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (7, 'login_operation', '操作信息', '登录管理', 0, 0, 0, 10000, now(), 10000, now()); + +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, 1, '停用', '0', '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (2, 1, '正常', '1', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (3, 2, '男', '0', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (4, 2, '女', '1', '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (5, 2, '未知', '2', '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (6, 3, '正常', '1', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (7, 3, '停用', '0', '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (8, 4, '全部数据', '0', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (9, 4, '本部门及子部门数据', '1', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (10, 4, '本部门数据', '2', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (11, 4, '本人数据', '3', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (12, 4, '自定义数据', '4', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (13, 5, '禁用', '0', '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (14, 5, '启用', '1', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (15, 6, '失败', '0', '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (16, 6, '成功', '1', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (17, 7, '登录成功', '0', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (18, 7, '退出成功', '1', '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (19, 7, '验证码错误', '2', '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES (20, 7, '账号密码错误', '3', '', 3, 0, 0, 10000, now(), 10000, now()); diff --git a/db/mysql/module/maku-boot-message.sql b/db/mysql/module/maku-boot-message.sql deleted file mode 100644 index 5b0d4e9..0000000 --- a/db/mysql/module/maku-boot-message.sql +++ /dev/null @@ -1,57 +0,0 @@ -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (33, '消息管理', '', '', 0, 0, 'icon-message', 2, 0, 0, 10000, now(), 10000, now()); - -set @menuId = @@identity; -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '短信日志', 'message/sms/log/index', 'sms:log', 0, 0, 'icon-detail', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '短信平台', 'message/sms/platform/index', NULL, 0, 0, 'icon-whatsapp', 0, 0, 0, 10000, now(), 10000, now()); - -set @menuId = @@identity; -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '查看', '', 'sms:platform:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '新增', '', 'sms:platform:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '修改', '', 'sms:platform:update,sms:platform:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '删除', '', 'sms:platform:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); - -INSERT INTO sys_dict_type (dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ('sms_platform', '平台类型', '短信管理', 0, 0, 0, 10000, now(), 10000, now()); - -SET @typeId = @@identity; -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '阿里云', '0', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '腾讯云', '1', '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '七牛云', '2', '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '华为云', '3', '', 3, 0, 0, 10000, now(), 10000, now()); - - -DROP TABLE IF EXISTS sms_platform; -DROP TABLE IF EXISTS sms_log; - -CREATE TABLE sms_platform -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - platform tinyint COMMENT '平台类型 0:阿里云 1:腾讯云 2:七牛云 3:华为云', - sign_name varchar(100) NOT NULL COMMENT '短信签名', - template_id varchar(100) NOT NULL COMMENT '短信模板', - app_id varchar(100) NOT NULL COMMENT '短信应用ID,如:腾讯云等', - sender_id varchar(100) NOT NULL COMMENT '腾讯云国际短信、华为云等需要', - url varchar(200) NOT NULL COMMENT '接入地址,如:华为云', - access_key varchar(100) COMMENT 'AccessKey', - secret_key varchar(100) COMMENT 'SecretKey', - status tinyint COMMENT '状态 0:禁用 1:启用', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='短信平台'; - -CREATE TABLE sms_log -( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - platform_id bigint COMMENT '平台ID', - platform tinyint COMMENT '平台类型', - mobile varchar(20) NOT NULL COMMENT '手机号', - params varchar(200) COMMENT '参数', - status tinyint COMMENT '状态 0:失败 1:成功', - error varchar(2000) COMMENT '异常信息', - create_time datetime COMMENT '创建时间', - primary key (id) -) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='短信日志'; \ No newline at end of file diff --git a/db/mysql/module/maku-boot-quartz.sql b/db/mysql/module/maku-boot-quartz.sql deleted file mode 100644 index 2c97cff..0000000 --- a/db/mysql/module/maku-boot-quartz.sql +++ /dev/null @@ -1,216 +0,0 @@ -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '定时任务', 'quartz/schedule/index', NULL, 0, 0, 'icon-reloadtime', 0, 0, 0, 10000, now(), 10000, now()); - -SET @menuId = @@identity; -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '查看', '', 'schedule:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '新增', '', 'schedule:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '修改', '', 'schedule:update,schedule:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '删除', '', 'schedule:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '立即运行', '', 'schedule:run', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '日志', '', 'schedule:log', 1, 0, '', 4, 0, 0, 10000, now(), 10000, now()); - -INSERT INTO sys_dict_type (dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ('schedule_group', '任务组名', '定时任务', 0, 0, 0, 10000, now(), 10000, now()); - -SET @typeId = @@identity; -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '默认', 'default', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '系统', 'system', '', 1, 0, 0, 10000, now(), 10000, now()); - -INSERT INTO sys_dict_type (dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ('schedule_status', '状态', '定时任务', 0, 0, 0, 10000, now(), 10000, now()); - -SET @typeId = @@identity; -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '暂停', '0', '', 0, 0, 0, 10000, now(), 10000, now()); -INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '正常', '1', '', 1, 0, 0, 10000, now(), 10000, now()); - - -DROP TABLE IF EXISTS schedule_job; -DROP TABLE IF EXISTS schedule_job_log; - -CREATE TABLE schedule_job ( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - job_name varchar(200) COMMENT '名称', - job_group varchar(100) COMMENT '分组', - bean_name varchar(200) COMMENT 'spring bean名称', - method varchar(100) COMMENT '执行方法', - params varchar(2000) COMMENT '参数', - cron_expression varchar(100) COMMENT 'cron表达式', - status tinyint unsigned COMMENT '状态 0:暂停 1:正常', - concurrent tinyint unsigned COMMENT '是否并发 0:禁止 1:允许', - remark varchar(255) COMMENT '备注', - version int COMMENT '版本号', - deleted tinyint COMMENT '删除标识 0:正常 1:已删除', - creator bigint COMMENT '创建者', - create_time datetime COMMENT '创建时间', - updater bigint COMMENT '更新者', - update_time datetime COMMENT '更新时间', - PRIMARY KEY (id) -) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务'; - -CREATE TABLE schedule_job_log ( - id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', - job_id bigint NOT NULL COMMENT '任务id', - job_name varchar(200) COMMENT '任务名称', - job_group varchar(100) COMMENT '任务组名', - bean_name varchar(200) COMMENT 'spring bean名称', - method varchar(100) COMMENT '执行方法', - params varchar(2000) COMMENT '参数', - status tinyint unsigned NOT NULL COMMENT '任务状态 0:失败 1:成功', - error varchar(2000) COMMENT '异常信息', - times bigint NOT NULL COMMENT '耗时(单位:毫秒)', - create_time datetime COMMENT '创建时间', - PRIMARY KEY (id), - key idx_job_id (job_id) -) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务日志'; - - -INSERT INTO schedule_job (id, job_name, job_group, bean_name, method, params, cron_expression, status, concurrent, remark, version, deleted, creator, create_time, updater, update_time) VALUES (1, '测试任务', 'system', 'testTask', 'run', '123', '0 * * * * ? *', 0, 0, '', 14, 0, 10000, now(), 10000, now()); - - - - --- ---------------------------------------------------------- --- 以下为Quartz框架,自带的表结构 --- ---------------------------------------------------------- - -DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; -DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; -DROP TABLE IF EXISTS QRTZ_LOCKS; -DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; -DROP TABLE IF EXISTS QRTZ_CALENDARS; - -create table QRTZ_JOB_DETAILS ( - sched_name varchar(120) not null comment '调度名称', - job_name varchar(200) not null comment '任务名称', - job_group varchar(200) not null comment '任务组名', - description varchar(250) null comment '相关介绍', - job_class_name varchar(250) not null comment '执行任务类名称', - is_durable varchar(1) not null comment '是否持久化', - is_nonconcurrent varchar(1) not null comment '是否并发', - is_update_data varchar(1) not null comment '是否更新数据', - requests_recovery varchar(1) not null comment '是否接受恢复执行', - job_data blob null comment '存放持久化job对象', - primary key (sched_name, job_name, job_group) -) ENGINE=InnoDB COMMENT = '任务详细信息表'; - -create table QRTZ_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment '触发器的名字', - trigger_group varchar(200) not null comment '触发器所属组的名字', - job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键', - job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键', - description varchar(250) null comment '相关介绍', - next_fire_time bigint(13) null comment '上一次触发时间(毫秒)', - prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发)', - priority integer null comment '优先级', - trigger_state varchar(16) not null comment '触发器状态', - trigger_type varchar(8) not null comment '触发器的类型', - start_time bigint(13) not null comment '开始时间', - end_time bigint(13) null comment '结束时间', - calendar_name varchar(200) null comment '日程表名称', - misfire_instr smallint(2) null comment '补偿执行的策略', - job_data blob null comment '存放持久化job对象', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, job_name, job_group) - references QRTZ_JOB_DETAILS(sched_name, job_name, job_group) -) ENGINE=InnoDB COMMENT = '触发器详细信息表'; - -create table QRTZ_SIMPLE_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - repeat_count bigint(7) not null comment '重复的次数统计', - repeat_interval bigint(12) not null comment '重复的间隔时间', - times_triggered bigint(10) not null comment '已经触发的次数', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) - references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) ENGINE=InnoDB COMMENT = '简单触发器的信息表'; - -create table QRTZ_CRON_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - cron_expression varchar(200) not null comment 'cron表达式', - time_zone_id varchar(80) comment '时区', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) - references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) ENGINE=InnoDB COMMENT = 'Cron类型的触发器表'; - -create table QRTZ_BLOB_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - blob_data blob null comment '存放持久化Trigger对象', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) - references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) ENGINE=InnoDB COMMENT = 'Blob类型的触发器表'; - -create table QRTZ_CALENDARS ( - sched_name varchar(120) not null comment '调度名称', - calendar_name varchar(200) not null comment '日历名称', - calendar blob not null comment '存放持久化calendar对象', - primary key (sched_name, calendar_name) -) ENGINE=InnoDB COMMENT = '日历信息表'; - -create table QRTZ_PAUSED_TRIGGER_GRPS ( - sched_name varchar(120) not null comment '调度名称', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - primary key (sched_name, trigger_group) -) ENGINE=InnoDB COMMENT = '暂停的触发器表'; - -create table QRTZ_FIRED_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - entry_id varchar(95) not null comment '调度器实例id', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - instance_name varchar(200) not null comment '调度器实例名', - fired_time bigint(13) not null comment '触发的时间', - sched_time bigint(13) not null comment '定时器制定的时间', - priority integer not null comment '优先级', - state varchar(16) not null comment '状态', - job_name varchar(200) null comment '任务名称', - job_group varchar(200) null comment '任务组名', - is_nonconcurrent varchar(1) null comment '是否并发', - requests_recovery varchar(1) null comment '是否接受恢复执行', - primary key (sched_name, entry_id) -) ENGINE=InnoDB COMMENT = '已触发的触发器表'; - -create table QRTZ_SCHEDULER_STATE ( - sched_name varchar(120) not null comment '调度名称', - instance_name varchar(200) not null comment '实例名称', - last_checkin_time bigint(13) not null comment '上次检查时间', - checkin_interval bigint(13) not null comment '检查间隔时间', - primary key (sched_name, instance_name) -) ENGINE=InnoDB COMMENT = '调度器状态表'; - -create table QRTZ_LOCKS ( - sched_name varchar(120) not null comment '调度名称', - lock_name varchar(40) not null comment '悲观锁名称', - primary key (sched_name, lock_name) -) ENGINE=InnoDB COMMENT = '存储的悲观锁信息表'; - -create table QRTZ_SIMPROP_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数', - str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数', - str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数', - int_prop_1 int null comment 'int类型的trigger的第一个参数', - int_prop_2 int null comment 'int类型的trigger的第二个参数', - long_prop_1 bigint null comment 'long类型的trigger的第一个参数', - long_prop_2 bigint null comment 'long类型的trigger的第二个参数', - dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数', - dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数', - bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数', - bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) - references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) ENGINE=InnoDB COMMENT = '同步机制的行锁表'; \ No newline at end of file diff --git a/db/mysql/module/maku-module-message.sql b/db/mysql/module/maku-module-message.sql new file mode 100644 index 0000000..5b0d4e9 --- /dev/null +++ b/db/mysql/module/maku-module-message.sql @@ -0,0 +1,57 @@ +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (33, '消息管理', '', '', 0, 0, 'icon-message', 2, 0, 0, 10000, now(), 10000, now()); + +set @menuId = @@identity; +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '短信日志', 'message/sms/log/index', 'sms:log', 0, 0, 'icon-detail', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '短信平台', 'message/sms/platform/index', NULL, 0, 0, 'icon-whatsapp', 0, 0, 0, 10000, now(), 10000, now()); + +set @menuId = @@identity; +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '查看', '', 'sms:platform:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '新增', '', 'sms:platform:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '修改', '', 'sms:platform:update,sms:platform:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '删除', '', 'sms:platform:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); + +INSERT INTO sys_dict_type (dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ('sms_platform', '平台类型', '短信管理', 0, 0, 0, 10000, now(), 10000, now()); + +SET @typeId = @@identity; +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '阿里云', '0', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '腾讯云', '1', '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '七牛云', '2', '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '华为云', '3', '', 3, 0, 0, 10000, now(), 10000, now()); + + +DROP TABLE IF EXISTS sms_platform; +DROP TABLE IF EXISTS sms_log; + +CREATE TABLE sms_platform +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + platform tinyint COMMENT '平台类型 0:阿里云 1:腾讯云 2:七牛云 3:华为云', + sign_name varchar(100) NOT NULL COMMENT '短信签名', + template_id varchar(100) NOT NULL COMMENT '短信模板', + app_id varchar(100) NOT NULL COMMENT '短信应用ID,如:腾讯云等', + sender_id varchar(100) NOT NULL COMMENT '腾讯云国际短信、华为云等需要', + url varchar(200) NOT NULL COMMENT '接入地址,如:华为云', + access_key varchar(100) COMMENT 'AccessKey', + secret_key varchar(100) COMMENT 'SecretKey', + status tinyint COMMENT '状态 0:禁用 1:启用', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='短信平台'; + +CREATE TABLE sms_log +( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + platform_id bigint COMMENT '平台ID', + platform tinyint COMMENT '平台类型', + mobile varchar(20) NOT NULL COMMENT '手机号', + params varchar(200) COMMENT '参数', + status tinyint COMMENT '状态 0:失败 1:成功', + error varchar(2000) COMMENT '异常信息', + create_time datetime COMMENT '创建时间', + primary key (id) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COMMENT ='短信日志'; \ No newline at end of file diff --git a/db/mysql/module/maku-module-quartz.sql b/db/mysql/module/maku-module-quartz.sql new file mode 100644 index 0000000..2c97cff --- /dev/null +++ b/db/mysql/module/maku-module-quartz.sql @@ -0,0 +1,216 @@ +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, '定时任务', 'quartz/schedule/index', NULL, 0, 0, 'icon-reloadtime', 0, 0, 0, 10000, now(), 10000, now()); + +SET @menuId = @@identity; +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '查看', '', 'schedule:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '新增', '', 'schedule:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '修改', '', 'schedule:update,schedule:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '删除', '', 'schedule:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '立即运行', '', 'schedule:run', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @menuId), '日志', '', 'schedule:log', 1, 0, '', 4, 0, 0, 10000, now(), 10000, now()); + +INSERT INTO sys_dict_type (dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ('schedule_group', '任务组名', '定时任务', 0, 0, 0, 10000, now(), 10000, now()); + +SET @typeId = @@identity; +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '默认', 'default', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '系统', 'system', '', 1, 0, 0, 10000, now(), 10000, now()); + +INSERT INTO sys_dict_type (dict_type, dict_name, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ('schedule_status', '状态', '定时任务', 0, 0, 0, 10000, now(), 10000, now()); + +SET @typeId = @@identity; +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '暂停', '0', '', 0, 0, 0, 10000, now(), 10000, now()); +INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, remark, sort, version, deleted, creator, create_time, updater, update_time) VALUES ((SELECT @typeId), '正常', '1', '', 1, 0, 0, 10000, now(), 10000, now()); + + +DROP TABLE IF EXISTS schedule_job; +DROP TABLE IF EXISTS schedule_job_log; + +CREATE TABLE schedule_job ( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + job_name varchar(200) COMMENT '名称', + job_group varchar(100) COMMENT '分组', + bean_name varchar(200) COMMENT 'spring bean名称', + method varchar(100) COMMENT '执行方法', + params varchar(2000) COMMENT '参数', + cron_expression varchar(100) COMMENT 'cron表达式', + status tinyint unsigned COMMENT '状态 0:暂停 1:正常', + concurrent tinyint unsigned COMMENT '是否并发 0:禁止 1:允许', + remark varchar(255) COMMENT '备注', + version int COMMENT '版本号', + deleted tinyint COMMENT '删除标识 0:正常 1:已删除', + creator bigint COMMENT '创建者', + create_time datetime COMMENT '创建时间', + updater bigint COMMENT '更新者', + update_time datetime COMMENT '更新时间', + PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务'; + +CREATE TABLE schedule_job_log ( + id bigint NOT NULL AUTO_INCREMENT COMMENT 'id', + job_id bigint NOT NULL COMMENT '任务id', + job_name varchar(200) COMMENT '任务名称', + job_group varchar(100) COMMENT '任务组名', + bean_name varchar(200) COMMENT 'spring bean名称', + method varchar(100) COMMENT '执行方法', + params varchar(2000) COMMENT '参数', + status tinyint unsigned NOT NULL COMMENT '任务状态 0:失败 1:成功', + error varchar(2000) COMMENT '异常信息', + times bigint NOT NULL COMMENT '耗时(单位:毫秒)', + create_time datetime COMMENT '创建时间', + PRIMARY KEY (id), + key idx_job_id (job_id) +) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务日志'; + + +INSERT INTO schedule_job (id, job_name, job_group, bean_name, method, params, cron_expression, status, concurrent, remark, version, deleted, creator, create_time, updater, update_time) VALUES (1, '测试任务', 'system', 'testTask', 'run', '123', '0 * * * * ? *', 0, 0, '', 14, 0, 10000, now(), 10000, now()); + + + + +-- ---------------------------------------------------------- +-- 以下为Quartz框架,自带的表结构 +-- ---------------------------------------------------------- + +DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; +DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; +DROP TABLE IF EXISTS QRTZ_LOCKS; +DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_TRIGGERS; +DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; +DROP TABLE IF EXISTS QRTZ_CALENDARS; + +create table QRTZ_JOB_DETAILS ( + sched_name varchar(120) not null comment '调度名称', + job_name varchar(200) not null comment '任务名称', + job_group varchar(200) not null comment '任务组名', + description varchar(250) null comment '相关介绍', + job_class_name varchar(250) not null comment '执行任务类名称', + is_durable varchar(1) not null comment '是否持久化', + is_nonconcurrent varchar(1) not null comment '是否并发', + is_update_data varchar(1) not null comment '是否更新数据', + requests_recovery varchar(1) not null comment '是否接受恢复执行', + job_data blob null comment '存放持久化job对象', + primary key (sched_name, job_name, job_group) +) ENGINE=InnoDB COMMENT = '任务详细信息表'; + +create table QRTZ_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment '触发器的名字', + trigger_group varchar(200) not null comment '触发器所属组的名字', + job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键', + job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键', + description varchar(250) null comment '相关介绍', + next_fire_time bigint(13) null comment '上一次触发时间(毫秒)', + prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发)', + priority integer null comment '优先级', + trigger_state varchar(16) not null comment '触发器状态', + trigger_type varchar(8) not null comment '触发器的类型', + start_time bigint(13) not null comment '开始时间', + end_time bigint(13) null comment '结束时间', + calendar_name varchar(200) null comment '日程表名称', + misfire_instr smallint(2) null comment '补偿执行的策略', + job_data blob null comment '存放持久化job对象', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, job_name, job_group) + references QRTZ_JOB_DETAILS(sched_name, job_name, job_group) +) ENGINE=InnoDB COMMENT = '触发器详细信息表'; + +create table QRTZ_SIMPLE_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + repeat_count bigint(7) not null comment '重复的次数统计', + repeat_interval bigint(12) not null comment '重复的间隔时间', + times_triggered bigint(10) not null comment '已经触发的次数', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) + references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) ENGINE=InnoDB COMMENT = '简单触发器的信息表'; + +create table QRTZ_CRON_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + cron_expression varchar(200) not null comment 'cron表达式', + time_zone_id varchar(80) comment '时区', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) + references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) ENGINE=InnoDB COMMENT = 'Cron类型的触发器表'; + +create table QRTZ_BLOB_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + blob_data blob null comment '存放持久化Trigger对象', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) + references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) ENGINE=InnoDB COMMENT = 'Blob类型的触发器表'; + +create table QRTZ_CALENDARS ( + sched_name varchar(120) not null comment '调度名称', + calendar_name varchar(200) not null comment '日历名称', + calendar blob not null comment '存放持久化calendar对象', + primary key (sched_name, calendar_name) +) ENGINE=InnoDB COMMENT = '日历信息表'; + +create table QRTZ_PAUSED_TRIGGER_GRPS ( + sched_name varchar(120) not null comment '调度名称', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + primary key (sched_name, trigger_group) +) ENGINE=InnoDB COMMENT = '暂停的触发器表'; + +create table QRTZ_FIRED_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + entry_id varchar(95) not null comment '调度器实例id', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + instance_name varchar(200) not null comment '调度器实例名', + fired_time bigint(13) not null comment '触发的时间', + sched_time bigint(13) not null comment '定时器制定的时间', + priority integer not null comment '优先级', + state varchar(16) not null comment '状态', + job_name varchar(200) null comment '任务名称', + job_group varchar(200) null comment '任务组名', + is_nonconcurrent varchar(1) null comment '是否并发', + requests_recovery varchar(1) null comment '是否接受恢复执行', + primary key (sched_name, entry_id) +) ENGINE=InnoDB COMMENT = '已触发的触发器表'; + +create table QRTZ_SCHEDULER_STATE ( + sched_name varchar(120) not null comment '调度名称', + instance_name varchar(200) not null comment '实例名称', + last_checkin_time bigint(13) not null comment '上次检查时间', + checkin_interval bigint(13) not null comment '检查间隔时间', + primary key (sched_name, instance_name) +) ENGINE=InnoDB COMMENT = '调度器状态表'; + +create table QRTZ_LOCKS ( + sched_name varchar(120) not null comment '调度名称', + lock_name varchar(40) not null comment '悲观锁名称', + primary key (sched_name, lock_name) +) ENGINE=InnoDB COMMENT = '存储的悲观锁信息表'; + +create table QRTZ_SIMPROP_TRIGGERS ( + sched_name varchar(120) not null comment '调度名称', + trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', + trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', + str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数', + str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数', + str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数', + int_prop_1 int null comment 'int类型的trigger的第一个参数', + int_prop_2 int null comment 'int类型的trigger的第二个参数', + long_prop_1 bigint null comment 'long类型的trigger的第一个参数', + long_prop_2 bigint null comment 'long类型的trigger的第二个参数', + dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数', + dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数', + bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数', + bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数', + primary key (sched_name, trigger_name, trigger_group), + foreign key (sched_name, trigger_name, trigger_group) + references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) +) ENGINE=InnoDB COMMENT = '同步机制的行锁表'; \ No newline at end of file