From 57b3b0851b2144073522a43640c2acc9452e1719 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期三, 30 十月 2019 14:52:34 +0800 Subject: [PATCH] 新增接口: 1. 获取车辆轨迹 --- src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt | 8 ++++++++ 1 files changed, 8 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 8c902e4..37fb916 100644 --- a/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt +++ b/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdDataController.kt @@ -2,6 +2,7 @@ import com.flightfeather.obd.lightshare.service.ObdDataService import org.springframework.web.bind.annotation.* +import java.time.Duration /** * @author riku @@ -64,6 +65,13 @@ @PathVariable("deviceCode") deviceCode: String ) = obdDataService.getCoordinate(deviceCode) + @GetMapping("/coordinate/track") + fun getTrack( + @RequestParam("deviceCode") deviceCode: String, + @RequestParam("startTime") startTime: String, + @RequestParam("endTime") endTime: String + ) = obdDataService.getTrack(deviceCode, startTime, endTime) + @GetMapping("/coordinate/latest") fun getCoordinate( @RequestParam("page", required = false) pageNum: Int?, -- Gitblit v1.9.3