| | |
| | | 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; |
| | | |
| | |
| | | @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(); |
| | | } |
| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | } |
| | | return R.ok(causeService.addReportPeople(addReportDto)); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "GET", value = "获取案件的id和名称列表") |
| | | @GetMapping("/getCauseIdAndName") |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | public R getCauseIdAndName() { |
| | | return R.ok(causeService.getCauseIdAndName()); |
| | | } |
| | | } |
| | | |