package cn.flightfeather.supervision.lightshare.web
|
|
import cn.flightfeather.supervision.domain.entity.EnforceCase
|
import cn.flightfeather.supervision.lightshare.service.EnforceCaseService
|
import io.swagger.annotations.Api
|
import io.swagger.annotations.ApiOperation
|
import io.swagger.annotations.ApiParam
|
import org.springframework.web.bind.annotation.*
|
|
@Api(tags = ["环保督察案例API接口"])
|
@RestController
|
@RequestMapping("/enforceCase")
|
class EnforceCaseController(private val enforceCaseService: EnforceCaseService) {
|
|
@ApiOperation(value = "新增案例")
|
@PutMapping("/add")
|
fun add(
|
@ApiParam(value = "用户id") @RequestParam userId: String,
|
@ApiParam(value = "咨询问题") @RequestBody case: EnforceCase,
|
) = enforceCaseService.addCase(userId, case)
|
|
@ApiOperation(value = "更新案例")
|
@PostMapping("/update")
|
fun update(
|
@ApiParam(value = "用户id") @RequestParam userId: String,
|
@ApiParam(value = "咨询问题") @RequestBody case: EnforceCase,
|
) = enforceCaseService.updateCase(userId, case)
|
}
|