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