feiyu02
2022-01-12 1564af04dacafcc08a9682a4ef1e651120c8cc46
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
27
28
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.domain.entity.Evaluationsubrule
import cn.flightfeather.supervision.lightshare.service.EvaluationsubruleService
import io.swagger.annotations.Api
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["评分子规则API接口"])
@RestController
@RequestMapping("/evaluationsubrule")
class EvaluationsubruleController (val evaluationsubruleService: EvaluationsubruleService) {
    @GetMapping
    fun getAll() = evaluationsubruleService.findAll()
 
    @PutMapping
    fun add(@RequestBody evaluationsubrule: Evaluationsubrule) = evaluationsubruleService.save(evaluationsubrule)
 
    @PostMapping
    fun update(@RequestBody evaluationsubrule: Evaluationsubrule) = evaluationsubruleService.update(evaluationsubrule)
 
    @GetMapping("/{ruleId}")
    fun getById(@PathVariable ruleId:String) = evaluationsubruleService.findByRuleId(ruleId)
 
    @DeleteMapping("/{id}")
    fun delete (@PathVariable id: String) = evaluationsubruleService.delete(id)
 
 
}