From b785ed09d1bcf805e97a4c676158b4e3b0c8974b Mon Sep 17 00:00:00 2001 From: bgy Date: Mon, 19 Jan 2026 09:04:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/topsail/influxdb/schdule/ScheduledMessageProducer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/topsail/influxdb/schdule/ScheduledMessageProducer.java b/src/main/java/com/topsail/influxdb/schdule/ScheduledMessageProducer.java index bbf2c67..53e2797 100644 --- a/src/main/java/com/topsail/influxdb/schdule/ScheduledMessageProducer.java +++ b/src/main/java/com/topsail/influxdb/schdule/ScheduledMessageProducer.java @@ -7,14 +7,14 @@ import org.springframework.stereotype.Component; import java.time.LocalDateTime; -@Component +//@Component public class ScheduledMessageProducer { @Autowired private AmqpService amqpService; // 使用cron表达式,每分钟的第10秒执行 - @Scheduled(cron = "40 * * * * ?") +// @Scheduled(cron = "40 * * * * ?") public void pushCronMessage3() { try { String message="{\"deviceType\":1,\"hardwareVersions\":\"1.24.1.1\",\"iMSI\":\"460087939303126\",\"iccid\":\"898604F9262380193126\",\"imei\":\"865074051888625\",\"softwareVersions\":\"1.1.6.8\"}"; @@ -24,7 +24,7 @@ public class ScheduledMessageProducer { System.out.println("设备基础信息:Cron定时消息: 失败" +e.getMessage()); } } - @Scheduled(cron = "40 * * * * ?") +// @Scheduled(cron = "40 * * * * ?") public void pushCronMessage2() { try { String message="{\"alarmType\":\"0\",\"batteryLevel\":100,\"dataBody\":\"{\\\"CSQ\\\":31,\\\"IMEI\\\":\\\"865074051888625\\\",\\\"alarm\\\":0,\\\"alarms_dat\\\":\\\"\\\",\\\"bat_level\\\":100,\\\"dev_model\\\":12,\\\"dev_type\\\":1,\\\"samp_time\\\":\\\"2000/1/1 1:1:7\\\",\\\"sensor_dat\\\":\\\"℃,MPa|null,0.0000\\\"}\",\"dataGroupNum\":2,\"devModel\":12,\"deviceType\":1,\"deviceid\":\"15208214865074051888625\",\"imei\":\"865074051888625\",\"passNum\":1,\"platformType\":\"AEP\",\"protocol\":\"mqtt\",\"sampTime\":\"2000/1/1 1:1:7\",\"sampleData\":\"0,0.0000\",\"sendTime\":\"20251229163715\",\"singalStrength\":31,\"sourcetype\":\"new_top\",\"time\":\"2025-12-29 16:37:15\",\"unit\":\"℃,MPa\",\"userName\":\"topsail\"}";