文章管理点击量查询逻辑更改
This commit is contained in:
parent
ea0708c095
commit
52f2ceaa49
|
|
@ -508,12 +508,20 @@ public class ArticleServiceImpl implements ArticleService {
|
||||||
Map<String, String> countJsonMap = rManager.hGetAll("company_articleInfo_Id" + articleId);
|
Map<String, String> countJsonMap = rManager.hGetAll("company_articleInfo_Id" + articleId);
|
||||||
String clickTotal = rManager.query("company_clickTotal_articleId" + articleId);
|
String clickTotal = rManager.query("company_clickTotal_articleId" + articleId);
|
||||||
if (StringUtils.isBlank(clickTotal)) {
|
if (StringUtils.isBlank(clickTotal)) {
|
||||||
|
if (countJsonMap != null) {
|
||||||
rManager.save("company_clickTotal_articleId" + articleId, countJsonMap.get("visitorCount"));
|
rManager.save("company_clickTotal_articleId" + articleId, countJsonMap.get("visitorCount"));
|
||||||
publishedArticleInfo.setVisitorCount(countJsonMap.get("visitorCount"));
|
publishedArticleInfo.setVisitorCount(countJsonMap.get("visitorCount"));
|
||||||
|
} else {
|
||||||
|
publishedArticleInfo.setVisitorCount("0");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
publishedArticleInfo.setVisitorCount(clickTotal);
|
publishedArticleInfo.setVisitorCount(clickTotal);
|
||||||
}
|
}
|
||||||
|
if (countJsonMap != null) {
|
||||||
publishedArticleInfo.setShareCount(countJsonMap.get("sharedCount"));
|
publishedArticleInfo.setShareCount(countJsonMap.get("sharedCount"));
|
||||||
|
} else {
|
||||||
|
publishedArticleInfo.setShareCount("0");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LOGGER.info("查询文章列表的业务层方法结束!");
|
LOGGER.info("查询文章列表的业务层方法结束!");
|
||||||
return articleList;
|
return articleList;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue