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)
|
}
|