From 423cc032c053d6d153f579a803500a471d89910e Mon Sep 17 00:00:00 2001
From: liusuyi <13324259@qq.com>
Date: 星期日, 17 九月 2023 23:41:55 +0800
Subject: [PATCH] 增加多数据源
---
src/main/resources/mapper/ArdEquipExternalMapper.xml | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/ArdEquipExternalMapper.xml b/src/main/resources/mapper/ArdEquipExternalMapper.xml
index 646ba44..0cd93bf 100644
--- a/src/main/resources/mapper/ArdEquipExternalMapper.xml
+++ b/src/main/resources/mapper/ArdEquipExternalMapper.xml
@@ -18,6 +18,7 @@
<result property="altitude" column="altitude"/>
<result property="deptId" column="dept_id"/>
<result property="userId" column="user_id"/>
+ <result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectArdEquipExternalVo">
@@ -31,10 +32,24 @@
c.password,
c.longitude,
c.latitude,
- c.altitude
+ c.altitude,
+ c.update_time
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