feiyu02
2025-09-12 dc4f12f66685260ac357997680e5f3fe723c3c4a
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
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)
}