feiyu02
2022-11-15 909fd8929d7906f1dca68acc05e36e29b0b9192c
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.Evaluationrule
import cn.flightfeather.supervision.lightshare.service.EvaluationruleService
import io.swagger.annotations.Api
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["EvaluationruleController"], description = "评估总规则API接口")
@RestController
@RequestMapping("/evaluationrule")
class EvaluationruleController (val evaluationruleService: EvaluationruleService){
    @GetMapping
    fun getAll() = evaluationruleService.findAll()
 
    @PutMapping
    fun add(@RequestBody evaluationrule: Evaluationrule) = evaluationruleService.save(evaluationrule)
 
    @PostMapping
    fun update(@RequestBody evaluationrule: Evaluationrule) = evaluationruleService.update(evaluationrule)
 
    @GetMapping("/{id}")
    fun getById(@PathVariable id:String) = evaluationruleService.findOne(id)
 
    @DeleteMapping("/{id}")
    fun delete (@PathVariable id: String) = evaluationruleService.delete(id)
}