소스 검색

修复 预警条件解析异常导致预警失败的问题

zhaiyifei 9 달 전
부모
커밋
e6c170ec7f

+ 1 - 0
src/main/java/com/yunfeiyun/agmp/iots/warn/service/ReCountService.java

@@ -112,6 +112,7 @@ public class ReCountService {
         iotWarnlog.setWlType(config.getWcTouchtype());
         iotWarnlog.setWlType(config.getWcTouchtype());
         iotWarnlog.setWlData(warnResult.getReportData());
         iotWarnlog.setWlData(warnResult.getReportData());
         iotWarnlog.setTid(config.getTid());
         iotWarnlog.setTid(config.getTid());
+        iotWarnlog.setWcBid(config.getWcBid());
         log.info("【设备预警】消息标识{}:构建预警信息: {}", messageId, iotWarnlog);
         log.info("【设备预警】消息标识{}:构建预警信息: {}", messageId, iotWarnlog);
         return iotWarnlog;
         return iotWarnlog;
     }
     }

+ 4 - 0
src/main/java/com/yunfeiyun/agmp/iots/warn/util/CompareUtil.java

@@ -63,4 +63,8 @@ public class CompareUtil {
         }
         }
         return ret;
         return ret;
     }
     }
+
+    public static void main(String[] args) {
+        System.out.println(comp("3.9", "notBetween", "99-99"));
+    }
 }
 }

+ 2 - 0
src/main/resources/mapper/IotWarnBusinessMapper.xml

@@ -21,6 +21,7 @@
             <if test="wlCreateddate != null">wlCreateddate,</if>
             <if test="wlCreateddate != null">wlCreateddate,</if>
             <if test="wlData != null">wlData,</if>
             <if test="wlData != null">wlData,</if>
             <if test="tid != null and tid != ''">tid,</if>
             <if test="tid != null and tid != ''">tid,</if>
+            <if test="wcBid != null and wcBid != ''">wcBid,</if>
         </trim>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="wlBid != null">#{wlBid},</if>
             <if test="wlBid != null">#{wlBid},</if>
@@ -37,6 +38,7 @@
             <if test="wlCreateddate != null">#{wlCreateddate},</if>
             <if test="wlCreateddate != null">#{wlCreateddate},</if>
             <if test="wlData != null">#{wlData},</if>
             <if test="wlData != null">#{wlData},</if>
             <if test="tid != null and tid != ''">#{tid},</if>
             <if test="tid != null and tid != ''">#{tid},</if>
+            <if test="wcBid != null and wcBid != ''">#{wcBid},</if>
         </trim>
         </trim>
     </insert>
     </insert>
     <insert id="insertIncrementReCount" parameterType="IotWarncount" useGeneratedKeys="true" keyProperty="id">
     <insert id="insertIncrementReCount" parameterType="IotWarncount" useGeneratedKeys="true" keyProperty="id">