/** 进入热门问题页 */ public String hotPost() throws Exception { publicLoad(); if (pageBean == null) { pageBean = new PageBean(); } postColl = postService.listHotPost(pageBean); return "success"; }
/** 统计三个问题的总量和最新评论 */ public void publicLoad() throws Exception { postNum[0] = postService.listActivePost(null).size(); postNum[1] = postService.listSolvedPost(null).size(); postNum[2] = postService.listHotPost(null).size(); PageBean page = new PageBean(); page.setPageSize(10); newReplyColl = replyService.listReply(page); }