From e5e76412f1a20e8aed95614cbd7bf2b638cda2cc Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期三, 11 三月 2026 13:30:31 +0800
Subject: [PATCH] 1

---
 zy-acs-hex/src/main/java/com/zy/acs/hex/controller/DeviceLogController.java |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/zy-acs-hex/src/main/java/com/zy/acs/hex/controller/DeviceLogController.java b/zy-acs-hex/src/main/java/com/zy/acs/hex/controller/DeviceLogController.java
new file mode 100644
index 0000000..047b845
--- /dev/null
+++ b/zy-acs-hex/src/main/java/com/zy/acs/hex/controller/DeviceLogController.java
@@ -0,0 +1,37 @@
+package com.zy.acs.hex.controller;
+
+import com.zy.acs.common.domain.mq.DeviceMessage;
+import com.zy.acs.framework.common.R;
+import com.zy.component.influxdb.service.InfluxDBService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@Slf4j
+@RequestMapping(value = "/deviceLog")
+public class DeviceLogController {
+
+    @Autowired
+    private InfluxDBService influxDBService;
+
+
+    /**
+     * 鏌ヨ鏈�鏂扮殑鍗佹潯鏁版嵁
+     *
+     * @return
+     */
+    @GetMapping(value = "/query")
+    @ResponseBody
+    public R query() {
+        List<DeviceMessage> deviceMessages = influxDBService.queryPoints("select * from device order by time desc limit 10", DeviceMessage.class);
+        return R.ok(deviceMessages);
+    }
+
+
+}

--
Gitblit v1.9.1