文章管理点击量查询逻辑更改
This commit is contained in:
parent
52f2ceaa49
commit
34922c2bc9
|
|
@ -508,7 +508,7 @@ 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) {
|
if (countJsonMap != null && countJsonMap.size() > 0) {
|
||||||
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 {
|
} else {
|
||||||
|
|
@ -517,7 +517,7 @@ public class ArticleServiceImpl implements ArticleService {
|
||||||
} else {
|
} else {
|
||||||
publishedArticleInfo.setVisitorCount(clickTotal);
|
publishedArticleInfo.setVisitorCount(clickTotal);
|
||||||
}
|
}
|
||||||
if (countJsonMap != null) {
|
if (countJsonMap != null && countJsonMap.size() > 0) {
|
||||||
publishedArticleInfo.setShareCount(countJsonMap.get("sharedCount"));
|
publishedArticleInfo.setShareCount(countJsonMap.get("sharedCount"));
|
||||||
} else {
|
} else {
|
||||||
publishedArticleInfo.setShareCount("0");
|
publishedArticleInfo.setShareCount("0");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue