Add tool api
This commit is contained in:
@@ -74,12 +74,20 @@ insert into t_s_power (id, type_id)
|
||||
(1530303, 4),
|
||||
(1540101, 4),
|
||||
(1540102, 4),
|
||||
(1540103, 4),
|
||||
(1540104, 4),
|
||||
(1540201, 4),
|
||||
(1540202, 4),
|
||||
(1540203, 4),
|
||||
(1540204, 4),
|
||||
(1540301, 4),
|
||||
(1540302, 4),
|
||||
(1540303, 4),
|
||||
(1540304, 4),
|
||||
(1540401, 4),
|
||||
(1540402, 4) as new_value
|
||||
(1540402, 4),
|
||||
(1540403, 4),
|
||||
(1540404, 4) as new_value
|
||||
on duplicate key update type_id = new_value.type_id;
|
||||
|
||||
insert into t_s_module (id, name)
|
||||
@@ -87,15 +95,15 @@ insert into t_s_module (id, name)
|
||||
on duplicate key update name = new_value.name;
|
||||
|
||||
insert into t_s_menu (id, name, url, parent_id, module_id)
|
||||
values (1990000, '系统管理', '/system', null, 1000000),
|
||||
(1010000, '用户管理', '/system/user', 1990000, 1000000),
|
||||
(1020000, '角色管理', '/system/role', 1990000, 1000000),
|
||||
(1030000, '用户组管理', '/system/group', 1990000, 1000000),
|
||||
(1040000, '权限管理', '/system/power', 1990000, 1000000),
|
||||
(1510000, '系统概况', '/system/statistics', 1990000, 1000000),
|
||||
(1520000, '日志管理', '/system/log', 1990000, 1000000),
|
||||
(1530000, '系统设置', '/system/settings', 1990000, 1000000),
|
||||
(1540000, '工具配置', '/system/tools', 1990000, 1000000) as new_value
|
||||
values (1990000, '系统管理', '^/system$', null, 1000000),
|
||||
(1010000, '用户管理', '^/system/user$', 1990000, 1000000),
|
||||
(1020000, '角色管理', '^/system/role$', 1990000, 1000000),
|
||||
(1030000, '用户组管理', '^/system/group$', 1990000, 1000000),
|
||||
(1040000, '权限管理', '^/system/power$', 1990000, 1000000),
|
||||
(1510000, '系统概况', '^/system/statistics$', 1990000, 1000000),
|
||||
(1520000, '日志管理', '^/system/log$', 1990000, 1000000),
|
||||
(1530000, '系统设置', '^/system/settings$', 1990000, 1000000),
|
||||
(1540000, '工具配置', '^/system/tools(/.*)?$', 1990000, 1000000) as new_value
|
||||
on duplicate key update name =new_value.name,
|
||||
url =new_value.url,
|
||||
parent_id =new_value.parent_id;
|
||||
@@ -162,14 +170,22 @@ insert into t_s_operation(id, name, code, func_id)
|
||||
(1530301, '基础', 'system:settings:modify:base', 1530300),
|
||||
(1530302, '邮件', 'system:settings:modify:mail', 1530300),
|
||||
(1530303, '敏感词', 'system:settings:modify:sensitive', 1530300),
|
||||
(1540101, '基板', 'system:tools:query:base', 1540100),
|
||||
(1540102, '模板', 'system:tools:query:template', 1540100),
|
||||
(1540201, '基板', 'system:tools:add:base', 1540200),
|
||||
(1540202, '模板', 'system:tools:add:template', 1540200),
|
||||
(1540301, '基板', 'system:tools:modify:base', 1540300),
|
||||
(1540302, '模板', 'system:tools:modify:template', 1540300),
|
||||
(1540401, '基板', 'system:tools:delete:base', 1540400),
|
||||
(1540402, '模板', 'system:tools:delete:template', 1540400) as new_value
|
||||
(1540101, '类别', 'system:tool:query:category', 1540100),
|
||||
(1540102, '基板', 'system:tool:query:base', 1540100),
|
||||
(1540103, '模板', 'system:tool:query:template', 1540100),
|
||||
(1540104, '工具', 'system:tool:query:tool', 1540100),
|
||||
(1540201, '类别', 'system:tool:add:category', 1540200),
|
||||
(1540202, '基板', 'system:tool:add:base', 1540200),
|
||||
(1540203, '模板', 'system:tool:add:template', 1540200),
|
||||
(1540204, '工具', 'system:tool:add:tool', 1540200),
|
||||
(1540301, '类别', 'system:tool:modify:category', 1540300),
|
||||
(1540302, '基板', 'system:tool:modify:base', 1540300),
|
||||
(1540303, '模板', 'system:tool:modify:template', 1540300),
|
||||
(1540304, '工具', 'system:tool:modify:tool', 1540300),
|
||||
(1540401, '类别', 'system:tool:delete:category', 1540400),
|
||||
(1540402, '基板', 'system:tool:delete:base', 1540400),
|
||||
(1540403, '模板', 'system:tool:delete:template', 1540400),
|
||||
(1540404, '工具', 'system:tool:delete:tool', 1540400) as new_value
|
||||
on duplicate key update name=new_value.name,
|
||||
code=new_value.code,
|
||||
func_id=new_value.func_id;
|
||||
@@ -6,18 +6,18 @@ create table if not exists t_b_tool_main
|
||||
name varchar(50) not null comment '工具名',
|
||||
tool_id varchar(50) not null comment '工具 ID',
|
||||
description varchar(500) null comment '简介',
|
||||
base bigint not null comment '基于',
|
||||
author bigint not null comment '作者',
|
||||
base_id bigint not null comment '基板 ID',
|
||||
author_id bigint not null comment '作者 ID',
|
||||
ver varchar(20) not null comment '版本',
|
||||
privately int not null default 0 comment '私有',
|
||||
keyword varchar(500) not null comment '关键字',
|
||||
source bigint null comment '源码',
|
||||
dist bigint null comment '产物',
|
||||
keywords varchar(500) not null comment '关键字',
|
||||
source_id bigint not null comment '源码 ID',
|
||||
dist_id bigint not null comment '产物 ID',
|
||||
publish int not null default 0 comment '发布',
|
||||
review varchar(10) not null default 'NONE' comment '审核',
|
||||
create_time datetime not null default (utc_timestamp()) comment '创建时间',
|
||||
update_time datetime not null default (utc_timestamp()) comment '修改时间',
|
||||
deleted bigint not null default 0,
|
||||
version int not null default 0,
|
||||
constraint t_b_tool_main_unique_tool_id unique (tool_id, author, deleted)
|
||||
constraint t_b_tool_main_unique_tool_id unique (tool_id, author_id, deleted)
|
||||
) comment '工具-主表';
|
||||
@@ -2,11 +2,9 @@ drop table if exists t_r_tool_main_category;
|
||||
|
||||
create table if not exists t_r_tool_main_category
|
||||
(
|
||||
id bigint not null primary key,
|
||||
tool_id bigint not null comment '工具',
|
||||
category_id bigint not null comment '类别',
|
||||
create_time datetime not null default (utc_timestamp()) comment '创建时间',
|
||||
update_time datetime not null default (utc_timestamp()) comment '修改时间',
|
||||
deleted bigint not null default 0,
|
||||
version int not null default 0
|
||||
id bigint not null primary key,
|
||||
tool_id bigint not null comment '工具',
|
||||
category_id bigint not null comment '类别',
|
||||
deleted bigint not null default 0,
|
||||
version int not null default 0
|
||||
) comment '中间表-工具-主表-类别';
|
||||
@@ -5,9 +5,9 @@ create table if not exists t_b_tool_template
|
||||
id bigint not null primary key,
|
||||
name varchar(40) not null comment '模板名',
|
||||
ver varchar(20) not null comment '版本',
|
||||
base varchar(20) not null comment '基于',
|
||||
source bigint not null comment '源码',
|
||||
dist bigint not null comment '产物',
|
||||
base_id bigint not null comment '基板 ID',
|
||||
source_id bigint not null comment '源码 ID',
|
||||
dist_id bigint not null comment '产物 ID',
|
||||
create_time datetime not null default (utc_timestamp()) comment '创建时间',
|
||||
update_time datetime not null default (utc_timestamp()) comment '修改时间',
|
||||
deleted bigint not null default 0,
|
||||
|
||||
@@ -4,8 +4,8 @@ create table if not exists t_b_tool_base
|
||||
(
|
||||
id bigint not null primary key,
|
||||
name varchar(20) not null comment '基板名',
|
||||
source bigint not null comment '源码',
|
||||
dist bigint not null comment '产物',
|
||||
source_id bigint not null comment '源码 ID',
|
||||
dist_id bigint not null comment '产物 ID',
|
||||
create_time datetime not null default (utc_timestamp()) comment '创建时间',
|
||||
update_time datetime not null default (utc_timestamp()) comment '修改时间',
|
||||
deleted bigint not null default 0,
|
||||
|
||||
Reference in New Issue
Block a user