文章管理点击量查询逻辑更改

This commit is contained in:
zkr_liushenlu 2021-04-05 18:27:00 +08:00
parent 52f2ceaa49
commit 34922c2bc9
1 changed files with 2 additions and 2 deletions

View File

@ -508,7 +508,7 @@ public class ArticleServiceImpl implements ArticleService {
Map<String, String> countJsonMap = rManager.hGetAll("company_articleInfo_Id" + articleId);
String clickTotal = rManager.query("company_clickTotal_articleId" + articleId);
if (StringUtils.isBlank(clickTotal)) {
if (countJsonMap != null) {
if (countJsonMap != null && countJsonMap.size() > 0) {
rManager.save("company_clickTotal_articleId" + articleId, countJsonMap.get("visitorCount"));
publishedArticleInfo.setVisitorCount(countJsonMap.get("visitorCount"));
} else {
@ -517,7 +517,7 @@ public class ArticleServiceImpl implements ArticleService {
} else {
publishedArticleInfo.setVisitorCount(clickTotal);
}
if (countJsonMap != null) {
if (countJsonMap != null && countJsonMap.size() > 0) {
publishedArticleInfo.setShareCount(countJsonMap.get("sharedCount"));
} else {
publishedArticleInfo.setShareCount("0");