| | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | |
| | | @Api(value = "影视作品评论点赞", tags = "影视作品评论点赞") |
| | | @Api(value = "评论点赞", tags = "评论点赞") |
| | | @RestController |
| | | @RequestMapping("/v2/comment-likes") |
| | | @RequiredArgsConstructor |
| | |
| | | private final CommentLikesService commentLikesService; |
| | | |
| | | @GetMapping("/commentLikes/list") |
| | | @ApiOperation(value = "影视作品评论点赞列表", httpMethod = "GET") |
| | | @ApiOperation(value = "评论点赞列表", httpMethod = "GET") |
| | | public ResponseEntity<ReturnDataDTO<Page<CommentLikesVO>>> getCommentLikesList(Page page, CommentLikesQueryDTO dto) { |
| | | return returnData(R.SUCCESS.getCode(), commentLikesService.queryPage(dto, page)); |
| | | } |
| | | |
| | | @GetMapping(value = "/commentLikes/delete") |
| | | @ApiOperation(value = "删除影视作品评论点赞 ", httpMethod = "GET", notes = "ID") |
| | | @ApiOperation(value = "删除评论点赞 ", httpMethod = "GET", notes = "ID") |
| | | public ResponseEntity delete(@NotNull(message = "id不能为空") Long id) { |
| | | commentLikesService.deleteCommentLikes(String.valueOf(id)); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PostMapping(value = "/commentLikes/new") |
| | | @ApiOperation(value = "保存影视作品评论点赞", httpMethod = "POST") |
| | | @ApiOperation(value = "保存评论点赞", httpMethod = "POST") |
| | | public ResponseEntity insert(@RequestBody CommentLikesDTO commentLikesDTO) { |
| | | commentLikesService.saveCommentLikes(commentLikesDTO); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | } |
| | | |
| | | @PostMapping(value = "/commentLikes/edit") |
| | | @ApiOperation(value = "更新影视作品评论点赞", httpMethod = "POST") |
| | | @ApiOperation(value = "更新评论点赞", httpMethod = "POST") |
| | | public ResponseEntity update(@RequestBody CommentLikesDTO commentLikesDTO) { |
| | | commentLikesService.updateCommentLikes(commentLikesDTO); |
| | | return returnData(R.SUCCESS.getCode(), null); |