package com.doumee.api.web;
|
|
import com.doumee.core.annotation.pr.PreventRepeat;
|
import com.doumee.core.model.ApiResponse;
|
import com.doumee.core.model.PageData;
|
import com.doumee.core.model.PageWrap;
|
import com.doumee.dao.business.model.Comment;
|
import com.doumee.dao.web.dto.CommentDTO;
|
import com.doumee.dao.web.dto.activity.ActivityCommentDTO;
|
import com.doumee.dao.web.dto.activity.ActivityReplyCommentDTO;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* @author 江蹄蹄
|
* @date 2023/03/21 15:48
|
*/
|
@Api(tags = "发现模块评论信息")
|
@RestController
|
@RequestMapping("/web/comment")
|
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()));
|
}
|
|
|
/**
|
* 分页活动探店评论查询
|
*
|
* @param pageWrap 分页对象
|
* @return PageData<Comment>
|
*/
|
@PreventRepeat
|
@ApiOperation("分页活动探店评论查询")
|
@PostMapping("/findActivityCommentDTOPage")
|
public ApiResponse<PageData<ActivityCommentDTO>> findActivityCommentDTOPage(@RequestBody PageWrap<CommentDTO> pageWrap){
|
return ApiResponse.success(commentService.findActivityCommentDTOPage(pageWrap));
|
}
|
|
/**
|
* 分页活动探店评论回复查询
|
*
|
* @param pageWrap 分页对象
|
* @return PageData<Comment>
|
*/
|
@PreventRepeat
|
@ApiOperation("分页活动探店评论回复查询")
|
@PostMapping("/findActivityReplyCommentDTOPage")
|
public ApiResponse<PageData<ActivityReplyCommentDTO>> findActivityReplyCommentDTOPage(@RequestBody PageWrap<CommentDTO> pageWrap){
|
return ApiResponse.success(commentService.findActivityReplyCommentDTOPage(pageWrap));
|
}
|
|
|
}
|