fix(community): 修复社区发布数量统计错误

feature/admin
yang 2025-04-26 14:50:24 +08:00
parent 31b5a89329
commit 01b4f6c535
1 changed files with 6 additions and 8 deletions

View File

@ -53,14 +53,12 @@
<select id="selectCommunityPublishNum" resultMap="CommunityPublishNumMap">
select p.community_id as id, COALESCE(count(*), 0) as publish_num
from cc_community c
join cc_publish p on c.id = p.community_id
join cc_question q on c.id = q.community_id
where c.del_flag = '0'
and p.del_flag = '0'
and q.del_flag = '0'
group by p.community_id
SELECT p.community_id AS id, COALESCE(count(p.id), 0) AS publish_num
FROM cc_community c
JOIN cc_publish p ON c.id = p.community_id and c.tenant_id = p.tenant_id
WHERE c.del_flag = '0'
AND p.del_flag = '0'
GROUP BY p.community_id
</select>
<select id="selectPageByCommunityTag" resultType="com.mcwl.communityCenter.domain.Community">
select