From b7eef391ce3d396887149c7e1ca4aa9e39d6b538 Mon Sep 17 00:00:00 2001
From: ‘liusuyi’ <1951119284@qq.com>
Date: 星期四, 10 八月 2023 10:45:51 +0800
Subject: [PATCH] 优化日志

---
 src/main/resources/mapper/ArdEquipExternalMapper.xml |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/ArdEquipExternalMapper.xml b/src/main/resources/mapper/ArdEquipExternalMapper.xml
index 646ba44..a7550e1 100644
--- a/src/main/resources/mapper/ArdEquipExternalMapper.xml
+++ b/src/main/resources/mapper/ArdEquipExternalMapper.xml
@@ -34,7 +34,20 @@
                c.altitude
         from ard_equip_external c
     </sql>
-
+    <select id="selectArdEquipExternal" parameterType="ArdEquipExternal" resultMap="ArdEquipExternalResult">
+        <include refid="selectArdEquipExternalVo"/>
+        <where>
+            <if test="name != null  and name != ''">and c.name like '%'||#{name}||'%'</if>
+            <if test="type != null  and type != ''">and c.type = #{type}</if>
+            <if test="factory != null  and factory != ''">and c.factory = #{factory}</if>
+            <if test="deptId != null ">and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t
+                WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) ))
+            </if>
+            <if test="userId != null  and userId != ''">and c.user_id = #{userId}</if>
+            <if test="ip != null  and ip != ''">and c.ip = #{ip}</if>
+            <if test="port != null  and port != ''">and c.port = #{port}</if>
+        </where>
+    </select>
     <select id="selectArdEquipExternalList" parameterType="ArdEquipExternal" resultMap="ArdEquipExternalResult">
         <include refid="selectArdEquipExternalVo"/>
         <where>

--
Gitblit v1.9.3