| | |
| | | return R.ok().add(operationRecordService.getById(id)); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:operationRecord:save')") |
| | | @OperationLog("添加操作日志") |
| | | @PostMapping("/operationRecord/save") |
| | | public R save(@RequestBody OperationRecord operationRecord) { |
| | | if (!operationRecordService.save(operationRecord)) { |
| | | return R.error("添加失败"); |
| | | } |
| | | return R.ok("添加成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:operationRecord:update')") |
| | | @OperationLog("修改操作日志") |
| | | @PostMapping("/operationRecord/update") |
| | | public R update(@RequestBody OperationRecord operationRecord) { |
| | | if (!operationRecordService.updateById(operationRecord)) { |
| | | return R.error("修改失败"); |
| | | } |
| | | return R.ok("修改成功"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:operationRecord:remove')") |
| | | @OperationLog("删除操作日志") |
| | | @OperationLog("Delete OperationRecord") |
| | | @PostMapping("/operationRecord/remove/{ids}") |
| | | public R remove(@PathVariable Long[] ids) { |
| | | if (!operationRecordService.removeByIds(Arrays.asList(ids))) { |
| | | return R.error("删除失败"); |
| | | return R.error("Delete Fail"); |
| | | } |
| | | return R.ok("删除成功"); |
| | | return R.ok("Delete Success"); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('system:operationRecord:list')") |