| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.example.jz.enums.BusinessHttpStatus; |
| | | import com.example.jz.exception.BusinessException; |
| | | import com.example.jz.modle.R; |
| | | import com.example.jz.modle.entity.Report; |
| | | import com.example.jz.modle.vo.ReportListVo; |
| | | import com.example.jz.service.ReportService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | public R<Boolean> audit(@RequestBody Report report) { |
| | | return R.ok(reportService.audit(report)); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "PUT", value = "报案人编辑") |
| | | @PutMapping("/updateReport") |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | public R updateReport(@RequestBody Report report) { |
| | | reportService.updateById(report); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "DELETE", value = "报案人人员退群") |
| | | @DeleteMapping("/leaveGroup") |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | public R leaveGroup( @RequestParam(value = "id") Integer id,@RequestParam(value = "groupId") Integer groupId) { |
| | | reportService.leaveGroup(id,groupId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(httpMethod = "DELETE", value = "删除报案人") |
| | | @DeleteMapping("/deleteReporter") |
| | | @ApiResponse(message = "执行成功", code = 200) |
| | | public R deleteReporter( @RequestParam(value = "id") Integer id) { |
| | | reportService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |