add api operations for comment

main
wangqing 10 months ago
parent d203520b5b
commit f84f7047c4

@ -11,6 +11,8 @@ import controller.BaseController;
import dto.UserLoginDto;
import dto.UserMessageDto;
import enums.MessageTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -24,6 +26,7 @@ import java.util.concurrent.TimeUnit;
@RestController
@CrossOrigin
@RequestMapping("/comment")
@Api(tags = "CommentController")
public class CommentController extends BaseController {
@ -55,6 +58,7 @@ public class CommentController extends BaseController {
* @return
*/
@GetMapping("/{journalId}/{page}/{size}")
@ApiOperation(value = "根据期刊ID获取分布评论列表",notes = "根据期刊ID获取根节点评论分页列表 数据库中保存的有期刊号的都是根节点期刊号为空的代表有父评论且parentID一定有值拿到当然根节点评论列表每个根评论有 commentCount字段页面可以显示有 280个回复然后根据 @GetMapping(\"/comment/{parentId}/{page}/{size}\") 接口分页拿到该评论下的子评论列表页面在请求添加评论的时候当给评论添加子评论的时候父评论parentID有值就无法添加子评论并且不显示回复2字控制到两级")
public Result findAllByJournalId(@PathVariable String journalId,@PathVariable int page,@PathVariable int size) {
Page<Comment> pageData = commentService.findByJournalId(journalId,page,size);

Loading…
Cancel
Save