| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | |
| | | import com.doumee.dao.web.dto.CommentDTO; |
| | | import com.doumee.dao.web.dto.activity.ActivityCommentDTO; |
| | | import com.doumee.dao.web.dto.activity.ActivityReplyCommentDTO; |
| | | import com.doumee.dao.web.request.CommentApplyRequest; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | public class CommentApi extends ApiController{ |
| | | |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("新建") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:comment:create") |
| | | public ApiResponse create(@RequestBody Comment comment) { |
| | | return ApiResponse.success(commentService.create(comment,getMemberId())); |
| | | @LoginRequired |
| | | @ApiOperation("发布评论") |
| | | @PostMapping("/apply") |
| | | public ApiResponse<Comment> apply(@RequestBody CommentApplyRequest comment) { |
| | | return ApiResponse.success(commentService.apply(comment,getMemberId())); |
| | | } |
| | | |
| | | |
| | |
| | | * @param pageWrap 分页对象 |
| | | * @return PageData<Comment> |
| | | */ |
| | | @PreventRepeat |
| | | @ApiOperation("分页活动探店评论查询") |
| | | @PostMapping("/findActivityCommentDTOPage") |
| | | public ApiResponse<PageData<ActivityCommentDTO>> findActivityCommentDTOPage(@RequestBody PageWrap<CommentDTO> pageWrap){ |
| | |
| | | * @param pageWrap 分页对象 |
| | | * @return PageData<Comment> |
| | | */ |
| | | @PreventRepeat |
| | | @LoginRequired |
| | | @ApiOperation("分页活动探店评论回复查询") |
| | | @PostMapping("/findActivityReplyCommentDTOPage") |
| | | public ApiResponse<PageData<ActivityReplyCommentDTO>> findActivityReplyCommentDTOPage(@RequestBody PageWrap<CommentDTO> pageWrap){ |