| | |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.example.jz.modle.R; |
| | | import com.example.jz.modle.dto.AddReportDto; |
| | | import com.example.jz.modle.dto.ReportParamDto; |
| | | import com.example.jz.modle.entity.Report; |
| | | import com.example.jz.modle.vo.ReportListVo; |
| | |
| | | /** |
| | | * 报案 |
| | | * |
| | | * @param report 实体对象 |
| | | * @param AddReportDto 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | @ApiOperation(value = "报案") |
| | | public R<Boolean> insert(@RequestBody Report report) { |
| | | report.setCtime(new Date()); |
| | | report.setStatus(0); |
| | | //TODO 动态获取当前的用户id |
| | | report.setUserId(1); |
| | | return R.ok(reportService.save(report)); |
| | | public R<Boolean> insert(@RequestBody AddReportDto addReportDto) { |
| | | |
| | | return R.ok(reportService.addReport(addReportDto)); |
| | | } |
| | | |
| | | /** |