update 优化 日志管理使用索引提升查询性能

update 优化 框架时间检索使用时间默认值 00:00:00 - 23:59:59
This commit is contained in:
疯狂的狮子Li
2023-03-07 23:48:52 +08:00
parent 2868a94cbc
commit 95fc67e577
16 changed files with 937 additions and 905 deletions

View File

@@ -433,7 +433,10 @@ 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)
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 = '操作日志记录';
@@ -550,7 +553,9 @@ create table sys_logininfor (
status char(1) default '0' comment '登录状态0成功 1失败',
msg varchar(255) default '' comment '提示信息',
access_time datetime comment '访问时间',
primary key (info_id)
primary key (info_id),
key idx_sys_logininfor_s (status),
key idx_sys_logininfor_lt (access_time)
) engine=innodb comment = '系统访问记录';
-- ----------------------------