package cn.flightfeather.supervision.lightshare.web
|
|
import cn.flightfeather.supervision.domain.ds1.entity.Gitlist
|
import cn.flightfeather.supervision.lightshare.service.GitlistService
|
import io.swagger.annotations.Api
|
import org.springframework.web.bind.annotation.*
|
|
@Api(tags = ["GitlistController"], description = "技防措施记录信息API接口")
|
@RestController
|
@RequestMapping("/gitlist")
|
class GitlistController (val gitlistService: GitlistService){
|
@GetMapping
|
fun getAll() = gitlistService.findAll()
|
|
@PutMapping
|
fun add(@RequestBody gitlist: Gitlist) = gitlistService.save(gitlist)
|
|
@PostMapping
|
fun update(@RequestBody gitlist: Gitlist) = gitlistService.update(gitlist)
|
|
@GetMapping("/{id}")
|
fun getById(@PathVariable id:String) = gitlistService.findOne(id)
|
|
@DeleteMapping("/{id}")
|
fun delete (@PathVariable id: String) = gitlistService.delete(id)
|
}
|