From 7241169f4a519f4cb6c8cfc4f221231c42ed486d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 28 十月 2024 19:16:08 +0800
Subject: [PATCH] 优化代码
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml | 12 ++++++++----
1 files changed, 8 insertions(+), 4 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 d1ee14b..a40bbe2 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrControllerTrampMapper.xml
@@ -35,6 +35,10 @@
delete from pr_controller_tramp
where id = #{id,jdbcType=BIGINT}
</delete>
+ <!--娓呯┖娴佹氮鎺у埗鍣ㄨ〃-->
+ <delete id="emptyTrampController">
+ delete from pr_controller_tramp
+ </delete>
<insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrControllerTramp">
<!--@mbg.generated-->
insert into pr_controller_tramp (id, rtuAddr, protocol,
@@ -132,19 +136,19 @@
id = #{id,jdbcType=VARCHAR}
</if>
<if test="rtuAddr != null and rtuAddr != ''">
- AND rtuAddr = #{rtuAddr,jdbcType=VARCHAR}
+ AND rtuAddr = #{rtuAddr,jdbcType=VARCHAR}
</if>
<if test="protocol != null and protocol != ''">
- AND protocol = #{protocol,jdbcType=VARCHAR}
+ AND protocol = #{protocol,jdbcType=VARCHAR}
</if>
</where>
+ order by id desc
<trim prefix="limit " >
<if test="start != null and count != null">
#{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
</if>
</trim>
- order by rtuAddr desc
- </select>
+</select>
<!-- 鏍规嵁鏉′欢鑾峰彇娴佹氮鎺у埗鍣ㄦ暟閲�-->
<select id="getTrampControllersCount" resultType="java.lang.Long">
select
--
Gitblit v1.8.0