From ff08d741fcec20ebb6ef95514a59704a06a13a8b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 20 六月 2024 10:47:06 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml
index f3830e0..877c01d 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml
@@ -15,13 +15,13 @@
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
-    select 
+    select
     <include refid="Base_Column_List" />
     from pr_controller_tramp
     where id = #{id,jdbcType=BIGINT}
   </select>
 
-  <select id="selectPrControllerTrampByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="getPrControllerTrampByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap">
     <!--@mbg.generated-->
     select
     <include refid="Base_Column_List" />
@@ -36,7 +36,7 @@
   </delete>
   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrControllerTramp">
     <!--@mbg.generated-->
-    insert into pr_controller_tramp (id, rtuAddr, protocol, 
+    insert into pr_controller_tramp (id, rtuAddr, protocol,
       findDt)
     values (#{id,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR},
       #{findDt,jdbcType=TIMESTAMP})
@@ -97,4 +97,53 @@
       findDt = #{findDt,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
+
+  <!--鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨祦娴帶鍒跺櫒鍦板潃-->
+<!--  <select id="getTrampRtuAddr" resultType="java.lang.String">-->
+<!--    SELECT rtuAddr FROM pr_controller_tramp WHERE id = ${controllerId}-->
+<!--  </select>-->
+
+  <!--鏍规嵁鎺у埗鍣ㄧ紪鍙疯幏鍙栨祦娴帶鍒跺櫒淇℃伅-->
+  <select id="getTrampControllerInfo" resultMap="BaseResultMap">
+    SELECT rtuAddr, protocol, findDt FROM pr_controller_tramp WHERE id = ${controllerId}
+  </select>
+
+    <!--    鏍规嵁鏉′欢鑾峰彇娴佹氮鎺у埗鍣ㄤ俊鎭�-->
+    <select id="getTrampControllers" resultMap="BaseResultMap">
+        select CAST(id AS char)AS id,
+        rtuAddr,
+        protocol,
+        findDt
+        FROM pr_controller_tramp
+        <where>
+            <if test="id != null and id !=''">
+                id = #{id,jdbcType=VARCHAR}
+            </if>
+            <if test="rtuAddr != null and rtuAddr != ''">
+                AND   rtuAddr = #{rtuAddr,jdbcType=VARCHAR}
+            </if>
+            <if test="protocol != null and protocol != ''">
+                AND  protocol = #{protocol,jdbcType=VARCHAR}
+            </if>
+
+        </where>
+    </select>
+    <!--    鏍规嵁鏉′欢鑾峰彇娴佹氮鎺у埗鍣ㄦ暟閲�-->
+    <select id="getTrampControllersCount" resultType="java.lang.Long">
+        select
+        COUNT(*) AS recordCount
+        FROM pr_controller_tramp
+        <where>
+            <if test="id != null and id !=''">
+                  id = #{id,jdbcType=VARCHAR}
+            </if>
+            <if test="rtuAddr != null and rtuAddr != ''">
+                AND   rtuAddr = #{rtuAddr,jdbcType=VARCHAR}
+            </if>
+            <if test="protocol != null and protocol != ''">
+                AND  protocol = #{protocol,jdbcType=VARCHAR}
+            </if>
+
+        </where>
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0