| | |
| | | |
| | | <select id="baseInfo" resultType="com.panzhihua.common.model.vos.community.bigscreen.BaseInfo"> |
| | | select count(id) as population, |
| | | IFNULL((select count(id) from com_mng_population_house where community_id = cmpct.community_id),0) as house, |
| | | IFNULL((select count(id) from com_mng_real_company where community_id = cmpct.community_id),0) as company, |
| | | IFNULL((select count(DISTINCT `name`) from com_mng_village where community_id = cmpct.community_id),0) as village, |
| | | IFNULL((select count(user_id) from sys_user where community_id = cmpct.community_id and type=1),0) as user, |
| | | IFNULL((select count(id) from com_pb_member where community_id = cmpct.community_id and audit_result =1 ),0) as partyMember, |
| | | IFNULL((select count(id) from com_mng_volunteer_mng where community_id = cmpct.community_id and state=2 ),0) as volunteer, |
| | | IFNULL((select count(id) from com_pb_org where community_id = cmpct.community_id and parent_id = 0),0) as partyOrg |
| | | IFNULL((select count(id) from com_mng_population_house where community_id = #{communityId}),0) as house, |
| | | IFNULL((select count(id) from com_mng_real_company where community_id = #{communityId}),0) as company, |
| | | IFNULL((select count(DISTINCT `name`) from com_mng_village where community_id = #{communityId}),0) as village, |
| | | IFNULL((select count(user_id) from sys_user where community_id = #{communityId} and type=1),0) as user, |
| | | IFNULL((select count(id) from com_pb_member where community_id = #{communityId} and audit_result =1 ),0) as partyMember, |
| | | IFNULL((select count(id) from com_mng_volunteer_mng where community_id = #{communityId} and state=2 ),0) as volunteer, |
| | | IFNULL((select count(id) from com_pb_org where community_id = #{communityId} and parent_id = 0),0) as partyOrg |
| | | from com_mng_population_community_tags AS cmpct |
| | | where cmpct.community_id = #{communityId} |
| | | </select> |
| | |
| | | <select id="indexDynamic" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexDynamic"> |
| | | |
| | | SELECT count( id ) AS microWish, |
| | | IFNULL(( SELECT count( id ) FROM com_act_activity WHERE community_id = camw.community_id AND volunteer_max = 0),0) AS residentActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_activity WHERE community_id = camw.community_id AND volunteer_max != 0),0) AS volunteerActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE status in (1,2,4) and del_tag = 0 AND community_id = camw.community_id ),0) AS easyPhoto, |
| | | IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE STATUS = 5 AND community_id = camw.community_id ),0) AS partyActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = camw.community_id and is_hide=0 ),0) AS questionnaire, |
| | | IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = camw.community_id AND STATUS = 1 ),0) AS dynamic, |
| | | IFNULL(( SELECT count( id ) FROM com_convenient_merchants WHERE (community_id = camw.community_id OR community_id = 0) AND is_del = 0 ),0) AS convenient, |
| | | IFNULL(( SELECT count( id ) FROM com_act_neighbor_circle WHERE community_id = camw.community_id AND is_del = 2 ),0) AS neighbor |
| | | IFNULL(( SELECT count( id ) FROM com_act_activity WHERE community_id = #{communityId} AND volunteer_max = 0),0) AS residentActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_activity WHERE community_id = #{communityId} AND volunteer_max != 0),0) AS volunteerActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE status in (1,2,4) and del_tag = 0 AND community_id = #{communityId} ),0) AS easyPhoto, |
| | | IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE STATUS = 5 AND community_id = #{communityId} ),0) AS partyActivity, |
| | | IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = #{communityId} and is_hide=0 ),0) AS questionnaire, |
| | | IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = #{communityId} AND STATUS = 1 ),0) AS dynamic, |
| | | IFNULL(( SELECT count( id ) FROM com_convenient_merchants WHERE ( community_id = #{communityId} OR community_id = 0) AND is_del = 0 ),0) AS convenient, |
| | | IFNULL(( SELECT count( id ) FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND is_del = 2 ),0) AS neighbor |
| | | FROM com_act_micro_wish AS camw WHERE camw.STATUS = 6 |
| | | AND camw.community_id = #{communityId} |
| | | </select> |