riku
2021-09-24 4f1b7973c53b45f57e451191bfd5a3d2136a004c
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)
 
 
}