From 1f356649ce536b19b903d6f3a533983d4b8222bc Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 25 十月 2019 18:16:39 +0800
Subject: [PATCH] 新增接口: 1. 获取所有设备的最新一条数据 新增数据库表: 1. 车辆信息表

---
 src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt b/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt
index 04ebc19..8c902e4 100644
--- a/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt
+++ b/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt
@@ -52,8 +52,21 @@
             @RequestParam("endTime", required = false) endTime: String?
     ) = obdDataService.getDataStream(deviceCode, pageNum, pageSize, startTime, endTime)
 
+    @GetMapping("/dataStream/count")
+    fun getDataStreamCount(
+            @RequestParam("deviceCode") deviceCode: String = "",
+            @RequestParam("startTime", required = false) startTime: String?,
+            @RequestParam("endTime", required = false) endTime: String?
+    ) = obdDataService.getDataStreamCount(deviceCode, startTime, endTime)
+
     @GetMapping("/coordinate/{deviceCode}")
     fun getCoordinate(
             @PathVariable("deviceCode") deviceCode: String
     ) = obdDataService.getCoordinate(deviceCode)
+
+    @GetMapping("/coordinate/latest")
+    fun getCoordinate(
+            @RequestParam("page", required = false) pageNum: Int?,
+            @RequestParam("per_page", required = false) pageSize: Int?
+    ) = obdDataService.getLatestCoordinate(pageNum, pageSize)
 }
\ No newline at end of file

--
Gitblit v1.9.3