mirror of https://github.com/halo-dev/halo
feat: performance optimization.
parent
ed734a6a16
commit
66e9c98d48
|
@ -18,6 +18,7 @@ import run.halo.app.model.entity.Sheet;
|
|||
import run.halo.app.model.enums.PostStatus;
|
||||
import run.halo.app.model.support.HaloConst;
|
||||
import run.halo.app.model.vo.BaseCommentVO;
|
||||
import run.halo.app.model.vo.SheetDetailVO;
|
||||
import run.halo.app.service.*;
|
||||
import run.halo.app.utils.MarkdownUtils;
|
||||
|
||||
|
@ -132,9 +133,11 @@ public class ContentSheetController {
|
|||
|
||||
Page<BaseCommentVO> comments = sheetCommentService.pageVosBy(sheet.getId(), PageRequest.of(cp, optionService.getCommentPageSize(), sort));
|
||||
|
||||
SheetDetailVO sheetDetailVO = sheetService.convertToDetailVo(sheet);
|
||||
|
||||
// sheet and post all can use
|
||||
model.addAttribute("sheet", sheetService.convertToDetailVo(sheet));
|
||||
model.addAttribute("post", sheetService.convertToDetailVo(sheet));
|
||||
model.addAttribute("sheet", sheetDetailVO);
|
||||
model.addAttribute("post", sheetDetailVO);
|
||||
model.addAttribute("is_sheet", true);
|
||||
model.addAttribute("comments", comments);
|
||||
|
||||
|
|
Loading…
Reference in New Issue