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