1、栏目页用户昵称点击跳转失败,栏目下帖子a标签中加入title属性

2、修改本周热贴,查询一周内访问量最多的帖子
This commit is contained in:
2018-07-03 22:10:43 +08:00
parent 624f4ec220
commit ed7ef7e507
15 changed files with 118 additions and 31 deletions

View File

@@ -60,10 +60,12 @@ public class ContentServlet extends BaseServlet {
//Sheet<ContentInfo> hotView = contentService.contentQuery(flipper2, "");
//热议
Flipper flipper3 = new Flipper().limit(8).sort("replynum DESC");
Sheet<ContentInfo> hotReply = contentService.contentQuery(flipper3, "", sessionid);
/*Flipper flipper3 = new Flipper().limit(8).sort("replynum DESC");
Sheet<ContentInfo> hotReply = contentService.contentQuery(flipper3, "", sessionid);*/
Kv kv = Kv.by("bean", content).set("comments", comments)/*.set("hotView", hotView)*/.set("hotReply", hotReply);
Sheet<ContentInfo> hotView = logQueue.hotView(sessionid);
Kv kv = Kv.by("bean", content).set("comments", comments).set("hotView", hotView)/*.set("hotReply", hotReply)*/;
response.finish(HttpScope.refer("/jie/detail.html").attr(kv));
}
@@ -87,11 +89,12 @@ public class ContentServlet extends BaseServlet {
Sheet<ContentInfo> contents = contentService.contentQuery(flipper, setPrivate(request,filterNode));
//热议
Flipper flipper3 = new Flipper().limit(8).sort("replynum DESC");
Sheet<ContentInfo> hotReply = contentService.contentQuery(flipper3, "", sessionid);
/*Flipper flipper3 = new Flipper().limit(8).sort("replynum DESC");
Sheet<ContentInfo> hotReply = contentService.contentQuery(flipper3, "", sessionid);*/
Sheet<ContentInfo> hotView = logQueue.hotView(sessionid);
Kv kv = Kv.by("contents", contents).set("hotReply", hotReply)
Kv kv = Kv.by("contents", contents).set("hotView", hotView)
.set("solved", solved).set("wonderful", wonderful)
.set("column", para).set("curr", curr);
response.finish(HttpScope.refer("/jie/index.html").attr(kv));

View File

@@ -41,8 +41,10 @@ public class IndexServlet extends BaseServlet {
Sheet<ContentInfo> hotView = contentService.contentQuery(flipper2, "");*/
//热议
Flipper flipper3 = new Flipper().limit(8).sort("replynum DESC");
Sheet<ContentInfo> hotReply = contentService.contentQuery(flipper3, "", sessionid);
/*Flipper flipper3 = new Flipper().limit(8).sort("replynum DESC");
Sheet<ContentInfo> hotReply = contentService.contentQuery(flipper3, "", sessionid);*/
Sheet<ContentInfo> hotView = logQueue.hotView(sessionid);
//最新加入
Sheet<UserInfo> lastReg = userService.lastReg();
@@ -50,7 +52,7 @@ public class IndexServlet extends BaseServlet {
//用户统计
Number userCount = userService.userCount();
Kv kv = Kv.by("top", top).set("contents", contents).set("hotReply", hotReply).set("lastReg", lastReg).set("userCount", userCount);
Kv kv = Kv.by("top", top).set("contents", contents).set("hotView", hotView).set("lastReg", lastReg).set("userCount", userCount);
response.finish(HttpScope.refer("index.html").attr(kv));
}