Răsfoiți Sursa

sql去除''

lengfaqiang 2 ani în urmă
părinte
comite
4c3337c578

+ 9 - 8
slope-modules/slope-detection/src/main/resources/mapper/mysql/KwsAlarmMapper.xml

@@ -361,6 +361,7 @@
         from kws_alarm
         <where>
             del_flag = 0
+            and trigger_times > 0
             <if test="mountainId != null and mountainId != ''">
                 and mountain_id = #{mountainId}
             </if>
@@ -370,12 +371,12 @@
             <if test="query.alarmInfo != null and query.alarmInfo != ''">
                 and title = #{query.alarmInfo}
             </if>
-            <if test="query.status != null and query.status != ''">
+            <if test="query.status != null">
                 and status = #{query.status}
             </if>
-            <if test="query.status != null and query.status != ''">
-                and is_history = #{query.status}
-            </if>
+<!--            <if test="query.status != null and query.status != ''">-->
+<!--                and is_history = #{query.status}-->
+<!--            </if>-->
             <if test="query.alarmLevel != null and query.alarmLevel != ''">
                 and level = #{query.alarmLevel}
             </if>
@@ -392,7 +393,7 @@
         </include>
         from kws_alarm
         <where>
-            del_flag = 0
+            del_flag = 0 and trigger_times > 0
             <if test="idsList != null and idsList.size() > 0">
                 and id in
                 <foreach collection="idsList" item="item" open="(" close=")" separator=",">
@@ -411,9 +412,9 @@
             <if test="query.status != null and query.status != ''">
                 and status = #{query.status}
             </if>
-            <if test="query.status != null and query.status != ''">
-                and is_history = #{query.status}
-            </if>
+<!--            <if test="query.status != null and query.status != ''">-->
+<!--                and is_history = #{query.status}-->
+<!--            </if>-->
             <if test="query.alarmLevel != null and query.alarmLevel != ''">
                 and level = #{query.alarmLevel}
             </if>