From bc56530307e0e92b94a1abb5d38368f04b92e990 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 12 三月 2026 15:52:15 +0800
Subject: [PATCH] 1
---
zy-acs-hex/src/main/java/com/zy/acs/hex/controller/TestController.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/zy-acs-hex/src/main/java/com/zy/acs/hex/controller/TestController.java b/zy-acs-hex/src/main/java/com/zy/acs/hex/controller/TestController.java
index 8cd467c..37c4386 100644
--- a/zy-acs-hex/src/main/java/com/zy/acs/hex/controller/TestController.java
+++ b/zy-acs-hex/src/main/java/com/zy/acs/hex/controller/TestController.java
@@ -1,7 +1,8 @@
package com.zy.acs.hex.controller;
+import com.zy.acs.common.domain.mq.DeviceMessage;
import com.zy.acs.hex.constant.RabbitConstant;
-import com.zy.acs.hex.domain.Device;
+import com.zy.acs.hex.domain.DeviceLog;
import com.zy.component.influxdb.service.InfluxDBService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
@@ -31,10 +32,9 @@
*/
@GetMapping(value = "/test1")
public void sendTest1() {
- Device device = new Device();
+ DeviceMessage device = new DeviceMessage("121212121212");
//device.setEvent("online");
//device.setDeviceId("123");
- device.setProtocol("212121212121212");
String router = RabbitConstant.ROUTING_KEY_UP.replaceFirst("\\*", "123").replaceFirst("\\*", "online");
rabbitTemplate.convertAndSend(RabbitConstant.TOPIC_EXCHANGE, router, device);
}
@@ -58,7 +58,7 @@
@GetMapping(value = "/query")
@ResponseBody
public Object queryTest() {
- return influxDBService.queryData("select * from device order by time desc limit 10");
+ return influxDBService.queryData("select * from device order by time desc limit 10");
}
/**
@@ -69,7 +69,7 @@
@GetMapping(value = "/query2")
@ResponseBody
public Object queryTest2() {
- return influxDBService.queryPoints("select * from device order by time desc limit 10", Device.class);
+ return influxDBService.queryPoints("select * from device order by time desc limit 10", DeviceLog.class);
}
}
--
Gitblit v1.9.1