From 62a7f3228c94db41bf57858a6549eb0db033bf1e Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 29 五月 2024 11:44:17 +0800
Subject: [PATCH] 2024-05-29 朱宝民
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 51 insertions(+), 2 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 28f8d9e..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,7 +15,7 @@
</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}
@@ -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