From d2cbc715156a231d449108746b36ede97306d9ab Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 13 十二月 2024 20:41:43 +0800 Subject: [PATCH] 1 --- docker-compose/mysql/initdb/se_cloud_20241119.sql | 99 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 87 insertions(+), 12 deletions(-) diff --git a/docker-compose/mysql/initdb/se_cloud_20241119.sql b/docker-compose/mysql/initdb/se_cloud_20241119.sql index 255db4b..6c2cfa9 100644 --- a/docker-compose/mysql/initdb/se_cloud_20241119.sql +++ b/docker-compose/mysql/initdb/se_cloud_20241119.sql @@ -14,7 +14,7 @@ create table sys_soft ( soft_id bigint(20) not null auto_increment comment '杞欢ID', name varchar(200) not null comment '鍚嶇О', - type char(1) default '0' comment '绫诲瀷锛�0-搴旂敤杞欢锛�1-鏁版嵁搴擄紝2-涓棿浠讹紝3-鎿嶄綔绯荤粺锛�', + type char(1) default '0' comment '绫诲瀷锛�0-搴旂敤杞欢锛�1-鏁版嵁搴擄紝2-涓棿浠讹紝3-鎿嶄綔绯荤粺锛�4-Docker瀹瑰櫒锛�', lic varchar(500) comment '璁稿彲', descr varchar(500) comment '鎻忚堪', args varchar(8000) comment '鍙傛暟', @@ -28,7 +28,36 @@ ) engine=innodb auto_increment=1 comment = '杞欢琛�'; select * from sys_soft order by soft_id; +insert into sys_soft (name, type, args) values ('se-mysql', 4, 'se-mysql'); +insert into sys_soft (name, type, args) values ('se-redis', 4, 'se-redis'); +insert into sys_soft (name, type, args) values ('se-system', 4, 'se-system'); +insert into sys_soft (name, type, args) values ('se-wgcloud', 4, 'se-wgcloud'); + +-- 鑿滃崟 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('杞欢', '1', '8', 'soft', 'system/soft/index', 1, 0, 'C', '0', '0', 'system:soft:list', '#', 'admin', sysdate(), '', null, '杞欢鑿滃崟'); + +-- 鎸夐挳鐖惰彍鍗旾D +SELECT @parentId := LAST_INSERT_ID(); + +-- 鎸夐挳 SQL +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('杞欢鏌ヨ', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:soft:query', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('杞欢鏂板', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:soft:add', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('杞欢淇敼', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:soft:edit', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('杞欢鍒犻櫎', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:soft:remove', '#', 'admin', sysdate(), '', null, ''); + +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) +values('杞欢瀵煎嚭', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:soft:export', '#', 'admin', sysdate(), '', null, ''); + +update sys_menu set mark = 'sys' where menu_id >= @parentId; -- ---------------------------- -- 02銆佺‖浠惰〃 -- ---------------------------- @@ -141,11 +170,11 @@ -- ---------------------------- --- 07銆佸憡璀﹁〃 +-- 07銆佹帶鍒惰〃 -- ---------------------------- -drop table if exists sys_warn; -create table sys_warn ( - warn_id bigint(20) not null auto_increment comment '鍛婅ID', +drop table if exists sys_ctrl; +create table sys_ctrl ( + ctrl_id bigint(20) not null auto_increment comment '鎺у埗ID', name varchar(200) not null comment '鍚嶇О', type char(1) default '0' comment '绫诲瀷', descr varchar(500) comment '鎻忚堪', @@ -157,18 +186,64 @@ update_by varchar(64) default '' comment '鏇存柊鑰�', update_time datetime comment '鏇存柊鏃堕棿', remark varchar(500) default '' comment '澶囨敞', - primary key (warn_id) -) engine=innodb auto_increment=1 comment = '鍛婅琛�'; -select * from sys_warn order by warn_id; + primary key (ctrl_id) +) engine=innodb auto_increment=1 comment = '鎺у埗琛�'; +select * from sys_ctrl order by ctrl_id; +-- ---------------------------- +-- 08銆佹帶鍒舵棩蹇楄〃 +-- ---------------------------- +drop table if exists sys_ctrl_log; +create table sys_ctrl_log ( + log_id bigint(20) not null auto_increment comment '鏃ュ織ID', + tab_id bigint(20) comment '琛↖D', + title varchar(200) not null comment '鏍囬', + type char(1) comment '绫诲瀷锛坣-姝e父锛宔-閿欒锛�', + ip varchar(50) comment 'IP', + url varchar(4000) comment 'URL', + method varchar(50) comment '鏂规硶', + args varchar(4000) comment '鍙傛暟', + msg varchar(4000) comment '娑堟伅', + oper varchar(100) comment '鎿嶄綔鍛�', + time datetime default now() comment '鎿嶄綔鏃堕棿', + remark varchar(500) comment '澶囨敞', + primary key (log_id) +) engine=innodb auto_increment=1 comment = '鎺у埗鏃ュ織琛�'; +select * from sys_ctrl_log order by log_id; +-- ---------------------------- +-- 09銆佽鑹叉帶鍒惰〃 +-- ---------------------------- +drop table if exists sys_role_ctrl; +create table sys_role_ctrl ( + role_id bigint(20) not null comment '瑙掕壊ID', + ctrl_id bigint(20) not null comment '鎺у埗ID', + primary key(role_id, ctrl_id) +) engine=innodb comment = '瑙掕壊鎺у埗琛�'; +select * from sys_role_ctrl; +-- ---------------------------- +-- 10銆佽鑹叉帴鍙h〃 +-- ---------------------------- +drop table if exists sys_role_inte; +create table sys_role_inte ( + role_id bigint(20) not null comment '瑙掕壊ID', + inte_id bigint(20) not null comment '鎺ュ彛ID', + primary key(role_id, inte_id) +) engine=innodb comment = '瑙掕壊鎺ュ彛琛�'; +select * from sys_role_inte; - - - - +-- ---------------------------- +-- 11銆佽鑹茶祫婧愯〃 +-- ---------------------------- +drop table if exists sys_role_res; +create table sys_role_res ( + role_id bigint(20) not null comment '瑙掕壊ID', + res_id bigint(20) not null comment '璧勬簮ID', + primary key(role_id, res_id) +) engine=innodb comment = '瑙掕壊璧勬簮琛�'; +select * from sys_role_res; -- Gitblit v1.9.3