diff --git a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml index 26d51fa..acfc11a 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml @@ -34,10 +34,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND user_name like concat('%', #{userName}, '%') - and date_format(login_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + AND login_time >= #{params.beginTime} - and date_format(login_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + AND login_time <= #{params.endTime} order by info_id desc diff --git a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml index 647a3f7..75593c2 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml @@ -56,10 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND oper_name like concat('%', #{operName}, '%') - and date_format(oper_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + AND oper_time >= #{params.beginTime} - and date_format(oper_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + AND oper_time <= #{params.endTime} order by oper_id desc diff --git a/ruoyi-ui/src/views/monitor/logininfor/index.vue b/ruoyi-ui/src/views/monitor/logininfor/index.vue index 8e3dc03..d6af834 100644 --- a/ruoyi-ui/src/views/monitor/logininfor/index.vue +++ b/ruoyi-ui/src/views/monitor/logininfor/index.vue @@ -38,11 +38,12 @@ diff --git a/ruoyi-ui/src/views/monitor/operlog/index.vue b/ruoyi-ui/src/views/monitor/operlog/index.vue index 23f1d70..34a3ce3 100644 --- a/ruoyi-ui/src/views/monitor/operlog/index.vue +++ b/ruoyi-ui/src/views/monitor/operlog/index.vue @@ -53,11 +53,12 @@ diff --git a/sql/ry_20230221.sql b/sql/ry_20230223.sql similarity index 98% rename from sql/ry_20230221.sql rename to sql/ry_20230223.sql index 123fab2..45c2ebb 100644 --- a/sql/ry_20230221.sql +++ b/sql/ry_20230223.sql @@ -433,7 +433,10 @@ create table sys_oper_log ( error_msg varchar(2000) default '' comment '错误消息', oper_time datetime comment '操作时间', cost_time bigint(20) default 0 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 auto_increment=100 comment = '操作日志记录'; @@ -562,7 +565,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 auto_increment=100 comment = '系统访问记录';