| | |
| | | @Log(title = "线路巡检隐患", businessType = BusinessType.UPDATE) |
| | | @PutMapping() |
| | | public R update(@RequestBody SafeLineInspectionHazard safeLineInspectionHazard) { |
| | | return R.ok(safeLineInspectionHazardService.updateById(safeLineInspectionHazard)); |
| | | try { |
| | | return R.ok(safeLineInspectionHazardService.updateById(safeLineInspectionHazard)); |
| | | } catch (IllegalArgumentException e) { |
| | | return R.fail(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @Operation(summary = "删除线路巡检隐患") |
| | | @Log(title = "线路巡检隐患", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public R delSafeLineInspectionHazard(@RequestBody List<Integer> ids) { |
| | | public R delSafeLineInspectionHazard(@PathVariable List<Integer> ids) { |
| | | return R.ok(safeLineInspectionHazardService.removeBatchByIds(ids)); |
| | | } |
| | | } |