| | |
| | | @Autowired |
| | | private CommentService commentService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("新建") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:comment:create") |
| | | public ApiResponse create(@RequestBody Comment comment) { |
| | | return ApiResponse.success(commentService.create(comment,getMemberId())); |
| | | } |
| | | |
| | | @ApiOperation("根据ID删除") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:comment:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | commentService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | // @ApiOperation("根据ID删除") |
| | | // @GetMapping("/delete/{id}") |
| | | // @RequiresPermissions("business:comment:delete") |
| | | // public ApiResponse deleteById(@PathVariable Integer id) { |
| | | // commentService.deleteById(id); |
| | | // return ApiResponse.success(null); |
| | | // } |
| | | |
| | | @ApiOperation("批量删除") |
| | | @GetMapping("/delete/batch") |