mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-04-11 04:53:15 +08:00
update 优化 操作日志 补齐一些必要的记录数据
This commit is contained in:
@@ -664,7 +664,13 @@ create table sys_oper_log (
|
||||
request_method varchar2(10) default '',
|
||||
operator_type number(1) default 0,
|
||||
oper_name varchar2(50) default '',
|
||||
user_id number(20) default null,
|
||||
dept_id number(20) default null,
|
||||
dept_name varchar2(50) default '',
|
||||
client_key varchar2(32) default '',
|
||||
device_type varchar2(32) default '',
|
||||
browser varchar2(50) default '',
|
||||
os varchar2(50) default '',
|
||||
oper_url varchar2(255) default '',
|
||||
oper_ip varchar2(128) default '',
|
||||
oper_location varchar2(255) default '',
|
||||
@@ -678,6 +684,7 @@ create table sys_oper_log (
|
||||
|
||||
alter table sys_oper_log add constraint pk_sys_oper_log primary key (oper_id);
|
||||
create index idx_sys_oper_log_bt on sys_oper_log (business_type);
|
||||
create index idx_sys_oper_log_uid on sys_oper_log (user_id);
|
||||
create index idx_sys_oper_log_s on sys_oper_log (status);
|
||||
create index idx_sys_oper_log_ot on sys_oper_log (oper_time);
|
||||
|
||||
@@ -689,7 +696,13 @@ comment on column sys_oper_log.method is '方法名称';
|
||||
comment on column sys_oper_log.request_method is '请求方式';
|
||||
comment on column sys_oper_log.operator_type is '操作类别(0其它 1后台用户 2手机端用户)';
|
||||
comment on column sys_oper_log.oper_name is '操作人员';
|
||||
comment on column sys_oper_log.user_id is '操作用户ID';
|
||||
comment on column sys_oper_log.dept_id is '操作部门ID';
|
||||
comment on column sys_oper_log.dept_name is '部门名称';
|
||||
comment on column sys_oper_log.client_key is '客户端';
|
||||
comment on column sys_oper_log.device_type is '设备类型';
|
||||
comment on column sys_oper_log.browser is '浏览器类型';
|
||||
comment on column sys_oper_log.os is '操作系统';
|
||||
comment on column sys_oper_log.oper_url is '请求URL';
|
||||
comment on column sys_oper_log.oper_ip is '主机地址';
|
||||
comment on column sys_oper_log.oper_location is '操作地点';
|
||||
|
||||
@@ -662,7 +662,13 @@ create table if not exists sys_oper_log
|
||||
request_method varchar(10) default ''::varchar,
|
||||
operator_type int4 default 0,
|
||||
oper_name varchar(50) default ''::varchar,
|
||||
user_id int8,
|
||||
dept_id int8,
|
||||
dept_name varchar(50) default ''::varchar,
|
||||
client_key varchar(32) default ''::varchar,
|
||||
device_type varchar(32) default ''::varchar,
|
||||
browser varchar(50) default ''::varchar,
|
||||
os varchar(50) default ''::varchar,
|
||||
oper_url varchar(255) default ''::varchar,
|
||||
oper_ip varchar(128) default ''::varchar,
|
||||
oper_location varchar(255) default ''::varchar,
|
||||
@@ -676,6 +682,7 @@ create table if not exists sys_oper_log
|
||||
);
|
||||
|
||||
create index idx_sys_oper_log_bt ON sys_oper_log (business_type);
|
||||
create index idx_sys_oper_log_uid ON sys_oper_log (user_id);
|
||||
create index idx_sys_oper_log_s ON sys_oper_log (status);
|
||||
create index idx_sys_oper_log_ot ON sys_oper_log (oper_time);
|
||||
|
||||
@@ -687,7 +694,13 @@ comment on column sys_oper_log.method is '方法名称';
|
||||
comment on column sys_oper_log.request_method is '请求方式';
|
||||
comment on column sys_oper_log.operator_type is '操作类别(0其它 1后台用户 2手机端用户)';
|
||||
comment on column sys_oper_log.oper_name is '操作人员';
|
||||
comment on column sys_oper_log.user_id is '操作用户ID';
|
||||
comment on column sys_oper_log.dept_id is '操作部门ID';
|
||||
comment on column sys_oper_log.dept_name is '部门名称';
|
||||
comment on column sys_oper_log.client_key is '客户端';
|
||||
comment on column sys_oper_log.device_type is '设备类型';
|
||||
comment on column sys_oper_log.browser is '浏览器类型';
|
||||
comment on column sys_oper_log.os is '操作系统';
|
||||
comment on column sys_oper_log.oper_url is '请求URL';
|
||||
comment on column sys_oper_log.oper_ip is '主机地址';
|
||||
comment on column sys_oper_log.oper_location is '操作地点';
|
||||
|
||||
@@ -514,7 +514,13 @@ create table sys_oper_log (
|
||||
request_method varchar(10) default '' comment '请求方式',
|
||||
operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)',
|
||||
oper_name varchar(50) default '' comment '操作人员',
|
||||
user_id bigint(20) default null comment '操作用户ID',
|
||||
dept_id bigint(20) default null comment '操作部门ID',
|
||||
dept_name varchar(50) default '' comment '部门名称',
|
||||
client_key varchar(32) default '' comment '客户端',
|
||||
device_type varchar(32) default '' comment '设备类型',
|
||||
browser varchar(50) default '' comment '浏览器类型',
|
||||
os varchar(50) default '' comment '操作系统',
|
||||
oper_url varchar(255) default '' comment '请求URL',
|
||||
oper_ip varchar(128) default '' comment '主机地址',
|
||||
oper_location varchar(255) default '' comment '操作地点',
|
||||
@@ -526,6 +532,7 @@ create table sys_oper_log (
|
||||
cost_time bigint(20) default 0 comment '消耗时间',
|
||||
primary key (oper_id),
|
||||
key idx_sys_oper_log_bt (business_type),
|
||||
key idx_sys_oper_log_uid (user_id),
|
||||
key idx_sys_oper_log_s (status),
|
||||
key idx_sys_oper_log_ot (oper_time)
|
||||
) engine=innodb comment = '操作日志记录';
|
||||
|
||||
@@ -1821,7 +1821,13 @@ CREATE TABLE sys_oper_log
|
||||
request_method nvarchar(10) DEFAULT '' NULL,
|
||||
operator_type int DEFAULT ((0)) NULL,
|
||||
oper_name nvarchar(50) DEFAULT '' NULL,
|
||||
user_id bigint NULL,
|
||||
dept_id bigint NULL,
|
||||
dept_name nvarchar(50) DEFAULT '' NULL,
|
||||
client_key nvarchar(32) DEFAULT '' NULL,
|
||||
device_type nvarchar(32) DEFAULT '' NULL,
|
||||
browser nvarchar(50) DEFAULT '' NULL,
|
||||
os nvarchar(50) DEFAULT '' NULL,
|
||||
oper_url nvarchar(255) DEFAULT '' NULL,
|
||||
oper_ip nvarchar(128) DEFAULT '' NULL,
|
||||
oper_location nvarchar(255) DEFAULT '' NULL,
|
||||
@@ -1840,6 +1846,8 @@ GO
|
||||
|
||||
CREATE NONCLUSTERED INDEX idx_sys_oper_log_bt ON sys_oper_log (business_type)
|
||||
GO
|
||||
CREATE NONCLUSTERED INDEX idx_sys_oper_log_uid ON sys_oper_log (user_id)
|
||||
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)
|
||||
@@ -1887,12 +1895,48 @@ EXEC sys.sp_addextendedproperty
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'oper_name'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'操作用户ID' ,
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'user_id'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'操作部门ID' ,
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'dept_id'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'部门名称' ,
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'dept_name'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'客户端' ,
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'client_key'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'设备类型' ,
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'device_type'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'浏览器类型' ,
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'browser'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'操作系统' ,
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_oper_log',
|
||||
'COLUMN', N'os'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty
|
||||
'MS_Description', N'请求URL' ,
|
||||
'SCHEMA', N'dbo',
|
||||
|
||||
Reference in New Issue
Block a user