From bc3b37b1622091def1f6ee4c3eb3ff79499b3466 Mon Sep 17 00:00:00 2001 From: EricsHu <hrr145632> Date: 星期一, 19 六月 2023 10:19:14 +0800 Subject: [PATCH] 数据可视化 --- src/main/java/com/qxueyou/scc/operation/topic/service/impl/TopicService.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/qxueyou/scc/operation/topic/service/impl/TopicService.java b/src/main/java/com/qxueyou/scc/operation/topic/service/impl/TopicService.java index 6273da7..0a4c9d8 100644 --- a/src/main/java/com/qxueyou/scc/operation/topic/service/impl/TopicService.java +++ b/src/main/java/com/qxueyou/scc/operation/topic/service/impl/TopicService.java @@ -677,6 +677,7 @@ List<Map<String, Object>> topicLst = findListWithMapByHql(hql, hqlMap, new Pager(pageSize, pageNum)); + int sunCount=0; for (Map<String, Object> map : topicLst) { String topicId = (String) map.get("topicId"); String findPeopleCountByHql = "select distinct c.commentterId as commentterId from CommentObject o,Comment c where o.deleteFlag is false and o.commentObjectUid =:topicId and" @@ -684,10 +685,10 @@ List<Map<String, Object>> commentIdLst = findListWithMapByHql(findPeopleCountByHql, CollectionUtils.newObjectMap("topicId", topicId)); int peopleCount = commentIdLst.size();// 鍙備笌浜烘暟 + sunCount+=peopleCount; map.put("peopleCount", peopleCount); } - return new Result(true, "success", - CollectionUtils.newObjectMap("topicLst", topicLst, "topicCount", topicCount)); + return new Result(true, "success",CollectionUtils.newObjectMap("topicLst", topicLst, "topicCount", topicCount,"sunCount",sunCount)); } @Override -- Gitblit v1.8.0