青羊经侦大队-数据平台
wl
2022-08-08 d60406e8f251a7c8343825403f5fd71de1680975
src/main/java/com/example/jz/controller/CauseController.java
@@ -16,6 +16,7 @@
import io.swagger.annotations.ApiResponse;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -52,7 +53,7 @@
    @ApiOperation(httpMethod = "POST", value = "案件台-案件录入-添加案件")
    @PostMapping("/addCause")
    @ApiResponse(message = "执行成功", code = 200)
    public R addCause(@RequestBody CauseDto causeDto) {
    public R addCause(@RequestBody @Validated CauseDto causeDto) {
        causeService.addCause(causeDto);
        return R.ok();
    }
@@ -60,7 +61,7 @@
    @ApiOperation(httpMethod = "PUT", value = "案件台-案件录入-修改案件")
    @PutMapping("/updateCause")
    @ApiResponse(message = "执行成功", code = 200)
    public R updateCause(@RequestBody CauseDto causeDto, Integer id) {
    public R updateCause(@RequestBody @Validated CauseDto causeDto, Integer id) {
        return R.ok(causeService.updateCause(causeDto, id));
    }