From 18d6ac5798b9ef96077f592ccc3f94b365006e6a Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期二, 14 二月 2023 17:03:17 +0800
Subject: [PATCH] 增加service

---
 src/main/resources/mybatis/mapper/FailureLoggingMapper.xml |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mybatis/mapper/FailureLoggingMapper.xml b/src/main/resources/mybatis/mapper/FailureLoggingMapper.xml
index c0d6601..516ef98 100644
--- a/src/main/resources/mybatis/mapper/FailureLoggingMapper.xml
+++ b/src/main/resources/mybatis/mapper/FailureLoggingMapper.xml
@@ -17,6 +17,34 @@
 		ID,OLD_DEVICE_NAME, OLD_DEVICE_IP,OLD_DEVICE_MODEL,NEW_DEVICE_NAME,NEW_DEVICE_IP,NEW_DEVICE_MODEL,PERSON_NAME,PERSON_DATE
 	</sql>
 
+	<sql id="queryByParams">
+		<if test="oldDeviceName != null">
+			<![CDATA[ AND OLD_DEVICE_NAME = #{oldDeviceName} ]]>
+		</if>
+		<if test="oldDeviceIp != null">
+			<![CDATA[ AND OLD_DEVICE_IP = #{oldDeviceIp} ]]>
+		</if>
+		<if test="oldDeviceModel != null">
+			<![CDATA[ AND OLD_DEVICE_MODEL = #{oldDeviceModel} ]]>
+		</if>
+		<if test="newDeviceName != null">
+			<![CDATA[ AND NEW_DEVICE_NAME = #{newDeviceName} ]]>
+		</if>
+		<if test="newDeviceIp != null">
+			<![CDATA[ AND NEW_DEVICE_IP = #{newDeviceIp} ]]>
+		</if>
+		<if test="newDeviceModel != null">
+			<![CDATA[ AND NEW_DEVICE_MODEL = #{newDeviceModel} ]]>
+		</if>
+		<if test="personName != null">
+			<![CDATA[ AND PERSON_NAME = #{personName} ]]>
+		</if>
+		<if test="personDate != null">
+			<![CDATA[ AND PERSON_DATE LIKE #{personDate}+'%' ]]>
+		</if>
+
+	</sql>
+
 	<select id="selectById" resultMap="resultMap" parameterType="java.lang.String">
 		SELECT
 		<include refid="tableColumnList" />

--
Gitblit v1.9.1