ソースを参照

操作日志列表新增IP地址查询

RuoYi 2 年 前
コミット
8dd40158ec

+ 4 - 1
ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html

@@ -12,6 +12,9 @@
 					<div class="select-list">
 						<ul>
 							<li>
+								<label>操作地址:</label><input type="text" name="operIp"/>
+							</li>
+							<li>
 								<label>系统模块: </label><input type="text" name="title"/>
 							</li>
 							<li>
@@ -116,7 +119,7 @@
 		        },
 		        {
 		            field: 'operIp',
-		            title: '主机'
+		            title: '操作地址'
 		        },
 		        {
 		            field: 'operLocation',

+ 3 - 0
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -37,6 +37,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
 		<include refid="selectOperLogVo"/>
 		<where>
+			<if test="operIp != null and operIp != ''">
+				AND oper_ip like concat('%', #{operIp}, '%')
+			</if>
 			<if test="title != null and title != ''">
 				AND title like concat('%', #{title}, '%')
 			</if>