package cn.flightfeather.supervision.lightshare.web
|
|
import cn.flightfeather.supervision.domain.ds1.entity.Taskvertion
|
import cn.flightfeather.supervision.lightshare.service.TaskvertionService
|
import org.springframework.web.bind.annotation.*
|
import springfox.documentation.annotations.ApiIgnore
|
|
@ApiIgnore
|
@RestController
|
@RequestMapping("/tasksvertion")
|
class TaskvertionController(val taskvertionService: TaskvertionService) {
|
@GetMapping("")
|
fun getAll() = taskvertionService.findAll()
|
|
@GetMapping("/{id}")
|
fun getById(@PathVariable id: String) = taskvertionService.findByID(id)
|
|
@PutMapping("")
|
fun add(@RequestBody taskvertion: Taskvertion) = taskvertionService.save(taskvertion)
|
|
@PutMapping("/addlist")
|
fun addList(@RequestBody taskvertionlist: List<Taskvertion>) = taskvertionService.saveList(taskvertionlist)
|
|
@PostMapping
|
fun update(@RequestBody taskvertion: Taskvertion) = taskvertionService.update(taskvertion)
|
|
@DeleteMapping("/{id}")
|
fun delete(@PathVariable id: String) = taskvertionService.delete(id)
|
}
|