From fb1dc85a9ae6a9b8426ec5e29eb0139933ebe233 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期日, 29 九月 2019 11:22:24 +0800 Subject: [PATCH] 新增接口: 1. 获取某设备某时间段的数据流个数 --- src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdThresholdController.kt | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdThresholdController.kt b/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdThresholdController.kt index 11f93b5..d5d11d3 100644 --- a/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdThresholdController.kt +++ b/src/main/kotlin/com/flightfeather/obd/lightshare/web/ObdThresholdController.kt @@ -12,19 +12,21 @@ @RequestMapping("obd/threshold") class ObdThresholdController(val obdThresholdValueService: ObdThresholdValueService) { - @GetMapping("/{id}") + @GetMapping("/{vinCode}") fun getDataByVinCode( - @PathVariable("id") id: String - ) = obdThresholdValueService.getDataByVinCode(id) + @PathVariable("vinCode") vinCode: String + ) = obdThresholdValueService.getDataByVinCode(vinCode) @PostMapping("/update") fun update( + @RequestParam("userId") userId: String, @RequestBody thresholdValueVo: ThresholdValueVo - ) = obdThresholdValueService.update(thresholdValueVo) + ) = obdThresholdValueService.update(userId, thresholdValueVo) @PutMapping("/save") fun save( + @RequestParam("userId") userId: String, @RequestBody thresholdValueVo: ThresholdValueVo - ) = obdThresholdValueService.save(thresholdValueVo) + ) = obdThresholdValueService.save(userId, thresholdValueVo) } \ No newline at end of file -- Gitblit v1.9.3