From ee2ecbc0b4fe1900f0c2f71f34fc5dfe8b910d74 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期四, 16 二月 2023 10:22:46 +0800 Subject: [PATCH] 操作日志新增消耗时间属性 --- src/main/resources/mybatis/monitor/SysOperLogMapper.xml | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/resources/mybatis/monitor/SysOperLogMapper.xml b/src/main/resources/mybatis/monitor/SysOperLogMapper.xml index cc536fe..bad0d33 100644 --- a/src/main/resources/mybatis/monitor/SysOperLogMapper.xml +++ b/src/main/resources/mybatis/monitor/SysOperLogMapper.xml @@ -21,16 +21,17 @@ <result property="status" column="status" /> <result property="errorMsg" column="error_msg" /> <result property="operTime" column="oper_time" /> + <result property="costTime" column="cost_time" /> </resultMap> <sql id="selectOperLogVo"> - select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time + select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time from sys_oper_log </sql> <insert id="insertOperlog" parameterType="SysOperLog"> - insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time) - values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate()) + insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time) + values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate()) </insert> <select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult"> @@ -39,7 +40,7 @@ <if test="title != null and title != ''"> AND title like concat('%', #{title}, '%') </if> - <if test="businessType != null and businessType != ''"> + <if test="businessType != null"> AND business_type = #{businessType} </if> <if test="businessTypes != null and businessTypes.length > 0"> -- Gitblit v1.9.3