riku
2019-09-05 197d6766d056fda4fdf9e1f9ee26de9f9a480ef5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.flightfeather.obd.lightshare.web
 
import com.flightfeather.obd.lightshare.bean.ThresholdValueVo
import com.flightfeather.obd.lightshare.service.ObdThresholdValueService
import org.springframework.web.bind.annotation.*
 
/**
 * @author riku
 * Date: 2019/9/5
 */
@RestController
@RequestMapping("obd/threshold")
class ObdThresholdController(val obdThresholdValueService: ObdThresholdValueService) {
 
    @GetMapping("/{id}")
    fun getDataByVinCode(
            @PathVariable("id") id: String
    ) = obdThresholdValueService.getDataByVinCode(id)
 
    @PostMapping("/update")
    fun update(
            @RequestBody thresholdValueVo: ThresholdValueVo
    ) = obdThresholdValueService.update(thresholdValueVo)
 
    @PutMapping("/save")
    fun save(
            @RequestBody thresholdValueVo: ThresholdValueVo
    ) = obdThresholdValueService.save(thresholdValueVo)
 
}