update 同步 ruoyi

* update element-ui 2.15.10 => 2.15.12
* update 优化 tagsView右选框,首页不应该存在关闭左侧选项
* update copyright 2023
* update 优化 监控页面图标显示
* update 优化 日志注解支持排除指定的请求参数
* update 优化 业务校验优化代码
* fix 修复 优化文件下载出现的异常
* fix 修复 修改密码日志存储明文问题
* add 新增 操作日志消耗时间属性
* update 优化 日志管理使用索引提升查询性能
* update 优化 框架时间检索使用时间默认值 00:00:00 - 23:59:59
This commit is contained in:
疯狂的狮子li
2023-03-07 17:56:59 +08:00
parent 0fdd97203f
commit 856f0767b4
63 changed files with 324 additions and 283 deletions

View File

@ -649,10 +649,14 @@ create table sys_oper_log (
json_result varchar2(2100) default '',
status number(1) default 0,
error_msg varchar2(2100) default '',
oper_time date
oper_time date,
cost_time number(20) default 0
);
alter table sys_oper_log add constraint pk_sys_oper_log primary key (oper_id);
create unique index idx_sys_oper_log_bt on sys_oper_log (business_type);
create unique index idx_sys_oper_log_s on sys_oper_log (status);
create unique index idx_sys_oper_log_ot on sys_oper_log (oper_time);
comment on table sys_oper_log is '操作日志记录';
comment on column sys_oper_log.oper_id is '日志主键';
@ -672,6 +676,7 @@ comment on column sys_oper_log.json_result is '返回参数';
comment on column sys_oper_log.status is '操作状态0正常 1异常';
comment on column sys_oper_log.error_msg is '错误消息';
comment on column sys_oper_log.oper_time is '操作时间';
comment on column sys_oper_log.cost_time is '消耗时间';
-- ----------------------------
@ -843,6 +848,8 @@ create table sys_logininfor (
);
alter table sys_logininfor add constraint pk_sys_logininfor primary key (info_id);
create unique index idx_sys_logininfor_s on sys_logininfor (status);
create unique index idx_sys_logininfor_lt on sys_logininfor (login_time);
comment on table sys_logininfor is '系统访问记录';
comment on column sys_logininfor.info_id is '访问ID';

View File

@ -667,9 +667,14 @@ create table if not exists sys_oper_log
status int4 default 0,
error_msg varchar(2000) default ''::varchar,
oper_time timestamp,
cost_time int8 default 0,
constraint sys_oper_log_pk primary key (oper_id)
);
create unique index idx_sys_oper_log_bt ON sys_oper_log (business_type);
create unique index idx_sys_oper_log_s ON sys_oper_log (status);
create unique index idx_sys_oper_log_ot ON sys_oper_log (oper_time);
comment on table sys_oper_log is '操作日志记录';
comment on column sys_oper_log.oper_id is '日志主键';
comment on column sys_oper_log.tenant_id is '租户编号';
@ -688,6 +693,7 @@ comment on column sys_oper_log.json_result is '返回参数';
comment on column sys_oper_log.status is '操作状态0正常 1异常';
comment on column sys_oper_log.error_msg is '错误消息';
comment on column sys_oper_log.oper_time is '操作时间';
comment on column sys_oper_log.cost_time is '消耗时间';
-- ----------------------------
-- 11、字典类型表
@ -709,7 +715,7 @@ create table if not exists sys_dict_type
constraint sys_dict_type_pk primary key (dict_id)
);
CREATE UNIQUE INDEX sys_dict_type_index1 ON sys_dict_type (tenant_id, dict_type);
create unique index sys_dict_type_index1 ON sys_dict_type (tenant_id, dict_type);
comment on table sys_dict_type is '字典类型表';
comment on column sys_dict_type.dict_id is '字典主键';
@ -865,6 +871,9 @@ create table if not exists sys_logininfor
constraint sys_logininfor_pk primary key (info_id)
);
create unique index idx_sys_logininfor_s ON sys_logininfor (status);
create unique index idx_sys_logininfor_lt ON sys_logininfor (login_time);
comment on table sys_logininfor is '系统访问记录';
comment on column sys_logininfor.info_id is '访问ID';
comment on column sys_logininfor.tenant_id is '租户编号';
@ -940,6 +949,7 @@ create table if not exists gen_table
gen_type char default '0'::bpchar not null,
gen_path varchar(200) default '/'::varchar,
options varchar(1000) default null::varchar,
create_dept int8,
create_by int8,
create_time timestamp,
update_by int8,

