1、优化帖子阅读计数,让帖子阅读数更准确
2、更新最新redkale-plugins.jar,加入redis验权
This commit is contained in:
@@ -2,7 +2,6 @@ package com.lxyer.bbs.servlet;
|
||||
|
||||
import com.jfinal.kit.Kv;
|
||||
import com.lxyer.bbs.base.BaseServlet;
|
||||
import com.lxyer.bbs.base.user.UserRecord;
|
||||
import com.lxyer.bbs.comment.CommentInfo;
|
||||
import com.lxyer.bbs.content.ContentInfo;
|
||||
import org.redkale.net.http.*;
|
||||
@@ -10,9 +9,6 @@ import org.redkale.source.FilterNode;
|
||||
import org.redkale.source.Flipper;
|
||||
import org.redkale.util.Sheet;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import static org.redkale.source.FilterExpress.NOTEQUAL;
|
||||
|
||||
/**
|
||||
@@ -67,17 +63,6 @@ public class ContentServlet extends BaseServlet {
|
||||
Flipper flipper3 = new Flipper().limit(8).sort("replynum DESC");
|
||||
Sheet<ContentInfo> hotReply = contentService.contentQuery(flipper3, "", sessionid);
|
||||
|
||||
//更新
|
||||
CompletableFuture.supplyAsync(new Supplier<String>() {
|
||||
@Override
|
||||
public String get() {
|
||||
UserRecord user = request.currentUser();
|
||||
if (user == null || user.getRoleid() != 0)
|
||||
contentService.incrViewNum(contentid);
|
||||
return "";
|
||||
}
|
||||
});
|
||||
|
||||
Kv kv = Kv.by("bean", content).set("comments", comments)/*.set("hotView", hotView)*/.set("hotReply", hotReply);
|
||||
response.finish(HttpScope.refer("/jie/detail.html").attr(kv));
|
||||
}
|
||||
|
Reference in New Issue
Block a user