riku
2019-09-05 28b10b7255483c8e2eb5e3e828f8cda658e94c44
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)
}