riku
2022-06-17 3a5c011d9509d3bc0367921f463676c81ff2e374
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)
}