View File

@ -514,7 +514,11 @@ create table sys_oper_log (
status int(1) default 0 comment '操作状态0正常 1异常',
error_msg varchar(2000) default '' comment '错误消息',
oper_time datetime comment '操作时间',
primary key (oper_id)
cost_time bigint(20) default 0 comment '消耗时间',
primary key (oper_id),
key idx_sys_oper_log_bt (business_type),
key idx_sys_oper_log_s (status),
key idx_sys_oper_log_ot (oper_time)
) engine=innodb comment = '操作日志记录';
@ -643,7 +647,9 @@ create table sys_logininfor (
status char(1) default '0' comment '登录状态0成功 1失败',
msg varchar(255) default '' comment '提示消息',
login_time datetime comment '访问时间',
primary key (info_id)
primary key (info_id),
key idx_sys_logininfor_s (status),
key idx_sys_logininfor_lt (login_time)
) engine=innodb comment = '系统访问记录';

View File

@ -1165,6 +1165,11 @@ CREATE TABLE sys_logininfor
ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX idx_sys_logininfor_s ON sys_logininfor (status)
GO
CREATE NONCLUSTERED INDEX idx_sys_logininfor_lt ON sys_logininfor (login_time)
GO
EXEC sys.sp_addextendedproperty
'MS_Description', N'访问ID' ,
'SCHEMA', N'dbo',
@ -1704,6 +1709,7 @@ CREATE TABLE sys_oper_log
status int DEFAULT ((0)) NULL,
error_msg nvarchar(2000) DEFAULT '' NULL,
oper_time datetime2(7) NULL,
cost_time bigint DEFAULT ((0)) NULL,
CONSTRAINT PK__sys_oper__34723BF9BD954573 PRIMARY KEY CLUSTERED (oper_id)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
@ -1711,6 +1717,13 @@ CREATE TABLE sys_oper_log
ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX idx_sys_oper_log_bt ON sys_oper_log (business_type)
GO
CREATE NONCLUSTERED INDEX idx_sys_oper_log_s ON sys_oper_log (status)
GO
CREATE NONCLUSTERED INDEX idx_sys_oper_log_ot ON sys_oper_log (oper_time)
GO
EXEC sys.sp_addextendedproperty
'MS_Description', N'日志主键' ,
'SCHEMA', N'dbo',
@ -1813,6 +1826,12 @@ EXEC sys.sp_addextendedproperty
'TABLE', N'sys_oper_log',
'COLUMN', N'oper_time'
GO
EXEC sys.sp_addextendedproperty
'MS_Description', N'消耗时间' ,
'SCHEMA', N'dbo',
'TABLE', N'sys_oper_log',
'COLUMN', N'cost_time'
GO
EXEC sys.sp_addextendedproperty
'MS_Description', N'操作日志记录' ,
'SCHEMA', N'dbo',
@ -1827,10 +1846,10 @@ CREATE TABLE sys_post
post_name nvarchar(50) NOT NULL,
post_sort int NOT NULL,
status nchar(1) NOT NULL,
create_dept bigint NOT NULL,
create_by bigint NOT NULL,
create_dept bigint NULL,
create_by bigint NULL,
create_time datetime2(7) NULL,
update_by bigint NOT NULL,
update_by bigint NULL,
update_time datetime2(7) NULL,
remark nvarchar(500) NULL,
CONSTRAINT PK__sys_post__3ED7876668E2D081 PRIMARY KEY CLUSTERED (post_id)
@ -1840,6 +1859,9 @@ CREATE TABLE sys_post
ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX sys_dict_type_index1 ON sys_dict_type (tenant_id, dict_type)
GO
EXEC sys.sp_addextendedproperty
'MS_Description', N'岗位ID' ,
'SCHEMA', N'dbo',