From 788fd95ad4fd8d1a1f81c59628c24cb8355783da Mon Sep 17 00:00:00 2001
From: whycxzp <perryhsu@163.com>
Date: 星期一, 01 三月 2021 17:31:14 +0800
Subject: [PATCH] update

---
 src/main/java/com/whyc/controller/AFEInverterController.java |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/whyc/controller/AFEInverterController.java b/src/main/java/com/whyc/controller/AFEInverterController.java
index 5586fa7..0fe1328 100644
--- a/src/main/java/com/whyc/controller/AFEInverterController.java
+++ b/src/main/java/com/whyc/controller/AFEInverterController.java
@@ -1,9 +1,14 @@
 package com.whyc.controller;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageInfo;
 import com.whyc.dto.Response;
+import com.whyc.pojo.AFEInverterState;
 import com.whyc.service.AFEInverterService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import jdk.nashorn.internal.objects.annotations.Getter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -24,10 +29,26 @@
         return service.getAll(pageNum,pageSize);
     }
 
-    @GetMapping("all2")
-    @ApiOperation(value="鏌ヨ鎵�鏈�")
-    public Response getAll2(@RequestParam int pageNum,int pageSize){
-        return service.getAll2(pageNum,pageSize);
+    @GetMapping("infoByDeviceId")
+    @ApiOperation(value = "鏌ヨ鍗曚釜:鏍规嵁璁惧id")
+    public Response<AFEInverterState> getInfoByDeviceId(@RequestParam int devId){
+        return service.getInfoByDeviceId(devId);
+    }
+
+    @GetMapping("tableNames")
+    @ApiOperation(value = "鏌ヨ鍘嗗彶璁板綍瀛樺湪鐨勮〃鏍�")
+    public Response<String> getTableNames(){
+        return service.getTableNames();
+    }
+
+    /**
+     * ======History======
+     * 鍘嗗彶鏌ヨ鏃�,鍥犱负鍘嗗彶璁板綍鏄寜鐓ф棩鏈熷垎琛ㄧ殑,濡傛灉鏌ヨ鎵�鏈夌殑鏃ユ湡琛�(union)鍚庡啀鍒嗛〉,浼氬鑷撮�熷害鏋佹參,鏁呮煡璇㈡寜鐓у崟涓棩鏈熸煡璇�
+     * */
+    @GetMapping("history/all")
+    @ApiOperation(value = "鑾峰彇鎵�鏈夊巻鍙茶褰�")
+    public Response<PageInfo<AFEInverterState>> getHistory(@RequestParam int pageNum, int pageSize,String tablePrefixTime){
+        return service.getHistory(pageNum,pageSize,tablePrefixTime);
     }
 
 }

--
Gitblit v1.9.1