101captain
2021-12-08 b1a89d29922cf11bf90db06fa3d19a480851dcf8
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java
@@ -60,7 +60,7 @@
    @Select("<script> " + "  SELECT   " + " SUM(CASE TYPE WHEN 1 THEN total ELSE 0 END) as 'orgCount',  "
        + " SUM(CASE TYPE WHEN 2 THEN total ELSE 0 END) as 'memberCount',  "
        + " SUM(CASE TYPE WHEN 3 THEN total ELSE 0 END) as 'activityCount',  "
        + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount'  " + " FROM (  "
        + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount',SUM(CASE TYPE WHEN 5 THEN total ELSE 0 END) as 'committeeCount'  " + " FROM (  "
        + " SELECT 1 AS TYPE , COUNT(id) total  " + " FROM com_pb_org org   "
        + " WHERE org.community_id  = #{communityId} AND STATUS=1  " + " UNION ALL   "
        + " SELECT 2 AS TYPE , COUNT(id) total  " + " FROM  com_pb_member   "
@@ -68,7 +68,9 @@
        + " SELECT 3 AS TYPE , COUNT(id) total  " + " FROM  com_pb_activity  "
        + " WHERE community_id  = #{communityId} AND STATUS IN (2,3,4,5)  " + " UNION ALL   "
        + " SELECT 4 AS TYPE , COUNT(id) total  " + " FROM  com_pb_dyn   "
        + " WHERE community_id  = #{communityId} AND TYPE = 1  " + ") t" + "</script>")
        + " WHERE community_id  = #{communityId} AND TYPE = 1  UNION ALL " +
            "select 5 AS TYPE,count(id) total      from com_pb_member_role " +
            "where community_id =#{communityId}" + ") t" + "</script>")
    BigScreenStatisticPartyBuild partybuild(@Param("communityId") Long communityId);
    @Select("<script> " + " SELECT pm.id, pm.member_id, pm.user_id, pm.name, " + " case "