From db8f960b0dcc4f98e2fad2a7702eac06cc3c1e47 Mon Sep 17 00:00:00 2001 From: wangchl Date: Mon, 6 Aug 2018 11:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mybatis/monitor/LogininforMapper.xml | 2 +- src/main/resources/mybatis/monitor/OnlineMapper.xml | 12 ++++++++---- src/main/resources/mybatis/monitor/OperLogMapper.xml | 12 +++++++++--- src/main/resources/mybatis/system/DeptMapper.xml | 4 ++-- src/main/resources/mybatis/system/DictDataMapper.xml | 2 +- src/main/resources/mybatis/system/MenuMapper.xml | 2 +- src/main/resources/mybatis/system/RoleMenuMapper.xml | 2 +- src/main/resources/mybatis/system/UserMapper.xml | 2 +- src/main/resources/mybatis/system/UserPostMapper.xml | 2 +- src/main/resources/mybatis/system/UserRoleMapper.xml | 2 +- 10 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/main/resources/mybatis/monitor/LogininforMapper.xml b/src/main/resources/mybatis/monitor/LogininforMapper.xml index 17a9dc540..4ccf013f3 100644 --- a/src/main/resources/mybatis/monitor/LogininforMapper.xml +++ b/src/main/resources/mybatis/monitor/LogininforMapper.xml @@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select * + + select sessionId,login_name,dept_name,ipaddr,login_location,browser,os,status,status,start_timestsamp,last_access_time,expire_time from sys_user_online + + + @@ -42,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/src/main/resources/mybatis/monitor/OperLogMapper.xml b/src/main/resources/mybatis/monitor/OperLogMapper.xml index 24ffc2813..a4639894d 100644 --- a/src/main/resources/mybatis/monitor/OperLogMapper.xml +++ b/src/main/resources/mybatis/monitor/OperLogMapper.xml @@ -21,13 +21,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + select + oper_id, title, action, method, channel, oper_name, dept_name, oper_url, oper_ip,oper_location,oper_param,status,error_msg,oper_time + from + sys_oper_log + + insert into sys_oper_log(title, action, method, channel, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time) values (#{title}, #{action}, #{method}, #{channel}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{status}, #{errorMsg}, sysdate()) - select * - from sys_oper_log + where oper_id = #{operId} diff --git a/src/main/resources/mybatis/system/DeptMapper.xml b/src/main/resources/mybatis/system/DeptMapper.xml index 1209aaef2..c9a90e47b 100644 --- a/src/main/resources/mybatis/system/DeptMapper.xml +++ b/src/main/resources/mybatis/system/DeptMapper.xml @@ -41,11 +41,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/src/main/resources/mybatis/system/MenuMapper.xml b/src/main/resources/mybatis/system/MenuMapper.xml index 95b1cfa1f..05af46d28 100644 --- a/src/main/resources/mybatis/system/MenuMapper.xml +++ b/src/main/resources/mybatis/system/MenuMapper.xml @@ -80,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select count(*) from sys_role_menu where menu_id=#{menuId} + select count(1) from sys_role_menu where menu_id=#{menuId} diff --git a/src/main/resources/mybatis/system/UserMapper.xml b/src/main/resources/mybatis/system/UserMapper.xml index cff58670f..67295c259 100644 --- a/src/main/resources/mybatis/system/UserMapper.xml +++ b/src/main/resources/mybatis/system/UserMapper.xml @@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select count(*) from sys_user_post where post_id=#{postId} + select count(1) from sys_user_post where post_id=#{postId} diff --git a/src/main/resources/mybatis/system/UserRoleMapper.xml b/src/main/resources/mybatis/system/UserRoleMapper.xml index 88f961e6c..98ea17306 100644 --- a/src/main/resources/mybatis/system/UserRoleMapper.xml +++ b/src/main/resources/mybatis/system/UserRoleMapper.xml @@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"