From bf6738071854a9977d12b42fbe8708878301a1cb Mon Sep 17 00:00:00 2001 From: caixiang <939387484@qq.com> Date: Thu, 8 Dec 2022 16:17:15 +0800 Subject: [PATCH] mark --- .../src/main/java/com/cnbm/influx/config/InfluxClient.java | 2 +- .../java/com/cnbm/influx/controller/S7DemoController.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ym-influx/src/main/java/com/cnbm/influx/config/InfluxClient.java b/ym-influx/src/main/java/com/cnbm/influx/config/InfluxClient.java index 14efc29..4ffc395 100644 --- a/ym-influx/src/main/java/com/cnbm/influx/config/InfluxClient.java +++ b/ym-influx/src/main/java/com/cnbm/influx/config/InfluxClient.java @@ -115,7 +115,7 @@ public enum InfluxClient { List list = new ArrayList<>(); for(Event event:events){ Point point = null; - if(event.getBatchNum()==null){ + if(event.getSampleNumber()==null){ point = Point.measurement(measurement) .addTag("transationId", event.getTransationId()) .addTag("argName", event.getArgName()) diff --git a/ym-influx/src/main/java/com/cnbm/influx/controller/S7DemoController.java b/ym-influx/src/main/java/com/cnbm/influx/controller/S7DemoController.java index e1b7a46..bf0177c 100644 --- a/ym-influx/src/main/java/com/cnbm/influx/controller/S7DemoController.java +++ b/ym-influx/src/main/java/com/cnbm/influx/controller/S7DemoController.java @@ -61,7 +61,7 @@ public class S7DemoController { Instant time = new Date().toInstant(); Event event = new Event(); event.setTime(time); - event.setTransationId("asas123"); + event.setBatchNum("1"); event.setArgName("failDayDay"); event.setArgValue("1"); list.add(event); @@ -70,7 +70,7 @@ public class S7DemoController { Event event2 = new Event(); event2.setTime(time); - event2.setTransationId("asas456"); + event.setBatchNum("2"); event2.setArgName("failDayDay"); event2.setArgValue("2"); list.add(event2);