|
@@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
12
|
12
|
<result property="requestMethod" column="request_method" />
|
13
|
13
|
<result property="operatorType" column="operator_type" />
|
14
|
14
|
<result property="operName" column="oper_name" />
|
|
15
|
+ <result property="nickName" column="nick_name" />
|
15
|
16
|
<result property="deptName" column="dept_name" />
|
16
|
17
|
<result property="operUrl" column="oper_url" />
|
17
|
18
|
<result property="operIp" column="oper_ip" />
|
|
@@ -25,8 +26,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
25
|
26
|
</resultMap>
|
26
|
27
|
|
27
|
28
|
<sql id="selectOperLogVo">
|
28
|
|
- 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
|
29
|
|
- from sys_oper_log
|
|
29
|
+ select o.oper_id, o.title, o.business_type, o.method, o.request_method, o.operator_type, o.oper_name, o.dept_name, o.oper_url, o.oper_ip, o.oper_location, o.oper_param, o.json_result, o.status, o.error_msg, o.oper_time, o.cost_time, u.nick_name
|
|
30
|
+ from sys_oper_log as o
|
|
31
|
+ left join sys_user as u on u.user_name = o.oper_name
|
30
|
32
|
</sql>
|
31
|
33
|
|
32
|
34
|
<insert id="insertOperlog" parameterType="SysOperLog">
|
|
@@ -38,34 +40,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
38
|
40
|
<include refid="selectOperLogVo"/>
|
39
|
41
|
<where>
|
40
|
42
|
<if test="operIp != null and operIp != ''">
|
41
|
|
- AND oper_ip like concat('%', #{operIp}, '%')
|
|
43
|
+ AND o.oper_ip like concat('%', #{operIp}, '%')
|
42
|
44
|
</if>
|
43
|
45
|
<if test="title != null and title != ''">
|
44
|
|
- AND title like concat('%', #{title}, '%')
|
|
46
|
+ AND o.title like concat('%', #{title}, '%')
|
45
|
47
|
</if>
|
46
|
48
|
<if test="businessType != null">
|
47
|
|
- AND business_type = #{businessType}
|
|
49
|
+ AND o.business_type = #{businessType}
|
48
|
50
|
</if>
|
49
|
51
|
<if test="businessTypes != null and businessTypes.length > 0">
|
50
|
|
- AND business_type in
|
|
52
|
+ AND o.business_type in
|
51
|
53
|
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
|
52
|
54
|
#{businessType}
|
53
|
55
|
</foreach>
|
54
|
56
|
</if>
|
55
|
57
|
<if test="status != null">
|
56
|
|
- AND status = #{status}
|
|
58
|
+ AND o.status = #{status}
|
57
|
59
|
</if>
|
58
|
60
|
<if test="operName != null and operName != ''">
|
59
|
|
- AND oper_name like concat('%', #{operName}, '%')
|
|
61
|
+ AND o.oper_name like concat('%', #{operName}, '%')
|
60
|
62
|
</if>
|
61
|
63
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
62
|
|
- AND oper_time >= #{params.beginTime}
|
|
64
|
+ AND o.oper_time >= #{params.beginTime}
|
63
|
65
|
</if>
|
64
|
66
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
65
|
|
- AND oper_time <= #{params.endTime}
|
|
67
|
+ AND o.oper_time <= #{params.endTime}
|
66
|
68
|
</if>
|
67
|
69
|
</where>
|
68
|
|
- order by oper_id desc
|
|
70
|
+ order by o.oper_id desc
|
69
|
71
|
</select>
|
70
|
72
|
|
71
|
73
|
<delete id="deleteOperLogByIds" parameterType="Long">
|