瀏覽代碼

修正操作日志新增后没有创建人创建时间

xusl 2 年之前
父節點
當前提交
052ce8e66b

+ 1 - 0
backend/src/main/java/com/jiayue/ssi/aspectj/OperateLogAspect.java

@@ -114,6 +114,7 @@ public class OperateLogAspect {
             getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
             getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
             // 设置消耗时间
             // 设置消耗时间
             operLog.setCostTime(System.currentTimeMillis() - TIME_THREADLOCAL.get());
             operLog.setCostTime(System.currentTimeMillis() - TIME_THREADLOCAL.get());
+            operLog.setCreateBy(sysUser.getUsername());
             // 保存数据库
             // 保存数据库
             OperateLogFactory.recordOper(operLog);
             OperateLogFactory.recordOper(operLog);
         } catch (Exception exp) {
         } catch (Exception exp) {

+ 2 - 2
backend/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -36,8 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
     </sql>
 
 
 	<insert id="insertOperlog" parameterType="SysOperLog">
 	<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, cost_time, oper_time)
-        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, 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,create_by,create_time,del_flag)
+        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate(),#{createBy},sysdate(),0)
 	</insert>
 	</insert>
 
 
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">