puhanshu
2021-12-30 a7002e25ec105e5f73c27f91944f1c0b4991c355
Merge branch 'master' into test

# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
110个文件已修改
1576 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/MybatisHmkInterceptor.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/MybatisPlusConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussDAO.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComBpActivityDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtBusinessDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComExServicemanDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealAssetsDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVaccinesEnrollRecordDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVaccinesInoculationRecordDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVolunteerMngDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPbDynDAO.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EldersAuthDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAnnouncementMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActColumnMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActCommitteeMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussDOMapper.xml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynTypeDOMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoActivityDOMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml 194 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoRewardDOMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActFourMemberMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActIntegralRuleDOMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActIntegralUserDOMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActIntegralUserTradeDOMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishDOMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishOperationRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveRecordMapper.xml 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialOrgMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletDOMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletTradeDOMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseApplyMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseDonatesMapper.xml 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseOperationMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationDOMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationMemberDOMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthElderliesMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthRecordsMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthDOMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthElderlyMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthHistoryRecordMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthStatisticsMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngBuildingMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationCommunityTagsMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml 140 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPbMemberMapper.xml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthHistoryRecordDOMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthPensionerMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthRecordMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyPublicityMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwDangerReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwPatrolRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwRotaMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwSafetyWorkRecordMapper.xml 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientProductMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientServiceCategoryMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseOrderMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHoursePreOrderMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRegisterMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/SysConfMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/config/MybatisHmkInterceptor.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/config/MybatisPlusConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/ComActEasyPhotoMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridDataMapper.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberGpsLogMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberRelationMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberWarnLogMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml 78 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventVisitingTasksMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/config/MybatisHmkInterceptor.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/config/MybatisPlusConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComBpActivityDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbActivityMemberDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberRoleDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbOrgDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbServiceTeamDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmSettingMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyEquipmentMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyHelpMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/MybatisHmkInterceptor.java
@@ -1,66 +1,28 @@
package com.panzhihua.service_community.config;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.executor.statement.StatementHandler;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ParameterMapping;
import org.apache.ibatis.plugin.*;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.reflection.SystemMetaObject;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Component;
import java.lang.reflect.Field;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Intercepts({
        @Signature(type = StatementHandler.class, method = "query", args = {Statement.class, ResultHandler.class})
})
public class MybatisHmkInterceptor implements InnerInterceptor {
    @Override
    public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException {
        String sql=boundSql.getSql();
        if(parameter instanceof Long){
            if(sql.contains("community_id = ?")&&(long)parameter==10086){
                sql=sql.replace("community_id = ?","community_id in (?)");
                parameter="30,31";
                boundSql.setAdditionalParameter("communityId",parameter);
            if(sql.contains("community_id = 10086")){
                sql=sql.replace("community_id = 10086","community_id in (30,31)");
                PluginUtils.mpBoundSql(boundSql).sql(sql);
            }
        }
        if(parameter instanceof Map){
            List<ParameterMapping> parameterMappingList=new ArrayList<>();
            if(sql.contains("community_id = ?")&&((Map<?, ?>) parameter).containsValue(10086L)){
                List<ParameterMapping> parameterMappings=boundSql.getParameterMappings();
                parameterMappings.forEach(parameterMapping -> {
                    if (parameterMapping.getProperty().equals("communityId")){
                        ParameterMapping parameterMapping1=new ParameterMapping.Builder(ms.getConfiguration(),"communityId",Object.class).build();
                        parameterMappingList.add(parameterMapping1);
                    }
                    else {
                        parameterMappingList.add(parameterMapping);
                    }
                });
                sql=sql.replace("community_id = ?","community_id in (?)");
                ((Map<?,?>) parameter).replaceAll((k,v)->{
                    if(v.toString().equals("10086")){
                        boundSql.setAdditionalParameter(k.toString(),"30,31");
                    }
                    return v;
                });
                PluginUtils.mpBoundSql(boundSql).parameterMappings(parameterMappingList);
                PluginUtils.mpBoundSql(boundSql).sql(sql);
            }
        }
        InnerInterceptor.super.beforeQuery(executor, ms, parameter, rowBounds, resultHandler, boundSql);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/config/MybatisPlusConfig.java
@@ -24,8 +24,8 @@
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        interceptor.addInnerInterceptor(new MybatisHmkInterceptor());
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        return interceptor;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java
@@ -27,7 +27,7 @@
    @Select("<script> " + " SELECT org.id, org.name, COUNT(pm.id) as total " + " FROM com_pb_org  org "
        + " LEFT JOIN com_pb_member pm ON org.id = pm.org_id " + " <where> " + " org.status = 1 "
        + "<if test='pageDTO.communityId != null'>" + "  AND org.community_id = #{pageDTO.communityId} " + "</if> "
        + "<if test='pageDTO.communityId != null'>" + "  AND org.community_id = ${pageDTO.communityId} " + "</if> "
        + " </where>" + " GROUP BY org.id " +
        // " ORDER BY org.${pageDTO.sortBy} ${pageDTO.order} " +
        " ORDER BY total desc  " + "</script>")
@@ -42,7 +42,7 @@
        + "  when age &gt; 60  then '60以上' " + "  ELSE '' " + "  END AS lev " + " FROM ( "
        + "  SELECT id, id_card, ROUND(DATEDIFF(CURDATE(), STR_TO_DATE(SUBSTRING(id_card,7,15), '%Y%m%d'))/365.2422) AS age    "
        + "  FROM com_pb_member  " + " <where> " + " audit_result = 1 " + "<if test='queryDTO.communityId != null'> "
        + " AND  community_id = #{queryDTO.communityId} " + "</if> " + " </where>" + "  ) t     " + " )abt     "
        + " AND  community_id = ${queryDTO.communityId} " + "</if> " + " </where>" + "  ) t     " + " )abt     "
        + " GROUP BY abt.lev    " + " ) t2  " + "</script>")
    BigScreenStatisticAgeGender age(@Param("queryDTO") BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO);
@@ -52,7 +52,7 @@
        + "  FROM ( "
        + "  SELECT CONVERT(SUBSTRING(id_card,'17',1), UNSIGNED INTEGER)%2 AS sxi, COUNT(id_card) AS total "
        + "  FROM com_pb_member " + " <where> " + " audit_result = 1 " + "<if test='queryDTO.communityId != null'>"
        + "  AND community_id = #{queryDTO.communityId} " + "</if> " + " </where>" + "  GROUP BY sxi  " + "  )t  "
        + "  AND community_id = ${queryDTO.communityId} " + "</if> " + " </where>" + "  GROUP BY sxi  " + "  )t  "
        + " ) t2  " + "</script>")
    BigScreenStatisticAgeGender
        gender(@Param("queryDTO") BigScreenStatisticAgeGenderDTO bigScreenStatisticAgeGenderDTO);
@@ -62,15 +62,15 @@
        + " SUM(CASE TYPE WHEN 3 THEN total ELSE 0 END) as 'activityCount',  "
        + " 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   "
        + " WHERE org.community_id = ${communityId} AND STATUS=1  " + " UNION ALL   "
        + " SELECT 2 AS TYPE , COUNT(id) total  " + " FROM  com_pb_member   "
        + " WHERE community_id  = #{communityId} AND audit_result = 1  " + " UNION ALL   "
        + " WHERE community_id = ${communityId} AND audit_result = 1  " + " UNION ALL   "
        + " SELECT 3 AS TYPE , COUNT(id) total  " + " FROM  com_pb_activity  "
        + " WHERE community_id  = #{communityId} AND STATUS IN (2,3,4,5)  " + " UNION ALL   "
        + " 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  UNION ALL " +
        + " 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>")
            "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 "
@@ -80,7 +80,7 @@
        + " ,COUNT(pa.id) AS total   "
        + " FROM com_pb_activity_member  pm  LEFT JOIN com_pb_activity pa  ON pm.activity_id = pa.id  "
        + " LEFT JOIN com_pb_member me ON pm.member_id = me.id  "
        + " WHERE pa.community_id = #{communityId}  AND me.id IS NOT null  " + " GROUP BY pm.member_id  "
        + " WHERE pa.community_id = ${communityId}  AND me.id IS NOT null  " + " GROUP BY pm.member_id  "
        + " ORDER BY total DESC  " + " LIMIT 3  " + "</script>")
    List<PartyBuildingMemberVO> bigscreenPartyactivitytopuser(@Param("communityId") Long communityId);
@@ -88,7 +88,7 @@
        + " when photo_path IS NOT NULL then  photo_path  "
        + " when CAST(SUBSTRING(id_card , 17, 1) AS SIGNED)%2=1 then 'https://www.psciio.com/idcard/tst/idcard/a723e5bcbd594a48956ef9354c8b477c.jpg' "
        + " ELSE 'https://www.psciio.com/idcard/tst/idcard/cfb9b58913074068bba8c7002f91e7ff.jpg' END AS photo_path , "
        + " 0 AS total  " + " FROM  com_pb_member " + " WHERE community_id = #{communityId}  "
        + " 0 AS total  " + " FROM  com_pb_member " + " WHERE community_id = ${communityId}  "
        + " ORDER BY join_time ASC  " + " LIMIT 3  " + "</script>")
    List<PartyBuildingMemberVO> defaultPartyactivity(@Param("communityId") Long communityId);
@@ -99,7 +99,7 @@
        + " ORDER BY idxName " + ")m LEFT JOIN  " + "( " + "SELECT   "
        + " date_format(activity_time_begin, '%Y-%m') AS idxName, " + " COUNT(id) AS total "
        + " FROM com_pb_activity    " + " WHERE  "
        + " community_id = #{queryDTO.communityId}  AND STATUS IN ( 3, 4, 5 ) AND  "
        + " community_id = ${queryDTO.communityId}  AND STATUS IN ( 3, 4, 5 ) AND  "
        + " activity_time_begin &lt; DATE_FORMAT( DATE_ADD( STR_TO_DATE(#{queryDTO.date}, '%Y-%m-%d'), INTERVAL 1 MONTH ), '%Y-%m-%d' ) AND "
        + " activity_time_begin &gt; DATE_FORMAT( DATE_ADD( STR_TO_DATE(#{queryDTO.date}, '%Y-%m-%d'), INTERVAL - 12 MONTH ), '%Y-%m-%d')  "
        + " GROUP BY idxName " + " ORDER BY idxName ASC   " + " ) d ON m.idxName = d.idxName "
@@ -113,7 +113,7 @@
        + "  ( SELECT @cdate := date_add( #{queryDTO.endTime}, INTERVAL 1 DAY ) FROM com_pb_activity LIMIT 7 ) d  "
        + " ORDER BY " + "  idxName  " + " ) m " + " LEFT JOIN ( " + " SELECT "
        + "  date_format( activity_time_begin, '%Y-%m-%d' ) AS idxName, " + "  COUNT( id ) AS total  " + " FROM "
        + "  com_pb_activity  " + " WHERE " + "  community_id = #{queryDTO.communityId}  "
        + "  com_pb_activity  " + " WHERE " + "  community_id = ${queryDTO.communityId}  "
        + "  AND STATUS IN ( 3, 4, 5 )  "
        + "  AND activity_time_begin &lt; DATE_FORMAT( STR_TO_DATE( #{queryDTO.startTime}, '%Y-%m-%d' ), '%Y-%m-%d' )  "
        + "  AND activity_time_begin &gt; DATE_FORMAT( STR_TO_DATE( #{queryDTO.endTime}, '%Y-%m-%d' ), '%Y-%m-%d' )  "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -50,7 +50,7 @@
        + "left join sys_user u on a.sponsor_id=u.user_id " + "left join (select * from com_act_act_sign where `status` = 1) s on a.id=s.activity_id  "
        + "left join com_act ca on a.community_id=ca.community_id  " + " where 1=1 " +
        "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id = #{comActActivityVO.communityId} " + " </if> "
        "<if test='comActActivityVO.choice == 0 '>" + "AND a.community_id = ${comActActivityVO.communityId} " + " </if> "
        +
        "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName.trim() != &quot;&quot;'>"
@@ -119,7 +119,7 @@
//        + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, " + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM "
//        + " com_act_activity a  " + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id "
//        + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id " + "WHERE "
//        + "  a.`status` = 1 and a.community_id = #{comActActivityVO.communityId} "
//        + "  a.`status` = 1 and a.community_id = ${comActActivityVO.communityId} "
//        + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=&quot;&quot;'>"
//        + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' )  " + " </if> "
//        + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 and comActActivityVO.status !=1'>"
@@ -131,7 +131,7 @@
//        + "count(if(s.is_volunteer=1,s.id,null))volunteer_now, " + "a.`status`, " + "a.publish_at, " + "a.is_qr_code, " + "a.begin_at, "
//        + "a.end_at, " + "a.sign_up_begin, " + "a.sign_up_end " + "FROM " + " com_act_activity a  "
//        + " LEFT JOIN sys_user u on a.sponsor_id=u.user_id " + " LEFT JOIN com_act_act_sign s on a.id=s.activity_id "
//        + "WHERE " + "  a.`status` != 1 and a.community_id = #{comActActivityVO.communityId} "
//        + "WHERE " + "  a.`status` != 1 and a.community_id = ${comActActivityVO.communityId} "
//        + "<if test='comActActivityVO.activityName != null and comActActivityVO.activityName !=&quot;&quot;'>"
//        + " and a.activity_name LIKE concat( #{comActActivityVO.activityName}, '%' )  " + " </if> "
//        + "<if test='comActActivityVO.status != null and comActActivityVO.status !=0 '>"
@@ -153,37 +153,37 @@
    int updateStatusToBeginAfterSingEnd();
    @Select("select GROUP_CONCAT(t.x1,',',t.x2,',',t.x3,',',t.x4) from ( " + "SELECT "
        + "(select COUNT(d.id) from com_act_discuss d where  d.community_id = #{communityId})x1, "
        + "(select COUNT(w.id) from com_act_micro_wish w where  w.community_id = #{communityId})x2, "
        + "(select COUNT(p.id) from com_act_easy_photo p where  p.community_id = #{communityId})x3, "
        + " COUNT( a.id ) x4 " + "FROM " + " com_pb_activity a  " + "WHERE " + "  a.community_id =#{communityId})t")
        + "(select COUNT(d.id) from com_act_discuss d where  d.community_id = ${communityId})x1, "
        + "(select COUNT(w.id) from com_act_micro_wish w where  w.community_id = ${communityId})x2, "
        + "(select COUNT(p.id) from com_act_easy_photo p where  p.community_id = ${communityId})x3, "
        + " COUNT( a.id ) x4 " + "FROM " + " com_pb_activity a  " + "WHERE " + "  a.community_id = ${communityId})t")
    String selectCommunityGovernanceTrendsVO(Long communityId);
    @Select(" " + " SELECT "
        + " (select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id = #{communityId})discuss, "
        + " (select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id = #{communityId})microWish, "
        + " (select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id = #{communityId})eashPhoto, "
        + " (select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id = #{communityId})pbActivity, "
        + " (select COUNT(d.id) from com_act_discuss d where DATE_FORMAT(d.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and d.community_id = ${communityId})discuss, "
        + " (select COUNT(w.id) from com_act_micro_wish w where DATE_FORMAT(w.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and w.community_id = ${communityId})microWish, "
        + " (select COUNT(p.id) from com_act_easy_photo p where DATE_FORMAT(p.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and p.community_id = ${communityId})eashPhoto, "
        + " (select COUNT(pa.id) from com_pb_activity pa where DATE_FORMAT(pa.create_at,'%Y-%m-%d')=DATE_FORMAT(#{date},'%Y-%m-%d') and pa.community_id = ${communityId})pbActivity, "
        + "  COUNT( a.id ) actActivity " + " FROM " + "  com_pb_activity a  " + " WHERE "
        + "  DATE_FORMAT( a.create_at, '%Y-%m-%d' )=DATE_FORMAT(#{date},'%Y-%m-%d')  "
        + "  AND a.community_id =#{communityId}")
        + "  AND a.community_id = ${communityId}")
    CommunityActivitiesVO selectCommunityActivitiesVO(@Param("communityId") Long communityId, @Param("date") Date date);
    @Select("SELECT " + " count( caa.id ) as totalNum, "
        + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min = 0 and community_id = #{communityId}) as commonNum, "
        + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min > 0 and community_id = #{communityId}) as volunteerNum, "
        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = #{communityId}) as commonPeopleNum, "
        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = #{communityId}) as volunteerPeopleNum, "
        + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and community_id = #{communityId} and create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now()) as currentNum "
        + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min = 0 and community_id = ${communityId}) as commonNum, "
        + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min > 0 and community_id = ${communityId}) as volunteerNum, "
        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = ${communityId}) as commonPeopleNum, "
        + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = ${communityId}) as volunteerPeopleNum, "
        + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and community_id = ${communityId} and create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now()) as currentNum "
        + "FROM " + " com_act_activity AS caa  " + "WHERE "
        + " caa.`status` IN (1,2,3,4,5) and community_id = #{communityId}")
        + " caa.`status` IN (1,2,3,4,5) and community_id = ${communityId}")
    Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate);
    @Select("SELECT id,activity_name as content,IF(volunteer_max = 0,'居民活动','志愿者活动') AS typeName  FROM com_act_activity "
        + "WHERE community_id = #{communityId} AND (status = 3 OR status = 4 OR status = 5) ORDER BY create_at DESC LIMIT #{pageSize}")
        + "WHERE community_id = ${communityId} AND (status = 3 OR status = 4 OR status = 5) ORDER BY create_at DESC LIMIT #{pageSize}")
    List<CarouselInfoVO> screenActivity(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    @Select("SELECT cover FROM com_act_activity WHERE community_id = #{communityId}")
    @Select("SELECT cover FROM com_act_activity WHERE community_id = ${communityId}")
    List<String> listImg(@Param("communityId") Long communityId);
    @Select("<script> " + "SELECT " + " caa.id, " + " su.`name` AS userName , " + " su.image_url, "
@@ -193,7 +193,7 @@
        + " caa.content, " + " caa.activity_addr  " + "FROM " + " com_act_activity AS caa "
        + " LEFT JOIN sys_user AS su ON su.user_id = caa.sponsor_id" + " <where> "
        + "<if test='actActivityListDTO.communityId != null '>"
        + " and caa.community_id = #{actActivityListDTO.communityId} " + " </if> "
        + " and caa.community_id = ${actActivityListDTO.communityId} " + " </if> "
        + "<if test='actActivityListDTO.startTime!=null and actActivityListDTO.startTime != &quot;&quot;'>"
        + " AND DATE_FORMAT(caa.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{actActivityListDTO.startTime} "
        + " </if> " + "<if test='actActivityListDTO.endTime!=null and actActivityListDTO.endTime != &quot;&quot;'>"
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
@@ -59,7 +59,7 @@
        + " order by a.create_at desc" + "</script>")
    IPage<ComActVO> pageCommunity(Page page, @Param("pageComActDTO") PageComActDTO pageComActDTO);
    @Update("update sys_user u set u.password=#{password} where u.account=#{account} and u.type=3 and u.community_id = #{communityId}")
    @Update("update sys_user u set u.password=#{password} where u.account=#{account} and u.type=3 and u.community_id = ${communityId}")
    void updateAccountPassword(@Param("password") String password, @Param("account") String account,
        @Param("communityId") Long communityId);
@@ -70,7 +70,7 @@
        + "left join com_mng_struct_area_province as cmsap on cmsap.province_adcode = ca.province_code\n"
        + "left join com_mng_struct_area_city as cmsac on cmsac.city_adcode = ca.city_code\n"
        + "left join com_mng_struct_area_district as cmsad on cmsad.district_adcode = ca.area_code\n"
        + "left join com_street as cs on cs.street_id = ca.street_id\n" + "where ca.community_id = #{communityId}")
        + "left join com_street as cs on cs.street_id = ca.street_id\n" + "where ca.community_id = ${communityId}")
    ComPopulationActVO getPopulationActById(@Param("communityId") Long communityId);
    @Select("select `name`,street_id from com_street where area_code = '510423'")
@@ -95,6 +95,6 @@
    @Select("select community_id,name,lng,lat from com_act  where state = 0 and area_code = '510423' ")
    List<EventGridCommunityAdminVO> getWestCommunityLists();
    @Select("select account,plaintext_password as password from com_act where community_id = #{communityId}")
    @Select("select account,plaintext_password as password from com_act where community_id = ${communityId}")
    ComActPasswordVo getCommunityPassword(@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussDAO.java
@@ -49,7 +49,7 @@
//        + "COUNT( DISTINCT c.id ) commentNum, " + "u.name userName, " + "u.nick_name userNickName, " + "d.create_at  "
//        + "FROM " + "com_act_discuss d " + "JOIN sys_user u ON d.user_id = u.user_id "
//        + "LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id  "
//        + " where d.community_id = #{pageComActDiscussDTO.communityId}"
//        + " where d.community_id = ${pageComActDiscussDTO.communityId}"
//        + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != &quot;&quot;'>"
//        + " and d.`discuss_subject` LIKE concat( #{pageComActDiscussDTO.subject}, '%' )  " + " </if> "
//        + "<if test='pageComActDiscussDTO.begin != null '>" + "AND d.create_at BETWEEN #{pageComActDiscussDTO.begin}  "
@@ -107,7 +107,7 @@
//        + "LEFT JOIN com_act_discuss_user du ON d.id = du.discuss_id  "
//        + "<if test='pageComActDiscussDTO.loginUserId != null '>"
//        + "LEFT JOIN com_act_discuss_option_user ou on do.id=ou.discuss_option_id and ou.user_id=#{pageComActDiscussDTO.loginUserId} "
//        + " </if> " + " where d.community_id = #{pageComActDiscussDTO.communityId}" + " and d.is_del = 2"
//        + " </if> " + " where d.community_id = ${pageComActDiscussDTO.communityId}" + " and d.is_del = 2"
//        + "<if test='pageComActDiscussDTO.type != null '>"
//        + " and d.`type` = #{pageComActDiscussDTO.type}  " + " </if> "
//        + "<if test='pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != &quot;&quot;'>"
@@ -142,7 +142,7 @@
    IPage<ComActDiscussCommentVO> pageDiscussCommentApplets(Page page,
        @Param("pageComActDiscussCommentDTO") PageComActDiscussCommentDTO pageComActDiscussCommentDTO);
    @Select("select name,address from com_act where community_id = #{communityId}")
    @Select("select name,address from com_act where community_id = ${communityId}")
    ComActVO selectCommunity(Long communityId);
    @Select("SELECT  " + "if(du.id is not null,1,0)haveSign, " + "if(ou.id is not null,1,0)haveVote " + "FROM "
@@ -156,13 +156,13 @@
    Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("date") String date);
    @Select(" SELECT id,discuss_subject AS content,IF(type = 1,'图文','投票') AS typeName FROM com_act_discuss WHERE community_id = #{communityId} ORDER BY create_at DESC LIMIT #{pageSize}")
    @Select(" SELECT id,discuss_subject AS content,IF(type = 1,'图文','投票') AS typeName FROM com_act_discuss WHERE community_id = ${communityId} ORDER BY create_at DESC LIMIT #{pageSize}")
    List<CarouselInfoVO> screenDiscuss(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    @Select("<script> " + "SELECT " + " cad.id, " + " su.nick_name AS userName, " + " su.image_url, "
        + " cad.create_at, " + " cad.type, " + " cad.discuss_subject, " + " cad.photo_pah  " + "FROM "
        + " com_act_discuss AS cad " + " LEFT JOIN sys_user AS su ON su.user_id = cad.user_id  " + " <where> "
        + "<if test='discussListDTO.communityId != null '>" + " and cad.community_id = #{discussListDTO.communityId} "
        + "<if test='discussListDTO.communityId != null '>" + " and cad.community_id = ${discussListDTO.communityId} "
        + " </if> " + "<if test='discussListDTO.startTime!=null and discussListDTO.startTime != &quot;&quot;'>"
        + " AND DATE_FORMAT(cad.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{discussListDTO.startTime} "
        + " </if> " + "<if test='discussListDTO.endTime!=null and discussListDTO.endTime != &quot;&quot;'>"
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java
@@ -32,7 +32,7 @@
        + "FROM " + "com_act_dyn d " + "LEFT JOIN ( select dyn_id,count(id) as readNum from com_act_dyn_user GROUP BY dyn_id  )  u ON d.id = u.dyn_id  "
        + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type  "
        + "LEFT JOIN com_act ca ON d.community_id = ca.community_id  " + "WHERE 1=1  "
        + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = #{comActDynVO.communityId} " + " </if> "
        + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = ${comActDynVO.communityId} " + " </if> "
        + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != &quot;&quot;'>"
        + "AND d.title like concat(#{comActDynVO.title},'%')   " + " </if> "
        + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping}  " + " </if> "
@@ -51,7 +51,7 @@
        + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id  "
        + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type  "
        + "LEFT JOIN com_act ca ON d.community_id = ca.community_id  " + "WHERE  "
        + "d.community_id = #{comActDynVO.communityId} "
        + "d.community_id = ${comActDynVO.communityId} "
        + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != &quot;&quot;'>"
        + "AND d.title like concat(#{comActDynVO.title},'%')   " + " </if> "
        + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping}  " + " </if> "
@@ -63,16 +63,16 @@
    IPage<ComActDynVO> pageDynamicByAdmin(Page page, @Param("comActDynVO") ComActDynVO comActDynVO);
    @Select("SELECT " + " count( cad.id ) AS dynTotal, "
        + " (select count(id) from com_act_dyn where community_id = #{communityId} and create_at LIKE CONCAT(#{nowDate},'%')) as currentNum "
        + "FROM " + " com_act_dyn AS cad  " + "WHERE " + " community_id = #{communityId}")
        + " (select count(id) from com_act_dyn where community_id = ${communityId} and create_at LIKE CONCAT(#{nowDate},'%')) as currentNum "
        + "FROM " + " com_act_dyn AS cad  " + "WHERE " + " community_id = ${communityId}")
    Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate);
    @Select("select create_at as startTime,(select create_at from com_act_dyn where community_id = #{communityId} order by create_at desc LIMIT 1 ) as endTime from com_act_dyn where community_id = #{communityId} order by create_at asc LIMIT 1")
    @Select("select create_at as startTime,(select create_at from com_act_dyn where community_id = ${communityId} order by create_at desc LIMIT 1 ) as endTime from com_act_dyn where community_id = ${communityId} order by create_at asc LIMIT 1")
    DateScreenVO countByAvgCommunityId(@Param("communityId") Long communityId);
    @Select("SELECT "
        + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = #{communityId} AND create_at < #{end}) AS dynTotal, "
        + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = #{communityId} AND #{start} < create_at AND create_at < #{end}) AS dynAdd "
        + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = ${communityId} AND create_at < #{end}) AS dynTotal, "
        + "(SELECT COUNT(id) FROM com_act_dyn WHERE community_id = ${communityId} AND #{start} < create_at AND create_at < #{end}) AS dynAdd "
        + " FROM DUAL")
    DynamicWorkVO countByTime(@Param("start") String start, @Param("end") String end,
        @Param("communityId") Long communityId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -77,7 +77,7 @@
            " </if> " +
            "where p.del_tag = 0 and p.status !=2"+
            "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" +
            "  and p.community_id = #{comActEasyPhotoVO.communityId} " +
            "  and p.community_id = ${comActEasyPhotoVO.communityId} " +
            " </if> " +
            "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != &quot;&quot;'>" +
            "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%')   " +
@@ -149,7 +149,7 @@
            "and p.handler_id=#{comActEasyPhotoVO.backUserId}"+
            " </if> " +
            "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" +
            "  and p.community_id = #{comActEasyPhotoVO.communityId} " +
            "  and p.community_id = ${comActEasyPhotoVO.communityId} " +
            " </if> " +
            "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != &quot;&quot;'>" +
            "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%')   " +
@@ -232,7 +232,7 @@
            "FROM " +
            " com_act_easy_photo p  " +
            "WHERE " +
            " p.del_tag = 0 and p.community_id = #{communityId}  " +
            " p.del_tag = 0 and p.community_id = ${communityId}  " +
            "AND p.STATUS = 1  "+
            " " +
            "union all  " +
@@ -242,7 +242,7 @@
            "FROM " +
            "  com_act_easy_photo p  " +
            "WHERE " +
            " p.del_tag = 0 and p.community_id = #{communityId}  " +
            " p.del_tag = 0 and p.community_id = ${communityId}  " +
            "AND p.`status` = 2 and p.is_need_feed_back=1 and p.handler_id=#{userId} "
            )
    List<TodoEventsVO> selectNeedToDo(@Param("communityId") Long communityId, @Param("userId") Long userId);
@@ -283,7 +283,7 @@
            " <where>" +
            " p.del_tag = 0 "  +
            "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" +
            "  and p.community_id = #{comActEasyPhotoVO.communityId} " +
            "  and p.community_id = ${comActEasyPhotoVO.communityId} " +
            " </if> " +
            "<if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' >" +
            "AND p.`status` = #{comActEasyPhotoVO.status}  " +
@@ -305,17 +305,17 @@
    IPage<ComActEasyPhotoVO> pageEasyPhotoApplets(Page page, @Param("comActEasyPhotoVO")ComActEasyPhotoVO comActEasyPhotoVO);
    @Select("SELECT t.name,COUNT(p.id) as num FROM com_act_easy_photo_type t LEFT JOIN com_act_easy_photo_type_relation r ON  t.id = r.easy_type_id " +
            "LEFT JOIN com_act_easy_photo p ON r.easy_id = p.id AND p.handle_status = 1 AND p.community_id = #{communityId} " +
            "LEFT JOIN com_act_easy_photo p ON r.easy_id = p.id AND p.handle_status = 1 AND p.community_id = ${communityId} " +
            "GROUP BY t.name ")
    List<EastPhotoTypeVO> countDeal(@Param("communityId")Long communityId);
    @Select("SELECT t.name,COUNT(p.id) as num FROM com_act_easy_photo_type t LEFT JOIN com_act_easy_photo_type_relation r ON  t.id = r.easy_type_id " +
            "LEFT JOIN com_act_easy_photo p ON r.easy_id = p.id AND p.is_publicity = 1 AND p.community_id = #{communityId} " +
            "LEFT JOIN com_act_easy_photo p ON r.easy_id = p.id AND p.is_publicity = 1 AND p.community_id = ${communityId} " +
            "GROUP BY t.name ")
    List<EastPhotoTypeVO> countPub(@Param("communityId")Long communityId);
    @Select("SELECT t.name,COUNT(p.id) as num FROM com_act_easy_photo_type t LEFT JOIN com_act_easy_photo_type_relation r ON  t.id = r.easy_type_id " +
            "LEFT JOIN com_act_easy_photo p ON r.easy_id = p.id AND p.status = 4 where p.community_id = #{communityId} " +
            "LEFT JOIN com_act_easy_photo p ON r.easy_id = p.id AND p.status = 4 where p.community_id = ${communityId} " +
            "GROUP BY t.name ")
    List<EastPhotoTypeVO> countApproved(@Param("communityId")Long communityId);
@@ -324,28 +324,28 @@
            "SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = 2 AND create_at LIKE concat(#{nowDate},'%') " +
            ") AS currentNum," +
            "(" +
            "(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND STATUS = 4 AND handle_status = 2)*100/(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND handle_status = 2) " +
            "(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND STATUS = 4 AND handle_status = 2)*100/(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND handle_status = 2) " +
            ") AS pubPoint," +
            "(SELECT AVG(TIMESTAMPDIFF(HOUR,create_at,feedback_at))  FROM com_act_easy_photo WHERE community_id = #{communityId} and handle_status = 2 ) AS dealTime " +
            "FROM com_act_easy_photo where community_id = #{communityId}")
            "(SELECT AVG(TIMESTAMPDIFF(HOUR,create_at,feedback_at))  FROM com_act_easy_photo WHERE community_id = ${communityId} and handle_status = 2 ) AS dealTime " +
            "FROM com_act_easy_photo where community_id = ${communityId}")
    Map<String, Object> countByCommunityId(@Param("communityId")Long communityId,@Param("nowDate") String nowDate);
    @Select("SELECT COUNT(id) AS total, " +
            "(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND #{start} < create_at and create_at < #{end} ) AS adds, " +
            "(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id =#{communityId} AND handle_status = 2 AND #{start} < create_at and create_at < #{end}) AS deal " +
            "FROM com_act_easy_photo WHERE community_id = #{communityId} AND #{start} < create_at and create_at < #{end} ")
            "(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND #{start} < create_at and create_at < #{end} ) AS adds, " +
            "(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND handle_status = 2 AND #{start} < create_at and create_at < #{end}) AS deal " +
            "FROM com_act_easy_photo WHERE community_id = ${communityId} AND #{start} < create_at and create_at < #{end} ")
    EastPhotoVO countByTime(@Param("start")String start, @Param("end")String end, @Param("nowDate")String nowDate, @Param("communityId")Long communityId);
//    @Select("SELECT " +
//            " count( id ) AS examineNum, " +
//            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 2 AND community_id = #{communityId} and del_tag = 0 ) AS verificationNum, " +
//            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 3 AND community_id = #{communityId} and del_tag = 0 ) AS rejectNum, " +
//            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 4 AND community_id = #{communityId} and del_tag = 0 ) AS completeNum  " +
//            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 2 AND community_id = ${communityId} and del_tag = 0 ) AS verificationNum, " +
//            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 3 AND community_id = ${communityId} and del_tag = 0 ) AS rejectNum, " +
//            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 4 AND community_id = ${communityId} and del_tag = 0 ) AS completeNum  " +
//            "FROM " +
//            " com_act_easy_photo  " +
//            "WHERE " +
//            " `status` = 1  " +
//            " AND community_id = #{communityId} and del_tag = 0")
//            " AND community_id = ${communityId} and del_tag = 0")
    ComActEasyPhotoStatisticsVO getEasyPhotoStatistics(@Param("communityId")Long communityId);
    ComActEasyPhotoCountVO easyPhotoCount(ComActEasyPhotoVO comActEasyPhotoVO);
    List<ExportEasyPhotoVO> export(ExportEasyPhotoDTO exportEasyPhotoDTO);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMessageDAO.java
@@ -52,7 +52,7 @@
        + "SELECT t.id,t.msg_content,t.photo_pah,t.phone,t.sendto_user_id,t.sendto_user_name,t.status,t.ispublic,"
        + "t.user_id,t.user_account,t.user_name,t.user_phone,t.community_id,t.create_at,t.type, u.phone as userAccount \n"
        + "FROM \n" + " com_act_message t LEFT JOIN sys_user u ON t.user_id = u.user_id "
        + " where t.community_id = #{comActMessageVO.communityId}\n"
        + " where t.community_id = ${comActMessageVO.communityId}\n"
        + "<if test='comActMessageVO.userAccount != null and comActMessageVO.userAccount.trim() != &quot;&quot;'>"
        + " and u.phone=#{comActMessageVO.userAccount} \n" + " </if> "
        + "<if test='comActMessageVO.userName != null and comActMessageVO.userName.trim() != &quot;&quot;'>"
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java
@@ -68,7 +68,7 @@
            " </if> " +
            " <where>" +
            "<if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>" +
            " and w.community_id = #{comActMicroWishVO.communityId}  " +
            " and w.community_id = ${comActMicroWishVO.communityId}  " +
            " </if> " +
            "<if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone.trim() != &quot;&quot;'>" +
            "AND w.sponsor_phone like concat(#{comActMicroWishVO.sponsorPhone},'%')   " +
@@ -166,7 +166,7 @@
            "FROM " +
            "com_act_micro_wish w  " +
            "WHERE " +
            "w.community_id = #{communityId}  " +
            "w.community_id = ${communityId}  " +
            "AND w.`status` = 1 " +
            " " +
            "union all  " +
@@ -176,7 +176,7 @@
            "FROM " +
            " com_act_micro_wish w  " +
            "WHERE " +
            " w.community_id = #{communityId}  " +
            " w.community_id = ${communityId}  " +
            " AND w.`status` = 3  " +
            " AND w.form = 1  " +
            " AND w.responsible_id = #{userId}  " +
@@ -191,12 +191,12 @@
    List<Long> getWishAutoConfirmIds();
    @Select("SELECT COUNT(id) AS completedNum," +
            "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5)) AS willNum ," +
            "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " +
            "FROM com_act_micro_wish WHERE community_id = #{communityId} AND status = 6 ")
            "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = ${communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5)) AS willNum ," +
            "(SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = ${communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum " +
            "FROM com_act_micro_wish WHERE community_id = ${communityId} AND status = 6 ")
    Map<String, Long> countByCommunityId(@Param("communityId") Long communityId,@Param("nowDate") String nowDate);
    @Select("SELECT photo_path_list FROM com_act_micro_wish WHERE community_id = #{communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) ORDER BY create_at DESC limit #{pageSize}")
    @Select("SELECT photo_path_list FROM com_act_micro_wish WHERE community_id = ${communityId} AND (status =1 OR status =2 OR status = 3 OR status = 5 OR status = 6) ORDER BY create_at DESC limit #{pageSize}")
    List<String> getAllImgs(@Param("communityId") Long communityId,@Param("pageSize") Integer pageSize);
    @Select("<script> " +
@@ -227,7 +227,7 @@
            "AND camw.`status` =#{microListDTO.status}  " +
            " </if> " +
            "<if test='microListDTO.communityId != null'>" +
            "AND camw.community_id =#{microListDTO.communityId}  " +
            "AND camw.community_id = ${microListDTO.communityId}  " +
            " </if> " +
            "<if test='microListDTO.startTime!=null and microListDTO.startTime != &quot;&quot;'>" +
            " AND DATE_FORMAT(camw.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{microListDTO.startTime} " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -68,50 +68,50 @@
        + " where reply.comment_id = #{commentId} and reply.status = 1")
    IPage<ComActNeighborCommentReplyAppVO> neighborCommentReplyByApp(Page page, @Param("commentId") Long commentId);
    @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id =#{communityId} and status = 2 ORDER BY create_at DESC limit #{pageSize}")
    @Select("SELECT id,release_content as content FROM com_act_neighbor_circle WHERE community_id = ${communityId} and status = 2 ORDER BY create_at DESC limit #{pageSize}")
    List<CarouselInfoVO> screenNeighborCircle(@Param("communityId") Long communityId,
        @Param("pageSize") Integer pageSize);
    @Select(" SELECT COUNT(id) AS totalNum,"
        + " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE  community_id = #{communityId} AND status = 2 AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum "
        + "  FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND status = 2")
        + " (SELECT COUNT(id) FROM com_act_neighbor_circle WHERE  community_id = ${communityId} AND status = 2 AND create_at LIKE CONCAT(#{nowDate},'%')) AS currentNum "
        + "  FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND status = 2")
    Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate);
    @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE  community_id = #{communityId} and status = 2 ")
    @Select("SELECT SUM(comment_num) as commentNum,SUM(fabulous_num) as fabulousNum,SUM(forward_num) as forwardNum FROM com_act_neighbor_circle WHERE  community_id = ${communityId} and status = 2 ")
    Map<String, Object> sumScreenNum(@Param("communityId") Long communityId);
    @Select("SELECT release_images FROM com_act_neighbor_circle WHERE  community_id = #{communityId} and status = 2 order by create_at desc limit #{pageSize}")
    @Select("SELECT release_images FROM com_act_neighbor_circle WHERE  community_id = ${communityId} and status = 2 order by create_at desc limit #{pageSize}")
    List<String> screenNeighborCircleImgs(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = #{communityId} AND STATUS = 4 "
    @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = ${communityId} AND STATUS = 4 "
        + "UNION ALL "
        + "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = #{communityId} AND STATUS = 6 "
        + "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = ${communityId} AND STATUS = 6 "
        + "UNION ALL "
        + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = #{communityId} "
        + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = ${communityId} "
        + "UNION ALL "
        + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND STATUS = 2 "
        + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 2 "
        + "UNION ALL "
        + "SELECT COUNT( e.id ) AS num,'网格事件' AS name FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = #{communityId} AND e.event_process_status = 2 "
        + "SELECT COUNT( e.id ) AS num,'网格事件' AS name FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = ${communityId} AND e.event_process_status = 2 "
        + "UNION ALL "
        + "SELECT COUNT(id) as num,'社区活动' as name FROM com_act_activity WHERE community_id = #{communityId} AND STATUS = 5 ")
        + "SELECT COUNT(id) as num,'社区活动' as name FROM com_act_activity WHERE community_id = ${communityId} AND STATUS = 5 ")
    List<PieElementVO> countAllCompletedWorkByCommunityId(@Param("communityId") Long communityId);
    @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2)  "
    @Select("SELECT COUNT(id) as num,'随手拍' as name FROM com_act_easy_photo WHERE community_id = ${communityId} AND (STATUS = 1 or STATUS = 2)  "
        + "UNION ALL "
        + "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4) "
        + "SELECT COUNT(id) as num,'微心愿' as name FROM com_act_micro_wish WHERE community_id = ${communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4) "
        + "UNION ALL "
        + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = #{communityId} "
        + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = ${communityId} "
        + "UNION ALL "
        + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND STATUS = 1 "
        + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 1 "
        + "UNION ALL "
        + "SELECT COUNT( e.id ) AS num,'网格事件' AS NAME FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = #{communityId} AND e.event_status = 2 and e.event_deal_status in (1,2,3) "
        + "SELECT COUNT( e.id ) AS num,'网格事件' AS NAME FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = ${communityId} AND e.event_status = 2 and e.event_deal_status in (1,2,3) "
        + "UNION ALL "
        + "SELECT COUNT(id),'社区活动' as name FROM com_act_activity WHERE community_id = #{communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4)  ")
        + "SELECT COUNT(id),'社区活动' as name FROM com_act_activity WHERE community_id = ${communityId} AND (STATUS = 1 or STATUS = 2 or STATUS = 3 or STATUS = 4)  ")
    List<PieElementVO> countAllNoneCompletedWorkByCommunityId(@Param("communityId") Long communityId);
    @Select(" SELECT AVG(b.t)AS avgTime "
            + "  FROM (SELECT  TIMESTAMPDIFF(MINUTE,create_at,feedback_at) AS t  FROM com_act_easy_photo WHERE community_id = #{communityId} and STATUS = 4 "
            + "  UNION ALL SELECT  TIMESTAMPDIFF(MINUTE,create_at,finish_at) AS t  FROM com_act_micro_wish WHERE community_id = #{communityId} and STATUS = 6 "
            + "  FROM (SELECT  TIMESTAMPDIFF(MINUTE,create_at,feedback_at) AS t  FROM com_act_easy_photo WHERE community_id = ${communityId} and STATUS = 4 "
            + "  UNION ALL SELECT  TIMESTAMPDIFF(MINUTE,create_at,finish_at) AS t  FROM com_act_micro_wish WHERE community_id = ${communityId} and STATUS = 6 "
            + "  )AS b ")
    Map<String, Object> countAvgByCommunityId(@Param("communityId")Long communityId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java
@@ -31,14 +31,14 @@
        + " if(caqua.id is not null,1,2) isAnswer, " + " caq.view_num  " + "FROM " + " com_act_questnaire as caq "
        + " left join com_act_questnaire_user_answer as caqua on caqua.questnaire_id = caq.id and caqua.user_id = #{pageQuestnaireDTO.userId} "
        + "WHERE " + " caq.state IN ( 2, 3 )  "
        + " AND caq.community_id = #{pageQuestnaireDTO.communityId}  and caq.is_hide = 0 " + "ORDER BY "
        + " AND caq.community_id = ${pageQuestnaireDTO.communityId}  and caq.is_hide = 0 " + "ORDER BY "
        + " caq.state ASC, " + " isAnswer ASC, " + " caq.create_at DESC" + "</script>")
    IPage<QuestnaireListVo> selectPageList(Page page, @Param("pageQuestnaireDTO") PageQuestnaireDTO pageQuestnaireDTO);
    @Select("<script>"
        + "select id,title,view_num,join_count,for_masses,for_party,for_volunteer,adver_position_top,adver_position_popup"
        + ",adver_position_application,create_at,start_time,end_time,publish_time,state,is_cover,project_key,count"
        + " from com_act_questnaire as caq where community_id = #{pageQuestnaireDTO.communityId} and is_hide = 0 "
        + " from com_act_questnaire as caq where community_id = ${pageQuestnaireDTO.communityId} and is_hide = 0 "
        + "<if test='pageQuestnaireDTO.identity != null and pageQuestnaireDTO.identity == 1'>"
        + " and caq.for_masses = 1 " + " </if> "
        + "<if test='pageQuestnaireDTO.identity != null and pageQuestnaireDTO.identity == 2'>"
@@ -70,14 +70,14 @@
    @Select("SELECT " + " id, " + " title, " + " remark, " + " is_cover, " + " for_masses, " + " for_party, "
        + " for_volunteer, " + " is_force, " + " adver_position_popup, " + " adver_position_top, "
        + " adver_position_application, " + " project_key  " + "FROM " + " com_act_questnaire  " + "WHERE "
        + " end_time >= now()  " + " AND now() >= start_time  " + " and community_id = #{communityId} "
        + " end_time >= now()  " + " AND now() >= start_time  " + " and community_id = ${communityId} "
        + " and adver_position_top = 1 " + " and state = 2")
    List<ComActQuestnaireAppVO> getIndexTopQuestnaireList(@Param("communityId") Long communityId);
    @Select("SELECT " + " id, " + " title, " + " remark, " + " for_masses, " + " for_party, " + " for_volunteer, "
        + " is_cover, " + " is_force, " + " adver_position_popup, " + " adver_position_top, "
        + " adver_position_application, " + " project_key  " + "FROM " + " com_act_questnaire  " + "WHERE "
        + " end_time >= now()  " + " AND now() >= start_time  " + " and community_id = #{communityId} "
        + " end_time >= now()  " + " AND now() >= start_time  " + " and community_id = ${communityId} "
        + " and adver_position_application = 1 " + " and state = 2")
    List<ComActQuestnaireAppVO> getIndexApplicationQuestnaireList(@Param("communityId") Long communityId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActVillageDAO.java
@@ -35,9 +35,9 @@
    ComMngVillageVO getStatisticsCount(@Param("villageId") Long villageId);
    @Select("select count(distinct `name`) as villageTotal"
        + ",(select count(distinct `name`) from com_mng_village where community_id = #{communityId} and type = 1) as townTotal"
        + ",(select count(distinct `name`) from com_mng_village where community_id = #{communityId} and type = 2) as countrysideTotal"
        + " from com_mng_village where community_id = #{communityId}")
        + ",(select count(distinct `name`) from com_mng_village where community_id = ${communityId} and type = 1) as townTotal"
        + ",(select count(distinct `name`) from com_mng_village where community_id = ${communityId} and type = 2) as countrysideTotal"
        + " from com_mng_village where community_id = ${communityId}")
    ComMngVillageTotalVO getVillageStatisticsCount(@Param("communityId") Long communityId);
    @Select("select village_id,alley,house_num,group_at,type,address,update_at from com_mng_village where village_id = #{villageId}")
@@ -50,7 +50,7 @@
        + " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND out_or_local = 1 ) AS registerNum, "
        + " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id AND is_rent = 2 ) AS rentNum  "
        + "FROM " + " com_mng_village AS cmv where 1=1 " + "<if test='villageListAppDTO.communityId != null'>"
        + " and cmv.community_id = #{villageListAppDTO.communityId} " + " </if> "
        + " and cmv.community_id = ${villageListAppDTO.communityId} " + " </if> "
        + "<if test='villageListAppDTO.address != null and villageListAppDTO.address != &quot;&quot;'>"
        + " and cmv.address like concat(#{villageListAppDTO.address},'%') " + " </if> "
        + "<if test='villageListAppDTO.alley != null and villageListAppDTO.alley != &quot;&quot;'>"
@@ -74,7 +74,7 @@
        + " ( SELECT count( id ) FROM com_mng_population WHERE village_id = cmv.village_id ) AS userSum, "
        + " ( SELECT count( id ) FROM com_mng_population_house WHERE village_id = cmv.village_id ) AS houseNum "
        + "FROM " + " com_mng_village AS cmv where 1=1 " + "<if test='villageListAppDTO.communityId != null'>"
        + " and cmv.community_id = #{villageListAppDTO.communityId} " + " </if> "
        + " and cmv.community_id = ${villageListAppDTO.communityId} " + " </if> "
        + "<if test='villageListAppDTO.villageIds != null and villageListAppDTO.villageIds.size > 0'>"
        + " and cmv.village_id in "
        + "<foreach item='item' collection='villageListAppDTO.villageIds' separator=',' open='(' close=')' index=''> "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComBpActivityDAO.java
@@ -47,7 +47,7 @@
        + "a.activity_time_begin,\n" + "a.activity_time_end,\n" + "a.enroll_time_begin,\n" + "a.cover,\n"
        + "if(u.type=3 ,'管理员',u.name)createByName,\n" + "a.enroll_time_end \n" + "FROM\n" + "com_pb_activity a\n"
        + "left join sys_user u on a.create_by=u.user_id \n"
        + "where a.community_id = #{partyBuildingActivityVO.communityId}\n"
        + "where a.community_id = ${partyBuildingActivityVO.communityId}\n"
        + "<if test='partyBuildingActivityVO.name != null and partyBuildingActivityVO.name.trim() != &quot;&quot;'>"
        + "and a.name = #{partyBuildingActivityVO.name} \n" + " </if> "
        + "<if test='partyBuildingActivityVO.isAppliets != null and partyBuildingActivityVO.isAppliets==1'>"
@@ -106,6 +106,6 @@
     *            社区id
     * @return 社区名字
     */
    @Select("select name from com_act where community_id = #{communityId}")
    @Select("select name from com_act where community_id = ${communityId}")
    String selectCommunityNameByCommunityId(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComCvtBusinessDAO.java
@@ -21,7 +21,7 @@
        + "<if test='pageComCvtBusinessDTO.name != null and pageComCvtBusinessDTO.name.trim() != &quot;&quot;'>"
        + " and a.name LIKE concat( '%', #{pageComCvtBusinessDTO.name}, '%' )  " + " </if> "
        + "<if test='pageComCvtBusinessDTO.communityId != null and pageComCvtBusinessDTO.communityId != 0'>"
        + " and a.community_id = #{pageComCvtBusinessDTO.communityId} " + " </if> " + " </where>"
        + " and a.community_id = ${pageComCvtBusinessDTO.communityId} " + " </if> " + " </where>"
        + " order by a.create_at desc" + "</script>")
    IPage<ComCvtBusinessVO> pageComCvtBusiness(Page page,
        @Param("pageComCvtBusinessDTO") PageComCvtBusinessDTO pageComCvtBusinessDTO);
@@ -29,7 +29,7 @@
    @Select("<script> " + "SELECT " + "t.*  " + "FROM " + "com_cvt_business t  " + " <where>"
        + "<if test='comCvtBusinessAppletsDTO.communityId != null and comCvtBusinessAppletsDTO.communityId != 0'>"
        + " t.area_flag = 1 " + " OR (" + " t.area_flag = 2 "
        + " AND EXISTS ( SELECT * FROM com_cvt_business_area t2 WHERE t2.business_id = t.id AND t2.community_id = #{comCvtBusinessAppletsDTO.communityId} ) \n"
        + " AND EXISTS ( SELECT * FROM com_cvt_business_area t2 WHERE t2.business_id = t.id AND t2.community_id = ${comCvtBusinessAppletsDTO.communityId} ) \n"
        + " ) " + " </if> " + " </where>" + " order by t.create_at desc" + "</script>")
    IPage<ComCvtBusinessVO> pageComCvtBusinessByServiceArea(Page page,
        @Param("comCvtBusinessAppletsDTO") PageComCvtBusinessAppletsDTO comCvtBusinessAppletsDTO);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComExServicemanDAO.java
@@ -29,7 +29,7 @@
        + "<if test='pageComMngRealCompanyDTO.comName != null and pageComMngRealCompanyDTO.comName.trim() != &quot;&quot;'>"
        + " and t.com_name LIKE concat( '%',#{pageComMngRealCompanyDTO.comName}, '%' )  " + " </if> "
        + "<if test='pageComMngRealCompanyDTO.communityId != null and pageComMngRealCompanyDTO.communityId != 0'>"
        + " and t.community_id = #{pageComMngRealCompanyDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + " and t.community_id = ${pageComMngRealCompanyDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + "</script>")
    IPage<ComExServicemanVO> pageQueryComExServiceman(Page page,
        @Param(value = "comExServicemanDTO") ComExServicemanDTO comExServicemanDTO);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java
@@ -35,7 +35,7 @@
        + "<if test='pageComMngCarDTO.villageId != null and pageComMngCarDTO.villageId != &quot;&quot;'>"
        + " and t.area_id = #{pageComMngCarDTO.villageId} " + " </if> "
        + "<if test='pageComMngCarDTO.communityId != null and pageComMngCarDTO.communityId != 0'>"
        + " and t.community_id = #{pageComMngCarDTO.communityId} " + " </if> "
        + " and t.community_id = ${pageComMngCarDTO.communityId} " + " </if> "
        + "<if test='pageComMngCarDTO.areaName != null and pageComMngCarDTO.areaName != &quot;&quot;'>"
        + " and t2.area_name LIKE concat( '%',#{pageComMngCarDTO.areaName}, '%' )  " + " </if> "
        + " order by t.create_at desc" + "</script>")
@@ -52,7 +52,7 @@
        + "<if test='exportComMngCarExcelDTO.areaName != null and exportComMngCarExcelDTO.areaName.trim() != &quot;&quot;'>"
        + " and t.area_name LIKE concat( #{exportComMngCarExcelDTO.areaName}, '%' )  " + " </if> "
        + "<if test='exportComMngCarExcelDTO.communityId != null and exportComMngCarExcelDTO.communityId != &quot;&quot;'>"
        + " and t.community_id = #{exportComMngCarExcelDTO.communityId} " + " </if> "
        + " and t.community_id = ${exportComMngCarExcelDTO.communityId} " + " </if> "
        + "<if test='exportComMngCarExcelDTO.villageId != null and exportComMngCarExcelDTO.villageId != &quot;&quot;'>"
        + " and t.area_id = #{exportComMngCarExcelDTO.villageId} " + " </if> "
        + "<if test='exportComMngCarExcelDTO.userName != null and exportComMngCarExcelDTO.userName.trim() != &quot;&quot;'>"
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -104,7 +104,7 @@
        + "AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%') " + " </if> "
        + "<if test='comMngPopulationVO.label != null and comMngPopulationVO.label != &quot;&quot;'>"
        + "AND cmpct.label LIKE concat('%',#{comMngPopulationVO.label},'%') " + " </if> "
        + "<if test='comMngPopulationVO.actId != null'>" + " and cmpct.community_id = #{comMngPopulationVO.actId} "
        + "<if test='comMngPopulationVO.actId != null'>" + " and cmpct.community_id = ${comMngPopulationVO.actId} "
        + " </if> " + "<if test='comMngPopulationVO.outOrLocal != null'>"
        + " and cmp.out_or_local = #{comMngPopulationVO.outOrLocal} " + " </if> "
        + "<if test='comMngPopulationVO.villageId != null and comMngPopulationVO.villageId != &quot;&quot;'>"
@@ -187,23 +187,23 @@
        @Param("districtCode") String districtCode);
    @Select("select count(cmpct.id) as populationTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmp.out_or_local = 1) as localTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmp.out_or_local = 2) as outTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = #{communityId} and cmpct.label is not null) as specialTotal "
        + ",(select count(DISTINCT `name`) from com_mng_village where community_id = #{communityId}) as villageTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 1) as localTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmp.out_or_local = 2) as outTotal "
        + ",(select count(cmpct.id) from com_mng_population_community_tags cmpct left join com_mng_population cmp on cmpct.population_id = cmp.id where cmpct.community_id = ${communityId} and cmpct.label is not null) as specialTotal "
        + ",(select count(DISTINCT `name`) from com_mng_village where community_id = ${communityId}) as villageTotal "
        + ",(select count(id) from com_mng_building where act_id = #{communityId}) as buildNum "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = #{communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal "
        + " from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = #{communityId}")
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','吸毒人员','%')) as drugTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','社区矫正','%')) as correctTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','精神障碍患者','%')) as majorTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','邪教人员','%')) as cultTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','刑释人员','%')) as rehabilitationTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','重点人员','%')) as keyTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','退役军人','%')) as veteransTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','残疾人','%')) as disabilityTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','低保户','%')) as lowSecurityTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','高龄老人','%')) as elderTotal "
        + ",(select count(id) from com_mng_population_community_tags where community_id = ${communityId} and label LIKE CONCAT('%','养老金人员','%')) as pensionTotal "
        + " from com_mng_population_community_tags as cmpct inner join com_mng_population as cmp on cmp.id = cmpct.population_id where community_id = ${communityId}")
    ComMngPopulationTotalVO getPopulationTotalByAdmin(@Param("communityId") Long communityId);
    @Select("select count(id) as populationTotal," +
@@ -211,18 +211,18 @@
            "IFNULL((select count(id) from com_mng_real_company where community_id = cmpct.community_id),0) as companyTotal, " +
            "IFNULL((select count(DISTINCT `name`) from com_mng_village where community_id = cmpct.community_id),0) as villageTotal " +
            " from com_mng_population_community_tags AS cmpct " +
            " where cmpct.community_id = #{communityId}")
            " where cmpct.community_id = ${communityId}")
    IndexBasicsStatisticsVO getScreenIndexByBasics(@Param("communityId") Long communityId);
    @Select("SELECT    cmp.sex as type,    count( cmpct.id ) AS sum,  count( cmpct.id )*100/(select count(*) from com_mng_population_community_tags as cmpct  \n" +
            "          left join com_mng_population  as cmp on cmpct.population_id = cmp.id   WHERE    cmpct.community_id = #{communityId} ) as percent    FROM \n" +
            "          left join com_mng_population  as cmp on cmpct.population_id = cmp.id   WHERE    cmpct.community_id = ${communityId} ) as percent    FROM \n" +
            "          com_mng_population_community_tags as cmpct  \n" +
            "          left join com_mng_population  as cmp on cmpct.population_id = cmp.id   WHERE cmp.sex is not null  and  cmpct.community_id = #{communityId} GROUP BY cmp.sex")
            "          left join com_mng_population  as cmp on cmpct.population_id = cmp.id   WHERE cmp.sex is not null  and  cmpct.community_id = ${communityId} GROUP BY cmp.sex")
    List<IndexPopulationSexStatisticsVO> getScreenIndexByPopulationSex(@Param("communityId") Long communityId);
    @Select("SELECT " + " e.happen_time as createAt, " + " e.event_des, " + " e.event_deal_status  " + "FROM "
        + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id  " + "WHERE "
        + " egd.grid_community_id = #{communityId}  " + " AND e.event_deal_status IN ( 1, 4 )  " + "ORDER BY "
        + " egd.grid_community_id = ${communityId}  " + " AND e.event_deal_status IN ( 1, 4 )  " + "ORDER BY "
        + " e.happen_time DESC  " + " LIMIT 8")
    List<IndexEventListStatisticsVO> getScreenIndexByEventList(@Param("communityId") Long communityId);
@@ -234,33 +234,33 @@
        + " IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = camw.community_id ),0) AS investigationTotal, "
        + " IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = camw.community_id AND STATUS = 1 ),0) AS propagandaTotal  "
        + "FROM " + " com_act_micro_wish AS camw  " + "WHERE " + " camw.STATUS = 6  "
        + " AND camw.community_id = #{communityId}")
        + " AND camw.community_id = ${communityId}")
    IndexDynamicStatisticsVO getScreenIndexByDynamic(@Param("communityId") Long communityId);
    @Select("SELECT " + " count( e.id ) AS eventTFTotal, " + " IFNULL(( " + "  SELECT " + "   count( e1.id )  "
        + "  FROM " + "   `event` AS e1 " + "   LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id  "
        + "  WHERE " + "   event_category = 1  " + "   AND event_type = 1  " + "   AND event_status = 2  "
        + "   AND egd1.grid_community_id = #{communityId}  " + "   ), " + "  0  " + " ) AS eventZATotal, "
        + "   AND egd1.grid_community_id = ${communityId}  " + "   ), " + "  0  " + " ) AS eventZATotal, "
        + " IFNULL(( " + "  SELECT " + "   count( e2.id )  " + "  FROM " + "   `event` AS e2 "
        + "   LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id  " + "  WHERE " + "   event_category = 1  "
        + "   AND event_type = 3  " + "   AND event_status = 2  " + "   AND egd2.grid_community_id = #{communityId}  "
        + "   AND event_type = 3  " + "   AND event_status = 2  " + "   AND egd2.grid_community_id = ${communityId}  "
        + "   ), " + "  0  " + " ) AS eventMDTotal, " + " IFNULL(( " + "  SELECT " + "   count( e3.id )  " + "  FROM "
        + "   `event` AS e3 " + "   LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id  " + "  WHERE "
        + "   event_category = 1  " + "   AND event_type = 6  " + "   AND event_status = 2  "
        + "   AND egd3.grid_community_id = #{communityId}  " + "   ), " + "  0  " + " ) AS eventTSTotal, "
        + "   AND egd3.grid_community_id = ${communityId}  " + "   ), " + "  0  " + " ) AS eventTSTotal, "
        + " IFNULL(( " + "  SELECT " + "   count( e4.id )  " + "  FROM " + "   `event` AS e4 "
        + "   LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id  " + "  WHERE " + "   event_category = 2  "
        + "   AND event_status = 2  " + "   AND egd4.grid_community_id = #{communityId}  "
        + "   AND event_status = 2  " + "   AND egd4.grid_community_id = ${communityId}  "
        + "   ), " + "  0  " + " ) AS eventBWDTotal, " + " IFNULL(( " + "  SELECT " + "   count( e5.id )  " + "  FROM "
        + "   `event` AS e5 " + "   LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id  " + "  WHERE "
        + "   event_category = 1  " + "   AND event_type = 2  " + "   AND event_status = 2  "
        + "   AND egd5.grid_community_id = #{communityId}  " + "   ), " + "  0  " + " ) AS eventGGTotal  " + "FROM "
        + "   AND egd5.grid_community_id = ${communityId}  " + "   ), " + "  0  " + " ) AS eventGGTotal  " + "FROM "
        + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id  " + "WHERE "
        + " e.event_category = 1  " + " AND e.event_type = 5  " + " AND e.event_status = 2  "
        + " AND egd.grid_community_id = #{communityId}")
        + " AND egd.grid_community_id = ${communityId}")
    IndexGridEventStatisticsVO getGridEventStatisticsList(@Param("communityId") Long communityId);
    @Select("select id,grid_name from event_grid_data where grid_community_id = #{communityId}")
    @Select("select id,grid_name from event_grid_data where grid_community_id = ${communityId}")
    List<EventGridDataVO> getGridDataListByCommunityId(@Param("communityId") Long communityId);
    @Select("SELECT " + " count( e.id ) AS eventTFTotal, "
@@ -274,15 +274,15 @@
    IndexGridEventStatisticsVO getGridEventByGirdId(@Param("gridId") Long gridId);
    @Select("SELECT " + " tag_name, " + " sys_flag  " + "FROM " + " com_mng_user_tag  " + "WHERE " + " sys_flag = 1  "
        + " OR community_id = #{communityId}")
        + " OR community_id = ${communityId}")
    List<ComMngUserTagVO> getUserTagListByCommunityId(@Param("communityId") Long communityId);
    @Select("SELECT " + " count( id )  " + "FROM " + " com_mng_population_community_tags  " + "WHERE "
        + " community_id = #{communityId} and label like concat('%',#{label},'%')")
        + " community_id = ${communityId} and label like concat('%',#{label},'%')")
    Integer getSpecialStatisticsByLabel(@Param("label") String label,@Param("communityId") Long communityId);
    @Select("SELECT " + " count( id )  " + "FROM " + " com_mng_population_community_tags  " + "WHERE "
            + " community_id = #{communityId} ")
            + " community_id = ${communityId} ")
    Integer getSpecialStatistics(@Param("communityId") Long communityId);
    @Select("<script> " + "SELECT " + " count( egd.id ) AS gridTotal, "
@@ -310,14 +310,14 @@
        + " AND e1.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " + " </if> "
        + "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>"
        + " AND e1.create_at <![CDATA[<=]]> #{screenEventDTO.endTime} " + " </if> " + " ) AS solveEventTotal  "
        + "FROM " + " event_grid_data AS egd  " + "WHERE " + " egd.grid_community_id = #{screenEventDTO.communityId} "
        + "FROM " + " event_grid_data AS egd  " + "WHERE " + " egd.grid_community_id = ${screenEventDTO.communityId} "
        + " </script>")
    EventLeftTopStatisticsVO getEventScreenLeftTop(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO);
    @Select("SELECT " + " DATE_FORMAT( e.create_at, '%m' ) months  " + "FROM " + " `event` AS e "
        + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id  " + "WHERE "
        + " e.create_at BETWEEN concat( YEAR ( now()), '-01-01 00:00:00' )  "
        + " AND concat( YEAR ( now()), '-12-31 23:59:59' )  " + " AND egd.grid_community_id = #{communityId}  "
        + " AND concat( YEAR ( now()), '-12-31 23:59:59' )  " + " AND egd.grid_community_id = ${communityId}  "
        + "GROUP BY " + " months  " + "ORDER BY " + " count( e.id ) DESC  " + " LIMIT 3")
    List<Integer> getFrequentlyEventMonth(@Param("communityId") Long communityId);
@@ -333,18 +333,18 @@
        + " e.happent_lat_lng, " + " e.event_type, " + " e.id, " + " e.event_deal_status  " + "FROM " + " `event` AS e "
        + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id "
        + " LEFT JOIN sys_user AS su ON su.user_id = e.grid_member_id  " + "WHERE "
        + " egd.grid_community_id = #{communityId}  " + " AND e.event_status = 2  " + " AND e.event_deal_status = 1  "
        + " egd.grid_community_id = ${communityId}  " + " AND e.event_status = 2  " + " AND e.event_deal_status = 1  "
        + " AND e.event_category = 1  " + "ORDER BY " + " e.happen_time DESC  " + " LIMIT 1")
    EventNewStatisticsVO getEventScreenRightTop(@Param("communityId") Long communityId);
    @Select("SELECT " + " grid_name, " + " `data`, " + " line_color, " + " line_broadband, " + " id, " + " fill_color  "
        + "FROM " + " event_grid_data AS egd  " + "WHERE " + " egd.grid_community_id = #{communityId}")
        + "FROM " + " event_grid_data AS egd  " + "WHERE " + " egd.grid_community_id = ${communityId}")
    List<EventGridStatisticsVO> getEventScreenGridData(@Param("communityId") Long communityId);
    @Select("<script> " + "(SELECT " + " event_type AS type, " + " e.id AS eventId, " + " happent_lat_lng AS latLng,e.create_at as createAt  "
        + "FROM " + " `event` AS e " + " LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id  " + "WHERE "
        + " e.event_category = 1  " + " AND e.event_type IN ( 1, 2, 3, 4, 5, 6 )  " + " AND e.event_status = 2  "
        + " AND egd.grid_community_id = #{screenEventDTO.communityId}  "
        + " AND egd.grid_community_id = ${screenEventDTO.communityId}  "
        + "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>"
        + " AND e.create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " + " </if> "
        + "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>"
@@ -354,7 +354,7 @@
        + "<if test='screenEventDTO.redCard != null'>" + " AND e.red_card = #{screenEventDTO.redCard} " + " </if> "
        + "<if test='screenEventDTO.yellowCard != null'>" + " AND e.yellow_card = #{screenEventDTO.yellowCard} "
        + " </if> )" + "UNION ALL (SELECT " + " IFNULL( NULL, 7 ) AS type, " + " id AS eventId, " + " lng_lat AS latLng,create_at as createAt  "
        + "FROM " + " com_act_easy_photo  " + "WHERE " + " community_id = #{screenEventDTO.communityId}  "
        + "FROM " + " com_act_easy_photo  " + "WHERE " + " community_id = ${screenEventDTO.communityId}  "
        + "<if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>"
        + " AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime} " + " </if> "
        + "<if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>"
@@ -365,14 +365,14 @@
        getEventScreenEventList(@Param("screenEventDTO") BigScreenEventDTO screenEventDTO);
    @Select("SELECT " + " count( id ) AS specialTotal, "
        + " ( SELECT count( id ) FROM com_mng_population_community_tags WHERE label IS NOT NULL AND community_id = #{communityId} AND create_at < #{lastMonth} ) AS toMonthSpecialTotal  "
        + " ( SELECT count( id ) FROM com_mng_population_community_tags WHERE label IS NOT NULL AND community_id = ${communityId} AND create_at < #{lastMonth} ) AS toMonthSpecialTotal  "
        + "FROM " + " com_mng_population_community_tags AS cmpct  " + "WHERE " + " label IS NOT NULL  "
        + " AND community_id = #{communityId}")
        + " AND community_id = ${communityId}")
    CivilPopulationStatisticsVO getCivilScreenPopulation(@Param("communityId") Long communityId,
        @Param("lastMonth") Date lastMonth);
    @Select("SELECT `NAME`, " + "user_sum, " + " lng, " + " lat, " + " village_images, " + " village_id  " + "FROM "
        + " com_mng_village AS cmv  " + "WHERE " + " community_id = #{communityId}")
        + " com_mng_village AS cmv  " + "WHERE " + " community_id = ${communityId}")
    List<CivilVillageStatisticsVO> getCivilScreenVillageList(@Param("communityId") Long communityId);
    @Select("SELECT " + " count( id ) AS peopleNum, "
@@ -382,51 +382,51 @@
        + "FROM " + " com_mng_population AS cmp  " + "WHERE " + " village_id = #{villageId}")
    CivilVillageStatisticsVO getCivilScreenVillageStatistics(@Param("villageId") Long villageId);
    @Select("SELECT COUNT(cmpct.id) AS man,(SELECT COUNT(cmpct.id) FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex = 2 AND cmpct.community_id = #{communityId}) AS woman "
        + "FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex = 1 AND cmpct.community_id = #{communityId}")
    @Select("SELECT COUNT(cmpct.id) AS man,(SELECT COUNT(cmpct.id) FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex = 2 AND cmpct.community_id = ${communityId}) AS woman "
        + "FROM com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id WHERE cmp.sex = 1 AND cmpct.community_id = ${communityId}")
    Map<String, Long> countBySex(@Param("communityId") Long communityId);
    @Select("SELECT " + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = #{communityId}) as aa where aa.age<= 16) as age16,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = ${communityId}) as aa where aa.age<= 16) as age16,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 25) AS age25,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = ${communityId}) AS aa WHERE aa.age > 16 and aa.age<= 25) AS age25,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 25 and aa.age<= 35) AS age35,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = ${communityId}) AS aa WHERE aa.age > 25 and aa.age<= 35) AS age35,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = ${communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = ${communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over")
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id  WHERE cmpct.community_id = ${communityId}) AS aa WHERE aa.age > 55) AS age55over")
    Map<String, Long> countByAge(@Param("communityId") Long communityId);
    @Select("SELECT COUNT(cmp.id)AS xx,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 2 AND cmpct.community_id = #{communityId}) as cz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 3 AND cmpct.community_id = #{communityId}) as gz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 4 AND cmpct.community_id = #{communityId}) as zz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 5 AND cmpct.community_id = #{communityId}) as dz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 6 AND cmpct.community_id = #{communityId}) as bk,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 7 AND cmpct.community_id = #{communityId}) as ss,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 8 AND cmpct.community_id = #{communityId}) as bs,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 9 AND cmpct.community_id = #{communityId}) as qt"
        + " FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 1 AND cmpct.community_id = #{communityId}")
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 2 AND cmpct.community_id = ${communityId}) as cz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 3 AND cmpct.community_id = ${communityId}) as gz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 4 AND cmpct.community_id = ${communityId}) as zz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 5 AND cmpct.community_id = ${communityId}) as dz,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 6 AND cmpct.community_id = ${communityId}) as bk,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 7 AND cmpct.community_id = ${communityId}) as ss,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 8 AND cmpct.community_id = ${communityId}) as bs,"
        + "(SELECT COUNT(cmp.id) FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 9 AND cmpct.community_id = ${communityId}) as qt"
        + " FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE culture_level = 1 AND cmpct.community_id = ${communityId}")
    Map<String, Long> countByCulture(@Param("communityId") Long communityId);
    @Select("select count(user_id) from sys_user where community_id = #{communityId} and type = 1")
    @Select("select count(user_id) from sys_user where community_id = ${communityId} and type = 1")
    Long countUsedCommunityPopulation(@Param("communityId") Long communityId);
    @Select("SELECT " + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId}) as aa where aa.age<= 16) as age16,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population as cmp left join com_mng_population_community_tags as cmpct on cmp.id = cmpct.population_id WHERE cmpct.community_id = ${communityId}) as aa where aa.age<= 16) as age16,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id =  #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 27) AS age27,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 27 and aa.age<= 35) AS age35,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 27 and aa.age<= 35) AS age35,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55,"
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55,"
        + "(SELECT COUNT(aa.age) FROM "
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over")
        + "(SELECT (SELECT  TIMESTAMPDIFF(YEAR, cmp.birthday, CURDATE()) ) AS age FROM com_mng_population_community_tags as capct left join com_mng_population as cmp on cmp.id = capct.population_id and capct.community_id = ${communityId}) AS aa WHERE aa.age > 55) AS age55over")
    Map<String, Long> indexCountByAge(@Param("communityId") Long communityId);
    @Select("SELECT " + " id, " + " su.nick_name AS userName, " + " su.image_url, " + " caep.create_at, "
@@ -453,10 +453,10 @@
        + " LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id  " + "WHERE " + " e.id = #{eventId}")
    EventTransferRecordDetailVO getEventScreenEventTransDetail(@Param("eventId") Long eventId);
    @Select("select ca.`name` AS communityName,cs.address AS streetName from com_act as ca LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id where ca.community_id = #{communityId}")
    @Select("select ca.`name` AS communityName,cs.address AS streetName from com_act as ca LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id where ca.community_id = ${communityId}")
    EventTransferRecordDetailVO getEventScreenEventTransDetailByCommunityId(@Param("communityId") Long communityId);
    @Select("select count(id) from com_elders_auth_elderly WHERE community_id = #{communityId}")
    @Select("select count(id) from com_elders_auth_elderly WHERE community_id = ${communityId}")
    Integer getStatisticsCount(@Param("communityId") Long communityId);
    IPage<PopulationListVO> pagePopulationListApp(Page page,
@@ -542,7 +542,7 @@
        + "#{item}" + "</foreach>" + " </if> "
        + "<if test='populationExportDTO.isHouse != null and populationExportDTO.isHouse == 2'>"
        + "AND cmp.house_id is null " + " </if> " + "<if test='populationExportDTO.communityId != null'>"
        + "AND cmpct.community_id = #{populationExportDTO.communityId} " + " </if> "
        + "AND cmpct.community_id = ${populationExportDTO.communityId} " + " </if> "
        + "<if test='populationExportDTO.politicalOutlook != null'>"
        + "AND cmp.political_outlook = #{populationExportDTO.politicalOutlook} " + " </if> " + " </script>")
    List<ComMngPopulationListVO>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java
@@ -34,21 +34,21 @@
    List<ComMngHouseVo> getPopulHouseListByPopulId(@Param("populId") Long populId);
    @Select("<script> "
        + "select id as houseId,cmv.alley from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = #{communityId}"
        + "select id as houseId,cmv.alley from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = ${communityId}"
        + "<if test='villageId != null and villageId != &quot;&quot;'>" + "and cmv.village_id = #{villageId}"
        + " </if> " + " </script>")
    List<ComMngCascadeHouseVO> getHouseLevelByAlley(@Param(value = "communityId") Long communityId,
        @Param(value = "villageId") Long villageId);
    @Select("<script> "
        + "select id as houseId,cmv.alley,cmv.house_num from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = #{communityId}"
        + "select id as houseId,cmv.alley,cmv.house_num from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = ${communityId}"
        + "<if test='name != null and name != &quot;&quot;'>" + "and cmv.alley = #{name}" + " </if> "
        + "<if test='villageId != null'>" + "and cmv.village_id = #{villageId}" + " </if> " + " </script>")
    List<ComMngCascadeHouseVO> getHouseLevelByHouseNum(@Param("name") String name,
        @Param("communityId") Long communityId, @Param(value = "villageId") Long villageId);
    @Select("<script> "
        + "select id as houseId,cmv.alley,cmv.house_num,cmph.floor from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = #{communityId} "
        + "select id as houseId,cmv.alley,cmv.house_num,cmph.floor from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = ${communityId} "
        + "<if test='name != null and name != &quot;&quot;'>" + "and cmv.alley = #{name}" + " </if> "
        + "<if test='houseNum != null and houseNum != &quot;&quot;'>" + "and cmv.house_num = #{houseNum}" + " </if> "
        + "<if test='villageId != null'>" + "and cmv.village_id = #{villageId}" + " </if> " + " </script>")
@@ -56,7 +56,7 @@
        @Param("communityId") Long communityId, @Param(value = "villageId") Long villageId);
    @Select("<script> "
        + "select id as houseId,cmv.alley,cmv.house_num,cmph.floor,cmph.unit_no from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = #{communityId} "
        + "select id as houseId,cmv.alley,cmv.house_num,cmph.floor,cmph.unit_no from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = ${communityId} "
        + "<if test='name != null and name != &quot;&quot;'>" + "and cmv.alley = #{name}" + " </if> "
        + "<if test='houseNum != null and houseNum != &quot;&quot;'>" + "and cmv.house_num = #{houseNum}" + " </if> "
        + "<if test='floor != null and floor != &quot;&quot;'>" + "and cmph.floor = #{floor}" + " </if> "
@@ -66,7 +66,7 @@
        @Param(value = "villageId") Long villageId);
    @Select("<script> "
        + "select cmph.id as houseId,cmv.alley,cmv.house_num,cmph.floor,cmph.unit_no,cmph.house_no from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = #{communityId} "
        + "select cmph.id as houseId,cmv.alley,cmv.house_num,cmph.floor,cmph.unit_no,cmph.house_no from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = ${communityId} "
        + "<if test='name != null and name != &quot;&quot;'>" + "and cmv.alley = #{name}" + " </if> "
        + "<if test='houseNum != null and houseNum != &quot;&quot;'>" + "and cmv.house_num = #{houseNum}" + " </if> "
        + "<if test='floor != null and floor != &quot;&quot;'>" + "and cmph.floor = #{floor}" + " </if> "
@@ -84,7 +84,7 @@
        + ",cmph.update_at,cmph.is_empty from com_mng_population_house as cmph"
        + " left join com_mng_village as cmv on cmv.village_id = cmph.village_id" + "<where>"
        + "<if test='populationHouseAdminDTO.communityId != null'>"
        + " and cmph.community_id = #{populationHouseAdminDTO.communityId} " + " </if> "
        + " and cmph.community_id = ${populationHouseAdminDTO.communityId} " + " </if> "
        + "<if test='populationHouseAdminDTO.alley != null and populationHouseAdminDTO.alley != &quot;&quot;'>" +
        // "AND cmv.alley like #{populationHouseAdminDTO.alley} " +
        "AND cmv.alley like concat('%',#{populationHouseAdminDTO.alley},'%') " + " </if> "
@@ -124,17 +124,17 @@
    ComMngPopulationHouseDetailAdminVO getHouseDetail(@Param("houseId") Long houseId);
    @Select("select count(id) as houseTotal"
        + ",(select count(id) from com_mng_population_house where is_empty = 1 and community_id = #{communityId}) as emptyTotal"
        + ",(select count(id) from com_mng_population_house where control_status = 2 and community_id = #{communityId}) as followTotal"
        + ",(select count(id) from com_mng_population_house where control_status = 3 and community_id = #{communityId}) as controlTotal"
        + " from com_mng_population_house as cmph where community_id = #{communityId}")
        + ",(select count(id) from com_mng_population_house where is_empty = 1 and community_id = ${communityId}) as emptyTotal"
        + ",(select count(id) from com_mng_population_house where control_status = 2 and community_id = ${communityId}) as followTotal"
        + ",(select count(id) from com_mng_population_house where control_status = 3 and community_id = ${communityId}) as controlTotal"
        + " from com_mng_population_house as cmph where community_id = ${communityId}")
    ComMngPopulationHouseTotalVO getHouseTotalByAdmin(@Param("communityId") Long communityId);
    @Select("select (select province_name from com_mng_struct_area_province where province_adcode = ca.province_code) as provinceName,"
        + "(select city_name from com_mng_struct_area_city where city_adcode = ca.city_code) as cityName,"
        + "(select district_name from com_mng_struct_area_district where district_adcode = ca.area_code) as districtName"
        + ",ca.province_code as provinceAdcode,ca.city_code as cityAdcode,ca.area_code as districtAdcode"
        + " from com_act as ca where ca.community_id = #{communityId}")
        + " from com_act as ca where ca.community_id = ${communityId}")
    ComMngVillageRegionVO getRegion(@Param("communityId") Long communityId);
    @Select("<script> "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealAssetsDAO.java
@@ -32,7 +32,7 @@
        + "<if test='pageComMngRealAssetsDTO.name != null and pageComMngRealAssetsDTO.name.trim() != &quot;&quot;'>"
        + " and t.name LIKE concat( #{pageComMngRealAssetsDTO.name}, '%' )  " + " </if> "
        + "<if test='pageComMngRealAssetsDTO.communityId != null and pageComMngRealAssetsDTO.communityId != 0'>"
        + " and t.community_id = #{pageComMngRealAssetsDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + " and t.community_id = ${pageComMngRealAssetsDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + "</script>")
    IPage<ComMngRealAssetsVO> pageQueryComMngRealAssets(Page page,
        @Param(value = "pageComMngRealAssetsDTO") PageComMngRealAssetsDTO pageComMngRealAssetsDTO);
@@ -46,7 +46,7 @@
        + "<if test='exportRealAssetsExcelDTO.name != null and exportRealAssetsExcelDTO.name.trim() != &quot;&quot;'>"
        + " and t.name LIKE concat( #{exportRealAssetsExcelDTO.name}, '%' )  " + " </if> "
        + "<if test='exportRealAssetsExcelDTO.communityId != null and exportRealAssetsExcelDTO.communityId != 0'>"
        + " and t.community_id = #{exportRealAssetsExcelDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + " and t.community_id = ${exportRealAssetsExcelDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + "</script>")
    List<ComMngRealAssetsExcelVO> exportRealAssetsExcel(
        @Param(value = "exportRealAssetsExcelDTO") ExportRealAssetsExcelDTO exportRealAssetsExcelDTO);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngRealCompanyDAO.java
@@ -36,7 +36,7 @@
        + "<if test='pageComMngRealCompanyDTO.comName != null and pageComMngRealCompanyDTO.comName.trim() != &quot;&quot;'>"
        + " and t.com_name LIKE concat( '%',#{pageComMngRealCompanyDTO.comName}, '%' )  " + " </if> "
        + "<if test='pageComMngRealCompanyDTO.communityId != null and pageComMngRealCompanyDTO.communityId != 0'>"
        + " and t.community_id = #{pageComMngRealCompanyDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + " and t.community_id = ${pageComMngRealCompanyDTO.communityId} " + " </if> " + " order by t.create_at desc"
        + "</script>")
    IPage<ComMngRealCompanyVO> pageQueryComMngRealCompany(Page page,
        @Param(value = "pageComMngRealCompanyDTO") PageComMngRealCompanyDTO pageComMngRealCompanyDTO);
@@ -47,7 +47,7 @@
        + "<if test='exportRealCompanyExcelDTO.comName != null and exportRealCompanyExcelDTO.comName.trim() != &quot;&quot;'>"
        + " and t.com_name LIKE concat( #{exportRealCompanyExcelDTO.comName}, '%' )  " + " </if> "
        + "<if test='exportRealCompanyExcelDTO.communityId != null and exportRealCompanyExcelDTO.communityId != 0'>"
        + " and t.community_id = #{exportRealCompanyExcelDTO.communityId} " + " </if> "
        + " and t.community_id = ${exportRealCompanyExcelDTO.communityId} " + " </if> "
        + "<if test='exportRealCompanyExcelDTO.legalPerson != null and exportRealCompanyExcelDTO.legalPerson.trim() != &quot;&quot;'>"
        + " and t.legal_person LIKE concat( #{exportRealCompanyExcelDTO.legalPerson}, '%' )  " + " </if> "
        + " order by t.create_at desc" + "</script>")
@@ -69,6 +69,6 @@
    ComMngRealCompanyBelongsVO queryComMngRealCompanyBelongs(
        @Param(value = "pageComMngRealCompanyBelongsDTO") ComMngRealCompanyBelongsDTO comMngRealCompanyBelongsDTO);
    @Select("select count(id) as companyTotal from com_mng_real_company where community_id = #{communityId}")
    @Select("select count(id) as companyTotal from com_mng_real_company where community_id = ${communityId}")
    ComMngRealCompanyTotalVO getComMngRealCompanyTotalByAdmin(@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructAreaDAO.java
@@ -32,14 +32,14 @@
    // "</script>")
    @Select("<script> " + "SELECT\n" + "id,\n" + "area_name,\n" + "area_code,\n" + "address_detail,\n" + "create_at \n"
        + "FROM\n" + "com_mng_struct_area \n" + "WHERE 1=1  \n" + "<if test='comMngStructAreaVO.communityId != null '>"
        + "AND community_id = #{comMngStructAreaVO.communityId} \n" + " </if> "
        + "AND community_id = ${comMngStructAreaVO.communityId} \n" + " </if> "
        + "<if test='comMngStructAreaVO.areaName != null and comMngStructAreaVO.areaName.trim() != &quot;&quot;'>"
        + "AND area_name like concat( '%',#{comMngStructAreaVO.areaName}, '%' )" + " </if> " + "</script>")
    IPage<ComMngStructAreaVO> pageArea(Page page, @Param("comMngStructAreaVO") ComMngStructAreaVO comMngStructAreaVO);
    @Select("SELECT\n" + "\ta.id,\n" + "\ta.role_floor,\n" + "\ta.area_name,\n" + "\ta.role_connector,\n"
        + "\ta.role_door \n" + "FROM\n" + "\tcom_mng_struct_area a \n" + "WHERE\n"
        + "\ta.area_name LIKE CONCAT( '%', #{areaName}, '%' ) \n" + "\tAND a.community_id =#{communityId}")
        + "\ta.area_name LIKE CONCAT( '%', #{areaName}, '%' ) \n" + "\tAND a.community_id = ${communityId}")
    List<ComMngStructAreaVO> listAreas(@Param("areaName") String areaName, @Param("communityId") Long communityId);
    @Select("select count(id) from com_mng_struct_house where parent_code=#{areaCode}")
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java
@@ -37,12 +37,12 @@
        + "<if test='comMngStructOtherBuildVO.name != null and comMngStructOtherBuildVO.name.trim() != &quot;&quot;'>"
        + " and b.name like concat(#{comMngStructOtherBuildVO.name},'%') " + " </if> "
        + "<if test='comMngStructOtherBuildVO.communityId != null'>"
        + " and b.community_id = #{comMngStructOtherBuildVO.communityId} " + " </if> " + " </where>"
        + " and b.community_id = ${comMngStructOtherBuildVO.communityId} " + " </if> " + " </where>"
        + " order by b.create_at desc" + "</script>")
    IPage<ComMngStructOtherBuildVO> pageOtherBuild(Page page,
        @Param("comMngStructOtherBuildVO") ComMngStructOtherBuildVO comMngStructOtherBuildVO);
    @Select("SELECT\n" + "b.type_id \n" + "FROM\n" + "com_mng_struct_other_build b\n" + "WHERE\n"
        + "b.community_id = #{communityId}\n" + "GROUP BY\n" + "b.type_id")
        + "b.community_id = ${communityId}\n" + "GROUP BY\n" + "b.type_id")
    List<Long> selectAllBuildTypeIds(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVaccinesEnrollRecordDAO.java
@@ -36,7 +36,7 @@
        + "select cmver.id,cmver.name,cmver.sex,cmver.age,cmver.phone,cmver.id_card,cmver.create_at,cmv.name as vaccines from com_mng_vaccines_enroll_record as cmver "
        + " left join com_mng_vaccines as cmv on cmv.id = cmver.type " + " <where>"
        + "<if test='vaccinesByAdminDTO.communityId != null'>"
        + " and cmver.community_id = #{vaccinesByAdminDTO.communityId} " + " </if> "
        + " and cmver.community_id = ${vaccinesByAdminDTO.communityId} " + " </if> "
        + "<if test='vaccinesByAdminDTO.vaccines != null and vaccinesByAdminDTO.vaccines != &quot;&quot;'>"
        + " and cmv.name = #{vaccinesByAdminDTO.vaccines} " + " </if> "
        + "<if test='vaccinesByAdminDTO.name != null and vaccinesByAdminDTO.name != &quot;&quot;'>"
@@ -57,7 +57,7 @@
        + "select cmver.name,cmver.sex,cmver.age,cmver.phone,cmver.id_card,cmver.create_at,cmv.name as vaccines from com_mng_vaccines_enroll_record as cmver "
        + " left join com_mng_vaccines as cmv on cmv.id = cmver.type " + " <where>"
        + "<if test='vaccinesByAdminDTO.communityId != null'>"
        + " and cmver.community_id = #{vaccinesByAdminDTO.communityId} " + " </if> "
        + " and cmver.community_id = ${vaccinesByAdminDTO.communityId} " + " </if> "
        + "<if test='vaccinesByAdminDTO.ids != null and vaccinesByAdminDTO.ids.size > 0'>" + " and cmver.id in "
        + "<foreach item=\"item\" collection=\"vaccinesByAdminDTO.ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n"
        + "#{item}" + "</foreach>" + " </if> "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVaccinesInoculationRecordDAO.java
@@ -37,7 +37,7 @@
        + "select cmvir.id,cmvir.name,cmvir.sex,cmvir.age,cmvir.phone,cmvir.id_card,cmvir.inoculation_at,cmvir.dosage "
        + ",cmvir.medical_institution,cmvir.vaccines_code,cmvir.vaccines,cmvir.remark from com_mng_vaccines_inoculation_record as cmvir"
        + " <where>" + "<if test='inoculationByAdminDTO.communityId != null'>"
        + " and cmvir.community_id = #{inoculationByAdminDTO.communityId} " + " </if> "
        + " and cmvir.community_id = ${inoculationByAdminDTO.communityId} " + " </if> "
        + "<if test='inoculationByAdminDTO.name != null and inoculationByAdminDTO.name != &quot;&quot;'>"
        + " and cmvir.name like concat('%',#{inoculationByAdminDTO.name},'%') " + " </if> "
        + "<if test='inoculationByAdminDTO.dosage != null and inoculationByAdminDTO.dosage != &quot;&quot;'>"
@@ -58,7 +58,7 @@
        + "select cmvir.name,cmvir.sex,cmvir.age,cmvir.phone,cmvir.id_card,cmvir.inoculation_at,cmvir.dosage "
        + ",cmvir.medical_institution,cmvir.vaccines_code,cmvir.vaccines,cmvir.remark from com_mng_vaccines_inoculation_record as cmvir"
        + " <where>" + "<if test='inoculationByAdminDTO.communityId != null'>"
        + " and cmvir.community_id = #{inoculationByAdminDTO.communityId} " + " </if> "
        + " and cmvir.community_id = ${inoculationByAdminDTO.communityId} " + " </if> "
        + "<if test='inoculationByAdminDTO.ids != null and inoculationByAdminDTO.ids.size > 0'>" + " and cmvir.id in "
        + "<foreach item=\"item\" collection=\"inoculationByAdminDTO.ids\" separator=\",\" open=\"(\" close=\")\" index=\"\"> \n"
        + "#{item}" + "</foreach>" + " </if> "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVolunteerMngDAO.java
@@ -33,7 +33,7 @@
    // "</script>")
    @Select("<script> " + "SELECT\n" + "id,\n" + "`name`,\n" + "photo_path,\n" + "phone,\n" + "integral,\n"
        + "create_at \n" + "FROM\n" + "com_mng_volunteer_mng \n"
        + " where state=2 and community_id = #{comMngVolunteerMngVO.communityId}"
        + " where state=2 and community_id = ${comMngVolunteerMngVO.communityId}"
        + "<if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name.trim() != &quot;&quot;'>"
        + " and name like concat(#{comMngVolunteerMngVO.name},'%')  \n" + " </if> "
        + "<if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone.trim() != &quot;&quot;'>"
@@ -46,7 +46,7 @@
        + "t.create_at, " + "t.submit_user_id \n" + "FROM\n" + "com_mng_volunteer_mng t\n" + " RIGHT JOIN \n"
        + "(select submit_user_id, MAX(create_at)create_at  from com_mng_volunteer_mng where state IN ( 1, 3 ) GROUP BY submit_user_id ) tmp \n"
        + "on t.create_at = tmp.create_at and t.submit_user_id=tmp.submit_user_id " + "WHERE\n"
        + "state in (1,3)  and community_id = #{comMngVolunteerMngVO.communityId} \n"
        + "state in (1,3)  and community_id = ${comMngVolunteerMngVO.communityId} \n"
        + "<if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name.trim() != &quot;&quot;'>"
        + "and t.name like concat(#{comMngVolunteerMngVO.name},'%')  \n" + " </if> "
        + "<if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone.trim() != &quot;&quot;'>"
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComOpsHouseDAO.java
@@ -31,7 +31,7 @@
        + " LEFT JOIN sys_user u ON d.user_id = u.user_id\n"
        + " LEFT JOIN com_mng_struct_area sa ON d.house_community_id = sa.id \n" + "where 1=1 "
        + "<if test='pageComOpsHouseDTO.communityId != null '>"
        + "AND ( d.community_id = #{pageComOpsHouseDTO.communityId} or sa.community_id = #{pageComOpsHouseDTO.communityId} )\n"
        + "AND ( d.community_id = ${pageComOpsHouseDTO.communityId} or sa.community_id = ${pageComOpsHouseDTO.communityId} )\n"
        + " </if> " +
        "<if test='pageComOpsHouseDTO.userId != null '>" + "AND d.user_id=#{pageComOpsHouseDTO.userId} \n" + " </if> "
@@ -45,7 +45,7 @@
        + "AND d.brn <![CDATA[ >= ]]> 4 \n" + " </if> " +
        "<if test='pageComOpsHouseDTO.houseCommunityId != null '>"
        + "AND d.house_community_id = #{pageComOpsHouseDTO.houseCommunityId} \n" + " </if> "
        + "AND d.house_community_id = ${pageComOpsHouseDTO.houseCommunityId} \n" + " </if> "
        + "<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status &lt; 4 '>"
        + "AND d.status=#{pageComOpsHouseDTO.status} \n" + " </if> "
        + "<if test='pageComOpsHouseDTO.status != null and pageComOpsHouseDTO.status ==4 '>"
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPbDynDAO.java
@@ -16,16 +16,16 @@
public interface ComPbDynDAO {
    @Select("SELECT COUNT(id) AS activityNum ,"
        + "(SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = #{communityId} AND STATUS = 2) AS dynNum," + "("
        + " (SELECT COUNT(id) FROM com_pb_activity WHERE community_id = #{communityId} AND (STATUS = 3 or STATUS = 4 or STATUS = 5 ) AND create_at LIKE CONCAT(#{nowDate},'%')) + "
        + " (SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = #{communityId} AND STATUS = 2 AND create_at LIKE CONCAT(#{nowDate},'%'))"
        + "(SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = ${communityId} AND STATUS = 2) AS dynNum," + "("
        + " (SELECT COUNT(id) FROM com_pb_activity WHERE community_id = ${communityId} AND (STATUS = 3 or STATUS = 4 or STATUS = 5 ) AND create_at LIKE CONCAT(#{nowDate},'%')) + "
        + " (SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = ${communityId} AND STATUS = 2 AND create_at LIKE CONCAT(#{nowDate},'%'))"
        + " ) AS currentNum "
        + " FROM com_pb_activity WHERE community_id = #{communityId} AND (STATUS = 3 or STATUS = 4 or STATUS = 5 )")
        + " FROM com_pb_activity WHERE community_id = ${communityId} AND (STATUS = 3 or STATUS = 4 or STATUS = 5 )")
    Map<String, Long> countByCommunityId(@Param("communityId") Long communityId, @Param("nowDate") String nowDate);
    @Select("SELECT "
        + "(SELECT COUNT(id) FROM com_pb_activity WHERE community_id = #{communityId} AND (STATUS = 3 or STATUS = 4 or STATUS = 5 ) AND #{start} < create_at AND create_at < #{end}) AS activity,"
        + "(SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = #{communityId} AND STATUS = 2 AND #{start} < create_at AND create_at < #{end}) AS dyn "
        + "(SELECT COUNT(id) FROM com_pb_activity WHERE community_id = ${communityId} AND (STATUS = 3 or STATUS = 4 or STATUS = 5 ) AND #{start} < create_at AND create_at < #{end}) AS activity,"
        + "(SELECT COUNT(id) FROM com_pb_dyn WHERE community_id = ${communityId} AND STATUS = 2 AND #{start} < create_at AND create_at < #{end}) AS dyn "
        + "FROM DUAL")
    PbWorkVO countByTime(@Param("start") String start, @Param("end") String end,
        @Param("communityId") Long communityId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/EldersAuthDAO.java
@@ -42,7 +42,7 @@
        + " LEFT JOIN com_act ac ON u.community_id = ac.community_id\n" + " <where> " +
        "<if test='pageEldersAuthDTO.communityId != null'>"
        + "  AND ac.community_id = #{pageEldersAuthDTO.communityId} " + " </if> " +
        + "  AND ac.community_id = ${pageEldersAuthDTO.communityId} " + " </if> " +
        "<if test='pageEldersAuthDTO.sumitUserId != null'>"
        + " AND ea.submit_user_id = #{pageEldersAuthDTO.sumitUserId} " + " </if> "
@@ -84,7 +84,7 @@
        + " LEFT JOIN com_act ac ON u.community_id = ac.community_id\n" + " <where> " +
        "<if test='pageEldersAuthDTO.communityId != null'>"
        + "  AND ac.community_id = #{pageEldersAuthDTO.communityId} " + " </if> " +
        + "  AND ac.community_id = ${pageEldersAuthDTO.communityId} " + " </if> " +
        "<if test='pageEldersAuthDTO.ids != null and pageEldersAuthDTO.ids.length>0 '>" + " AND ea.id in "
        + "<foreach collection='pageEldersAuthDTO.ids' item='id' index='index' open='(' close=')' separator=',' >\n"
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java
@@ -53,6 +53,7 @@
        BigScreenStatisticAgeGender age = bigScreenDAO.age(bigScreenStatisticAgeGenderDTO);
        BigScreenStatisticAgeGender ageGender = new BigScreenStatisticAgeGender();
        if(age!=null){
        BeanUtils.copyProperties(age, ageGender);
        ageGender.setManTotal(gender.getManTotal());
        ageGender.setWomeTotal(gender.getWomeTotal());
@@ -72,6 +73,8 @@
        ageGender.setThirtyPer(thrPer);
        ageGender.setSixtyPer(sixPer);
        ageGender.setBiggerPer(biggerPer);
        }
        return R.ok(ageGender);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -8185,47 +8185,92 @@
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn1=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn1.setTitle("突发事件报告");
        bigScreenGridStaticsReturn1.setNum(bigscreenGridsGovernanceStatisticsVO.getEventTFTotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn1.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventTFTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn1.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn1);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn2=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn2.setTitle("特殊人群服务");
        bigScreenGridStaticsReturn2.setNum(bigscreenGridsGovernanceStatisticsVO.getEventTSTotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn2.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventTSTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn2.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn2);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn3=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn3.setTitle("治安防控");
        bigScreenGridStaticsReturn3.setNum(bigscreenGridsGovernanceStatisticsVO.getEventZATotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn3.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventZATotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn3.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn3);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn4=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn4.setTitle("民生服务");
        bigScreenGridStaticsReturn4.setNum(bigscreenGridsGovernanceStatisticsVO.getEventMSTotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn4.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventMSTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn4.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn4);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn5=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn5.setTitle("矛盾劝解");
        bigScreenGridStaticsReturn5.setNum(bigscreenGridsGovernanceStatisticsVO.getEventMDTotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn5.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventMDTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn5.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn5);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn6=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn6.setTitle("防灾减灾");
        bigScreenGridStaticsReturn6.setNum(bigscreenGridsGovernanceStatisticsVO.getEventFJTotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn6.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventFJTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn6.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn6);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn7=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn7.setTitle("政策法规宣传");
        bigScreenGridStaticsReturn7.setNum(bigscreenGridsGovernanceStatisticsVO.getEventFGTotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn7.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getEventFGTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn7.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn7);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn8=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn8.setTitle("安全巡查");
        bigScreenGridStaticsReturn8.setNum(bigscreenGridsGovernanceStatisticsVO.getSafety());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn8.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getSafety()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn8.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn8);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn9=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn9.setTitle("其他");
        bigScreenGridStaticsReturn9.setNum(bigscreenGridsGovernanceStatisticsVO.getOtherTotal());
        if(bigScreenGridStaticsReturn.getCount()>0) {
        bigScreenGridStaticsReturn9.setPercent(BigDecimal.valueOf(bigscreenGridsGovernanceStatisticsVO.getOtherTotal()*100d/bigScreenGridStaticsReturn.getCount()).setScale(2,BigDecimal.ROUND_HALF_UP));
        }
        else {
            bigScreenGridStaticsReturn9.setPercent(BigDecimal.valueOf(0).setScale(2, BigDecimal.ROUND_HALF_UP));
        }
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn9);
        bigScreenGridStaticsReturn.setBigScreenGridStaticsReturnList(bigScreenGridStaticsReturnList);
        return bigScreenGridStaticsReturn;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -66,7 +66,7 @@
    </select>
    <select id="getIndexTopActivityList" resultMap="BaseResultMap">
        SELECT * FROM `com_act_activity`
        WHERE community_id = #{communityId} and is_top = 1 and sign_up_end &gt;= now()
        WHERE community_id = ${communityId} and is_top = 1 and sign_up_end &gt;= now()
    </select>
    <select id="pageActivityCommunityBack"
            resultType="com.panzhihua.common.model.vos.community.ComActActivityVO">
@@ -78,7 +78,7 @@
            FROM  com_act_activity a
            LEFT JOIN sys_user u ON a.sponsor_id=u.user_id
            LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id
            WHERE   a.`status` = 1 AND a.community_id = #{comActActivityVO.communityId}
            WHERE   a.`status` = 1 AND a.community_id = ${comActActivityVO.communityId}
                <if test='comActActivityVO.type != null and comActActivityVO.type == 1'>
                    AND a.volunteer_max != 0
                </if>
@@ -109,7 +109,7 @@
                FROM  com_act_activity a
                LEFT JOIN sys_user u ON a.sponsor_id=u.user_id
                LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) s ON a.id=s.activity_id
                WHERE   a.`status` != 1 AND a.community_id = #{comActActivityVO.communityId}
                WHERE   a.`status` != 1 AND a.community_id = ${comActActivityVO.communityId}
                    <if test='comActActivityVO.type != null and comActActivityVO.type == 1'>
                        AND a.volunteer_max != 0
                    </if>
@@ -144,13 +144,13 @@
        left join com_act ca on a.community_id=ca.community_id  where a.id = #{id} group by a.id
    </select>
    <select id="listActivityType" resultType="com.panzhihua.common.model.vos.community.ComActActivityTypeVO">
        SELECT * FROM com_act_activity_type WHERE `type` = #{type} AND community_id = #{communityId} ORDER BY id ASC
        SELECT * FROM com_act_activity_type WHERE `type` = #{type} AND community_id = ${communityId} ORDER BY id ASC
    </select>
    <select id="selectResidentActHistogramData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT activity_type AS filed, COUNT(id) AS num
        FROM com_act_activity
        WHERE community_id = #{communityId}
        WHERE community_id = ${communityId}
        <if test="isResidentAct">
            AND volunteer_max = 0
        </if>
@@ -165,7 +165,7 @@
        (SELECT t1.activity_type AS filed, COUNT(t2.id) AS num
        FROM com_act_activity t1
        LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) t2 ON t1.id = t2.activity_id
        WHERE t1.community_id = #{communityId}
        WHERE t1.community_id = ${communityId}
        <if test="isResidentAct">
            AND t1.volunteer_max = 0
        </if>
@@ -176,7 +176,7 @@
        (SELECT COUNT(t2.id) AS total
        FROM com_act_activity t1
        LEFT JOIN (SELECT * FROM com_act_act_sign WHERE `status` = 1) t2 ON t1.id = t2.activity_id
        WHERE t1.community_id = #{communityId}
        WHERE t1.community_id = ${communityId}
        <if test="isResidentAct">
            AND t1.volunteer_max = 0
        </if>
@@ -188,7 +188,7 @@
    <select id="getActAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( publish_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_activity
        WHERE community_id = #{communityId}
        WHERE community_id = ${communityId}
        <if test="isResidentAct">
            AND volunteer_max = 0
        </if>
@@ -201,7 +201,7 @@
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num
        FROM com_act_activity
        WHERE community_id = #{communityId}
        WHERE community_id = ${communityId}
        <if test="isResidentAct">
            AND volunteer_max = 0
        </if>
@@ -221,7 +221,7 @@
            </foreach>
        </if>
        <if test="pageBaseDTO.communityIds == null">
            AND community_id = #{pageBaseDTO.communityId}
            AND community_id = ${pageBaseDTO.communityId}
        </if>
        <if test="isResidentAct">
            AND volunteer_max = 0
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAnnouncementMapper.xml
@@ -16,7 +16,7 @@
        <where>
            1=1
            <if test="commonPage.communityId!=null">
                and t.community_id = #{commonPage.communityId}
                and t.community_id = ${commonPage.communityId}
            </if>
            <if test="commonPage.paramId!=null">
                and t.column_id =#{commonPage.paramId}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActColumnMapper.xml
@@ -21,7 +21,7 @@
                and type = #{commonPage.type}
            </if>
            <if test="commonPage.communityId!=null">
                and community_id = #{commonPage.communityId}
                and community_id = ${commonPage.communityId}
            </if>
            <if test="commonPage.status!=null">
                and status =#{commonPage.status}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActCommitteeMapper.xml
@@ -33,7 +33,7 @@
                and t.contact_name like concat(#{commonPage.username},'%')
            </if>
            <if test="commonPage.paramId!=null">
                and t.community_id =#{commonPage.paramId}
                and t.community_id = ${commonPage.paramId}
            </if>
        </where>
        order by t.create_time desc
@@ -42,7 +42,7 @@
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT `name` AS filed, 0 AS num, 0 AS percent
        FROM com_act_committee
        WHERE community_id = #{communityId}
        WHERE community_id = ${communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussDOMapper.xml
@@ -85,7 +85,7 @@
        JOIN sys_user u ON d.user_id = u.user_id
        LEFT JOIN com_act_discuss_comment c ON d.id = c.discuss_id
        WHERE
        d.community_id = #{pageComActDiscussDTO.communityId} and d.is_del = 2
        d.community_id = ${pageComActDiscussDTO.communityId} and d.is_del = 2
        <if test = 'pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != &quot;&quot;' >
            AND d.`discuss_subject` LIKE concat(#{pageComActDiscussDTO.subject}, '%' )
        </if>
@@ -118,7 +118,7 @@
        com_act_discuss d
        JOIN sys_user u ON d.user_id = u.user_id
        WHERE
        d.community_id = #{pageComActDiscussDTO.communityId} and d.is_del = 2
        d.community_id = ${pageComActDiscussDTO.communityId} and d.is_del = 2
        <if test = 'pageComActDiscussDTO.subject != null and pageComActDiscussDTO.subject.trim() != &quot;&quot;' >
            AND d.`discuss_subject` LIKE concat(#{pageComActDiscussDTO.subject}, '%' )
        </if>
@@ -174,7 +174,7 @@
            <if test='pageComActDiscussDTO.loginUserId != null '>
                LEFT JOIN com_act_discuss_option_user ou ON do.id=ou.discuss_option_id AND ou.user_id=#{pageComActDiscussDTO.loginUserId}
            </if>
            WHERE d.community_id = #{pageComActDiscussDTO.communityId} AND d.is_del = 2 AND d.status != 1
            WHERE d.community_id = ${pageComActDiscussDTO.communityId} AND d.is_del = 2 AND d.status != 1
                <if test='pageComActDiscussDTO.type != null '>
                    AND d.`type` = #{pageComActDiscussDTO.type}
                </if>
@@ -261,11 +261,11 @@
        SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent
        FROM
        (SELECT IF(`type` = 1,'议事','投票') AS filed, COUNT(id) AS num FROM com_act_discuss
        WHERE community_id = #{communityId} AND is_del = 2 GROUP BY filed) t1,
        (SELECT COUNT(id) AS sum FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2) t2
        WHERE community_id = ${communityId} AND is_del = 2 GROUP BY filed) t1,
        (SELECT COUNT(id) AS sum FROM com_act_discuss WHERE community_id = ${communityId} AND is_del = 2) t2
    </select>
    <select id="getTitles" resultType="java.lang.String">
        SELECT discuss_subject FROM com_act_discuss WHERE community_id = #{communityId} AND `type` = #{type} AND is_del = 2 ORDER BY release_at DESC limit #{pageSize}
        SELECT discuss_subject FROM com_act_discuss WHERE community_id = ${communityId} AND `type` = #{type} AND is_del = 2 ORDER BY release_at DESC limit #{pageSize}
    </select>
    <select id="countByCommunityId" resultType="Map">
        SELECT
@@ -276,10 +276,10 @@
            FROM
                com_act_discuss
            WHERE
                community_id = #{communityId}
                community_id = ${communityId}
                AND create_at BETWEEN DATE_ADD(curdate(),interval -day(curdate())+1 day)
            AND now()) AS currentNum,
            ( SELECT COUNT( id ) FROM com_act_discuss WHERE community_id = #{communityId} AND TYPE = 1 ) AS imgNum,
            ( SELECT COUNT( id ) FROM com_act_discuss WHERE community_id = ${communityId} AND TYPE = 1 ) AS imgNum,
            (
            SELECT
                count( DISTINCT cadc.user_id )
@@ -288,7 +288,7 @@
                LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id
            WHERE
                cad.type = 1
                AND cad.community_id = #{communityId}
                AND cad.community_id = ${communityId}
            ) AS imgPeopleNum,
            (
            SELECT
@@ -302,7 +302,7 @@
                    LEFT JOIN com_act_discuss AS cad ON cad.id = cadc.discuss_id
                WHERE
                    cad.type = 2
                    AND cad.community_id = #{communityId} UNION ALL
                    AND cad.community_id = ${communityId} UNION ALL
                SELECT DISTINCT
                    cadou.user_id
                FROM
@@ -310,13 +310,13 @@
                    LEFT JOIN com_act_discuss_option AS cado ON cado.id = cadou.discuss_option_id
                    LEFT JOIN com_act_discuss AS cad ON cad.id = cado.discuss_id
                WHERE
                    cad.community_id = #{communityId}
                    cad.community_id = ${communityId}
                ) t
            ) AS votePeopleNum
        FROM
            com_act_discuss
        WHERE
            community_id = #{communityId}
            community_id = ${communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml
@@ -28,21 +28,21 @@
        SELECT filed, num, ROUND(num/total,2) AS percent FROM
        (SELECT t2.`name` AS filed, COUNT(1) AS num FROM com_act_dyn t1
        LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` = 1 GROUP BY filed) temp1,
        WHERE t1.community_id = ${communityId} AND t1.`status` = 1 GROUP BY filed) temp1,
        (SELECT COUNT(t1.id) AS total FROM com_act_dyn t1
        LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` = 1) temp2
        WHERE t1.community_id = ${communityId} AND t1.`status` = 1) temp2
    </select>
    <select id="getDynAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_dyn
        WHERE community_id = #{communityId} AND `status` = 1
        WHERE community_id = ${communityId} AND `status` = 1
        AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getDynTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_dyn
        WHERE community_id = #{communityId} AND `status` = 1 AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
        WHERE community_id = ${communityId} AND `status` = 1 AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexDynList" resultType="com.panzhihua.common.model.vos.community.ComActDynVO">
        SELECT t1.id, t1.title, t1.cover, t2.`name` AS typeName
@@ -56,7 +56,7 @@
            </foreach>
        </if>
        <if test="pageBaseDTO.communityIds == null">
            AND t1.community_id = #{pageBaseDTO.communityId}
            AND t1.community_id = ${pageBaseDTO.communityId}
        </if>
        AND t1.`status` = 1 AND t2.is_del = 2
        <if test="pageBaseDTO.paramId != null">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynTypeDOMapper.xml
@@ -56,7 +56,7 @@
        LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by
        where cadt.is_del = 2
        <if test="comActDynTypeDTO.communityId != null">
            and cadt.community_id = #{comActDynTypeDTO.communityId}
            and cadt.community_id = ${comActDynTypeDTO.communityId}
        </if>
        <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != &quot;&quot;">
            and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%'))
@@ -100,7 +100,7 @@
        LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by
        where cadt.is_del = 2
        <if test="comActDynTypeDTO.communityId != null">
            and cadt.community_id = #{comActDynTypeDTO.communityId}
            and cadt.community_id = ${comActDynTypeDTO.communityId}
        </if>
        <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != &quot;&quot;">
            and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%'))
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoActivityDOMapper.xml
@@ -34,7 +34,7 @@
            </if>
            <if test="pageEasyPhotoActivityDTO.communityId != null">
                and community_id = #{pageEasyPhotoActivityDTO.communityId}
                and community_id = ${pageEasyPhotoActivityDTO.communityId}
            </if>
            <if test="pageEasyPhotoActivityDTO.startTime != null and pageEasyPhotoActivityDTO.startTime != &quot;&quot;
@@ -64,7 +64,7 @@
            and id != #{activityId}
        </if>
        and community_id = #{communityId}
        and community_id = ${communityId}
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
@@ -79,7 +79,7 @@
        WHERE
            p.del_tag = 0 and p.`status` != 3
        <if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>
          and p.community_id = #{comActEasyPhotoVO.communityId}
          and p.community_id = ${comActEasyPhotoVO.communityId}
        </if>
        <if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' >
          AND p.`status` = #{comActEasyPhotoVO.status}
@@ -121,24 +121,24 @@
    <select id="getEasyPhotoStatistics" resultType="com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO">
        SELECT
            count( id ) AS examineNum,
            ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 2 AND community_id = #{communityId} AND del_tag = 0 ) AS verificationNum,
            ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` in (1,2,4) AND `is_publicity` = 1 AND community_id = #{communityId} AND del_tag = 0 ) AS rejectNum,
            ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 4 AND community_id = #{communityId} AND del_tag = 0 ) AS completeNum,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 1) as yzAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 1 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as yzDayTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 2) as jlAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 2 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as jlDayTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 3) as ptAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 3 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ptDayTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 4) as ybAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 4 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ybDayTotal,
            (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0) as allRewardAmount,
            (select IFNULL(sum(activity_amount),0)  from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as dayRewardAmount
            ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 2 AND community_id = ${communityId} AND del_tag = 0 ) AS verificationNum,
            ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` in (1,2,4) AND `is_publicity` = 1 AND community_id = ${communityId} AND del_tag = 0 ) AS rejectNum,
            ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 4 AND community_id = ${communityId} AND del_tag = 0 ) AS completeNum,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 1) as yzAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 1 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as yzDayTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 2) as jlAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 2 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as jlDayTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 3) as ptAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 3 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ptDayTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 4) as ybAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and activity_type = 4 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ybDayTotal,
            (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0) as allRewardAmount,
            (select IFNULL(sum(activity_amount),0)  from com_act_easy_photo where `status` in (2,4) AND community_id = ${communityId} and del_tag = 0 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as dayRewardAmount
        FROM
            com_act_easy_photo
        WHERE
            `status` = 1
            AND community_id = #{communityId}
            AND community_id = ${communityId}
            AND del_tag = 0
    </select>
@@ -191,7 +191,7 @@
        WHERE
            p.del_tag = 0 and p.`is_report_urban` =1
        <if test='communityId != null and communityId != 0'>
            and p.community_id = #{communityId}
            and p.community_id = ${communityId}
        </if>
        <if test='urbanStatus != null ' >
            AND p.`urban_status` = #{urbanStatus}
@@ -259,161 +259,161 @@
    </select>
    <select id="easyPhotoNoHandleIds" resultType="Long">
        select id from com_act_easy_photo where `status` = 1 and community_id = #{communityId} and del_tag = 0
        select id from com_act_easy_photo where `status` = 1 and community_id = ${communityId} and del_tag = 0
    </select>
    <select id="banner" resultType="com.panzhihua.common.model.vos.community.easyPhoto.BannerVO">
        select id,cover,publish_at as show_time,1 as type,jump_url,jump_type  from com_act_dyn where status =1 and cover is not null and community_id =#{communityId}
        select id,cover,publish_at as show_time,1 as type,jump_url,jump_type  from com_act_dyn where status =1 and cover is not null and community_id = ${communityId}
        UNION ALL
        select id,cover,publish_at as show_time,2 as type,"" as   jump_url,"" as jump_type from com_act_activity  where status =3 and cover is not null and community_id =#{communityId}
        select id,cover,publish_at as show_time,2 as type,"" as   jump_url,"" as jump_type from com_act_activity  where status =3 and cover is not null and community_id = ${communityId}
        UNION ALL
        select id,cover,release_time as show_time,3 as type,"" as   jump_url,"" as jump_type from com_pb_activity  where status =3 and cover is not null and community_id =#{communityId}
        select id,cover,release_time as show_time,3 as type,"" as   jump_url,"" as jump_type from com_pb_activity  where status =3 and cover is not null and community_id = ${communityId}
        UNION ALL
        select id,"" as cover,publish_time as show_time,4 as type,"" as   jump_url,"" as jump_type from com_act_questnaire  where state =2   and community_id =#{communityId}
        select id,"" as cover,publish_time as show_time,4 as type,"" as   jump_url,"" as jump_type from com_act_questnaire  where state =2   and community_id = ${communityId}
        UNION ALL
        select id,cover,publish_at as show_time,5 as type,jump_url,jump_type from com_pb_dyn  where status =2 and cover is not null and community_id =#{communityId}
        select id,cover,publish_at as show_time,5 as type,jump_url,jump_type from com_pb_dyn  where status =2 and cover is not null and community_id = ${communityId}
        UNION ALL
        select id,img_url as cover,publish_time as show_time,6 as type,"" as   jump_url,"" as jump_type from com_act_reserve  where status =2 and community_id =#{communityId}
        select id,img_url as cover,publish_time as show_time,6 as type,"" as   jump_url,"" as jump_type from com_act_reserve  where status =2 and community_id = ${communityId}
        UNION ALL
        select id,logo as cover,release_at as show_time,7 as type,"" as   jump_url,"" as jump_type from com_act_easy_photo_activity  where status =2  and community_id =#{communityId}
        select id,logo as cover,release_at as show_time,7 as type,"" as   jump_url,"" as jump_type from com_act_easy_photo_activity  where status =2  and community_id = ${communityId}
        order by show_time desc limit 30
    </select>
    <select id="selectStatisticsList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO">
        SELECT t1.id, IF(`name` IS NULL,'其他',`name`) AS classifyName
        FROM com_act_easy_photo t1
        LEFT JOIN com_act_easy_photo_classify t2 ON t1.classify_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (1,2,4) AND del_tag = 0
        WHERE t1.community_id = ${communityId} AND t1.`status` IN (1,2,4) AND del_tag = 0
    </select>
    <select id="selectResidentAutonomyStatistics"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO">
        SELECT * FROM
        (SELECT COUNT(id) AS easyPhotoCurrentMonCount FROM com_act_easy_photo WHERE community_id = #{communityId} AND del_tag = 0 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t1,
        (SELECT COUNT(id) AS microWishCurrentMonCount FROM com_act_micro_wish WHERE community_id = #{communityId} AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t2,
        (SELECT IF(SUM(aim_num) IS NULL,0,SUM(aim_num)) AS aimNum FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4) t3,
        (SELECT COUNT(id) AS microWishTotal FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4) t4,
        (SELECT COUNT(id) AS committeeCurrentMonCount FROM com_act_committee WHERE community_id = #{communityId} AND DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t5,
        (SELECT COUNT(id) AS committeeTotal FROM com_act_committee WHERE community_id = #{communityId}) t6,
        (SELECT COUNT(id) AS easyPhotoCurrentMonCount FROM com_act_easy_photo WHERE community_id = ${communityId} AND del_tag = 0 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t1,
        (SELECT COUNT(id) AS microWishCurrentMonCount FROM com_act_micro_wish WHERE community_id = ${communityId} AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t2,
        (SELECT IF(SUM(aim_num) IS NULL,0,SUM(aim_num)) AS aimNum FROM com_act_micro_wish WHERE community_id = ${communityId} AND `status` != 4) t3,
        (SELECT COUNT(id) AS microWishTotal FROM com_act_micro_wish WHERE community_id = ${communityId} AND `status` != 4) t4,
        (SELECT COUNT(id) AS committeeCurrentMonCount FROM com_act_committee WHERE community_id = ${communityId} AND DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t5,
        (SELECT COUNT(id) AS committeeTotal FROM com_act_committee WHERE community_id = ${communityId}) t6,
        (SELECT ROUND( a.num / b.total * 100, 2 ) AS areaCoverPercent FROM
            (SELECT COUNT(DISTINCT(area_id)) AS num FROM com_act_committee WHERE community_id = #{communityId}) a,
            (SELECT COUNT(village_id) AS total FROM com_mng_village WHERE community_id = #{communityId}) b
            (SELECT COUNT(DISTINCT(area_id)) AS num FROM com_act_committee WHERE community_id = ${communityId}) a,
            (SELECT COUNT(village_id) AS total FROM com_mng_village WHERE community_id = ${communityId}) b
        ) t7,
        (SELECT COUNT(id) AS discussCurrentMonCount FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t8,
        (SELECT COUNT(id) AS discussTotal FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2) t9,
        (SELECT COUNT(id) AS neighborCurrentMonCount FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t10,
        (SELECT COUNT(id) AS discussCurrentMonCount FROM com_act_discuss WHERE community_id = ${communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t8,
        (SELECT COUNT(id) AS discussTotal FROM com_act_discuss WHERE community_id = ${communityId} AND is_del = 2) t9,
        (SELECT COUNT(id) AS neighborCurrentMonCount FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t10,
        (SELECT COUNT(id) AS neighborTotal, SUM(fabulous_num) AS neighborFabulousNum, SUM(forward_num) AS neighborForwardNum,
            SUM(comment_num) AS neighborCommentNum FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND is_del = 2) t11,
            SUM(comment_num) AS neighborCommentNum FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND is_del = 2) t11,
        (SELECT COUNT(c1.id) AS repairCurrentMonCount FROM com_property_repair c1
            LEFT JOIN com_property c2 ON c1.property_id = c2.id
            WHERE c2.community_id = #{communityId} AND DATE_FORMAT( c1.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t12,
            WHERE c2.community_id = ${communityId} AND DATE_FORMAT( c1.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t12,
        (SELECT COUNT(c1.id) AS repairTotal FROM com_property_repair c1
            LEFT JOIN com_property c2 ON c1.property_id = c2.id
            WHERE c2.community_id = #{communityId}) t13,
        (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseCurrentMonCount FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 AND DATE_FORMAT( signing_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t14,
            WHERE c2.community_id = ${communityId}) t13,
        (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseCurrentMonCount FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2 AND DATE_FORMAT( signing_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t14,
        (SELECT warehouseTotal, warehouseSurplusTotal, warehouseTotal - warehouseSurplusTotal AS warehouseApplyTotal FROM
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseTotal, IF(SUM(surplus_quantity) IS NULL,0,SUM(surplus_quantity)) AS warehouseSurplusTotal FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2) temp) t15,
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseTotal, IF(SUM(surplus_quantity) IS NULL,0,SUM(surplus_quantity)) AS warehouseSurplusTotal FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2) temp) t15,
        (SELECT COUNT(DISTINCT d2.user_id) AS discussCount FROM com_act_discuss d1
            INNER JOIN com_act_discuss_comment d2 ON d1.id = d2.discuss_id
            WHERE d1.community_id = #{communityId} AND d1.is_del = 2 AND `type` = 1) t16,
            WHERE d1.community_id = ${communityId} AND d1.is_del = 2 AND `type` = 1) t16,
        (SELECT COUNT(DISTINCT d2.user_id) AS voteCount FROM com_act_discuss d1
            INNER JOIN com_act_discuss_option_user d2 ON d1.id = d2.discuss_id
            WHERE d1.community_id = #{communityId} AND d1.is_del = 2 AND `type` = 2) t17,
            WHERE d1.community_id = ${communityId} AND d1.is_del = 2 AND `type` = 2) t17,
        (SELECT COUNT(id) AS residentActCurrentMonCount
            FROM com_act_activity
            WHERE community_id = #{communityId} AND volunteer_max = 0 AND DATE_FORMAT( publish_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t18
            WHERE community_id = ${communityId} AND volunteer_max = 0 AND DATE_FORMAT( publish_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t18
    </select>
    <select id="selectGridsGovernance"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO">
        SELECT
        IFNULL((SELECT  count( e.id ) FROM   `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_status = 2    AND egd.grid_community_id = #{communityId}), 0) +
        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_status = 2    AND egd.grid_community_id = ${communityId}), 0) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal,
        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal,
        IFNULL((   SELECT  count( e1.id )   FROM   `event` AS e1
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_status = 2      AND egd1.grid_community_id = #{communityId}     ),   0   ) +
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_status = 2      AND egd1.grid_community_id = ${communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal,
        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal,
        IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_status = 2     AND egd2.grid_community_id = #{communityId}      ),   0   ) +
        IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_status = 2     AND egd2.grid_community_id = ${communityId}      ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal,
        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal,
        IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_status = 2      AND egd3.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_status = 2      AND egd3.grid_community_id = ${communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal,
        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal,
        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal,
        IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_status = 2      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_status = 2      AND egd5.grid_community_id = ${communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal,
        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal,
        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal,
        IFNULL((SELECT  count( e.id ) FROM   `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_deal_status = 4    AND egd.grid_community_id = #{communityId}), 0) +
        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_deal_status = 4    AND egd.grid_community_id = ${communityId}), 0) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7), 0) AS eventTFDeal,
        WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7), 0) AS eventTFDeal,
        IFNULL((   SELECT  count( e1.id )   FROM   `event` AS e1
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_deal_status = 4      AND egd1.grid_community_id = #{communityId}     ),   0   ) +
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_deal_status = 4      AND egd1.grid_community_id = ${communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4), 0) AS eventZADeal,
        WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4), 0) AS eventZADeal,
        IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_deal_status = 4     AND egd2.grid_community_id = #{communityId}      ),   0   ) +
        IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_deal_status = 4     AND egd2.grid_community_id = ${communityId}      ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5), 0) AS eventMDDeal,
        WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5), 0) AS eventMDDeal,
        IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_deal_status = 4      AND egd3.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_deal_status = 4      AND egd3.grid_community_id = ${communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3), 0) AS eventTSDeal,
        WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3), 0) AS eventTSDeal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8), 0) AS eventFJDeal,
        WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8), 0) AS eventFJDeal,
        IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_deal_status = 4      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_deal_status = 4      AND egd5.grid_community_id = ${communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6), 0) AS eventMSDeal,
        WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6), 0) AS eventMSDeal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1), 0) AS otherDeal,
        IFNULL((SELECT  count(id) FROM  event_grid_data WHERE  grid_community_id = #{communityId}), 0) AS gridTotal,
        IFNULL((select count(egmr.id) from event_grid_member_relation as egmr left join event_grid_data as egd1 on egd1.id = egmr.grid_id where egd1.grid_community_id = #{communityId}), 0) AS gridMemberTotal
        WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1), 0) AS otherDeal,
        IFNULL((SELECT  count(id) FROM  event_grid_data WHERE  grid_community_id = ${communityId}), 0) AS gridTotal,
        IFNULL((select count(egmr.id) from event_grid_member_relation as egmr left join event_grid_data as egd1 on egd1.id = egmr.grid_id where egd1.grid_community_id = ${communityId}), 0) AS gridMemberTotal
    </select>
    <select id="selectIndexEasyPhotoBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo">
        SELECT
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)) AS eventDealTotal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7) AS eventTFDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4) AS eventZADeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5) AS eventMDDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3) AS eventTSDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6) AS eventMSDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8) AS eventFJDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1) AS otherDeal
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)) AS eventDealTotal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7) AS eventTFDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4) AS eventZADeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5) AS eventMDDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3) AS eventTSDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6) AS eventMSDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8) AS eventFJDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1) AS otherDeal
    </select>
    <select id="getEasyPhotoAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND del_tag = 0
        WHERE community_id = ${communityId} AND del_tag = 0
        AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getEasyPhotoTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND del_tag = 0
        WHERE community_id = ${communityId} AND del_tag = 0
        AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexEasyPhotoList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO">
        SELECT t1.id, t1.detail, t1.photo_path_list, t1.`status`, t2.`name` AS classifyName
        FROM com_act_easy_photo t1
        LEFT JOIN com_act_easy_photo_classify t2 ON t1.classify_id = t2.id
        WHERE t1.community_id = #{pageBaseDTO.communityId} AND t1.`status` = 4 AND t1.del_tag = 0
        WHERE t1.community_id = ${pageBaseDTO.communityId} AND t1.`status` = 4 AND t1.del_tag = 0
        <if test="pageBaseDTO.paramId != null">
            AND t1.classify_id = #{pageBaseDTO.paramId}
        </if>
@@ -424,41 +424,41 @@
        SELECT
                IFNULL((SELECT  count( e.id ) FROM   `event` AS e
                                                         LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
                        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_status = 2    AND egd.grid_community_id = #{communityId}), 0) +
                        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_status = 2    AND egd.grid_community_id = ${communityId}), 0) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal,
                IFNULL((   SELECT  count( e1.id )   FROM   `event` AS e1
                                                               LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_status = 2      AND egd1.grid_community_id = #{communityId}     ),   0   ) +
                                                               LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_status = 2      AND egd1.grid_community_id = ${communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal,
                IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_status = 2     AND egd2.grid_community_id = #{communityId}      ),   0   ) +
                IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_status = 2     AND egd2.grid_community_id = ${communityId}      ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal,
                IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_status = 2      AND egd3.grid_community_id = #{communityId}     ),   0   ) +
                IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_status = 2      AND egd3.grid_community_id = ${communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal,
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal,
                IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_status = 2      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
                IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_status = 2      AND egd5.grid_community_id = ${communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal,
                IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 8     AND event_status = 2      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
                IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 8     AND event_status = 2      AND egd5.grid_community_id = ${communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 2), 0) AS eventFGTotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 2), 0) AS eventFGTotal,
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal,
                        WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal,
                IFNULL((SELECT  count( e.id ) FROM   `event` AS e
                                                         LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
                        WHERE   e.event_category = 1     AND e.event_status = 2    AND egd.grid_community_id = #{communityId}), 0) AS eventTotal,
                        WHERE   e.event_category = 1     AND e.event_status = 2    AND egd.grid_community_id = ${communityId}), 0) AS eventTotal,
                IFNULL((SELECT  count(id) FROM  com_sw_patrol_record WHERE  community_id = #{communityId}), 0) AS safety
                IFNULL((SELECT  count(id) FROM  com_sw_patrol_record WHERE  community_id = ${communityId}), 0) AS safety
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoRewardDOMapper.xml
@@ -19,7 +19,7 @@
    </sql>
    <select id="getUserReward" resultType="java.math.BigDecimal">
        select amount from com_act_easy_photo_reward where user_id = #{userId} and is_read = 2 and community_id = #{communityId}
        select amount from com_act_easy_photo_reward where user_id = #{userId} and is_read = 2 and community_id = ${communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActFourMemberMapper.xml
@@ -26,7 +26,7 @@
        <where>
            1=1
            <if test="commonPage.paramId !=null">
                and t.community_id =#{commonPage.paramId}
                and t.community_id = ${commonPage.paramId}
            </if>
            <if test="commonPage.position !=null and commonPage.position !=''">
                and t.position like concat('%',#{commonPage.position},'%')
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActIntegralRuleDOMapper.xml
@@ -24,11 +24,11 @@
    </sql>
    <select id="getIntegralReceiveApplets" resultType="com.panzhihua.common.model.vos.community.integral.ComActIntegralUserRuleVO">
        select id,`name`,amount,integral_describe,is_restrict,type,count,integral_type,remark from com_act_integral_rule where community_id = #{communityId}
        select id,`name`,amount,integral_describe,is_restrict,type,count,integral_type,remark from com_act_integral_rule where community_id = ${communityId}
    </select>
    <select id="getIntegralRuleAdminList" resultType="com.panzhihua.common.model.vos.community.integral.admin.ComActIntegralUserRuleAdminVO">
        select id,`name`,amount,integral_describe,is_restrict,type,count,integral_type,remark,create_at,update_at from com_act_integral_rule where community_id = #{integralRuleDTO.communityId}
        select id,`name`,amount,integral_describe,is_restrict,type,count,integral_type,remark,create_at,update_at from com_act_integral_rule where community_id = ${integralRuleDTO.communityId}
    </select>
    <select id="getIntegralDefaultList" resultType="com.panzhihua.service_community.model.dos.ComActIntegralRuleDO">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActIntegralUserDOMapper.xml
@@ -58,7 +58,7 @@
                    com_act_integral_user as caiu
                    left join sys_user as su on su.user_id = caiu.user_id
                WHERE
                    caiu.community_id = #{communityId}
                    caiu.community_id = ${communityId}
                ORDER BY
                    caiu.integral_sum DESC,su.create_at asc
                 ) AS t1,
@@ -91,7 +91,7 @@
            com_act_integral_user AS caiu
            LEFT JOIN sys_user AS su ON su.user_id = caiu.user_id
        WHERE
            caiu.community_id = #{communityRankDTO.communityId}
            caiu.community_id = ${communityRankDTO.communityId}
            <if test="communityRankDTO.type == 3">
                and su.is_volunteer = 1
            </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActIntegralUserTradeDOMapper.xml
@@ -24,7 +24,7 @@
    </sql>
    <select id="getIntegralCount" resultType="Integer" parameterType="com.panzhihua.common.model.dtos.community.integral.ComActIntegralCountDTO">
        select count(id) from com_act_integral_user_trade where community_id = #{integralCountDTO.communityId} and service_type = #{integralCountDTO.serviceType} and user_id = #{integralCountDTO.userId} and change_type = #{integralCountDTO.type} and create_at between #{integralCountDTO.startTime} and #{integralCountDTO.endTime}
        select count(id) from com_act_integral_user_trade where community_id = ${integralCountDTO.communityId} and service_type = #{integralCountDTO.serviceType} and user_id = #{integralCountDTO.userId} and change_type = #{integralCountDTO.type} and create_at between #{integralCountDTO.startTime} and #{integralCountDTO.endTime}
    </select>
    <select id="getIntegralCommunityTradeApplets" parameterType="com.panzhihua.common.model.dtos.community.integral.ComActIntegralCommunityRankDTO"
@@ -42,7 +42,7 @@
            LEFT JOIN com_act AS ca ON ca.community_id = caiut.community_id
            <where>
                <if test="communityTradeDTO.communityId != null">
                    and caiut.community_id = #{communityTradeDTO.communityId}
                    and caiut.community_id = ${communityTradeDTO.communityId}
                </if>
                <if test="communityTradeDTO.userId != null">
@@ -74,7 +74,7 @@
            LEFT JOIN sys_user AS su ON su.user_id = caiut.user_id
            <where>
                <if test="integralRuleDTO.communityId != null">
                    and caiut.community_id = #{integralRuleDTO.communityId}
                    and caiut.community_id = ${integralRuleDTO.communityId}
                </if>
                <if test="integralRuleDTO.identityType != null">
                    and caiut.identity_type = #{integralRuleDTO.identityType}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishDOMapper.xml
@@ -70,7 +70,7 @@
        left JOIN com_pb_service_team su ON w.responsible_id = su.id
        <where>
            <if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>
                and w.community_id = #{comActMicroWishVO.communityId}
                and w.community_id = ${comActMicroWishVO.communityId}
            </if>
            <if test='comActMicroWishVO.status == 3  and comActMicroWishVO.isApplets != null and comActMicroWishVO.isApplets != 0'>
                AND w.`status` in (2,3)
@@ -94,13 +94,13 @@
    <select id="getWishHandleListAdmin" resultType="com.panzhihua.common.model.vos.user.SysUserVO">
        <if test="type != null and type == 1">
            select user_id,`name` as `name` from sys_user where `type` = 3 and community_id = #{communityId} and status = 1
            select user_id,`name` as `name` from sys_user where `type` = 3 and community_id = ${communityId} and status = 1
        </if>
        <if test="type != null and type == 2">
            select user_id,IFNULL(`name`,nick_name) as `name` from sys_user where `type` = 1 and community_id = #{communityId} and status = 1 and is_partymember = 1
            select user_id,IFNULL(`name`,nick_name) as `name` from sys_user where `type` = 1 and community_id = ${communityId} and status = 1 and is_partymember = 1
        </if>
        <if test="type != null and type == 3">
            select user_id,IFNULL(`name`,nick_name) as `name` from sys_user where `type` = 1 and community_id = #{communityId} and status = 1 and is_volunteer = 1
            select user_id,IFNULL(`name`,nick_name) as `name` from sys_user where `type` = 1 and community_id = ${communityId} and status = 1 and is_volunteer = 1
        </if>
    </select>
@@ -141,7 +141,7 @@
        LEFT JOIN sys_user su1 ON w.responsible_id = su1.user_id
        <where>
            <if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'>
                and w.community_id = #{comActMicroWishVO.communityId}
                and w.community_id = ${comActMicroWishVO.communityId}
            </if>
            <if test='comActMicroWishVO.createBegin != null '>
                AND w.create_at BETWEEN #{comActMicroWishVO.createBegin}
@@ -168,37 +168,37 @@
        SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent
        FROM
        (SELECT IF(`status` = 6,'已实现','待实现') AS filed, COUNT(`status`) AS num FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND `status` NOT IN(1,4) GROUP BY filed) t1,
        (SELECT COUNT(id) AS sum FROM com_act_micro_wish WHERE community_id = #{communityId} AND  `status` NOT IN(1,4)) t2
        WHERE community_id = ${communityId} AND `status` NOT IN(1,4) GROUP BY filed) t1,
        (SELECT COUNT(id) AS sum FROM com_act_micro_wish WHERE community_id = ${communityId} AND  `status` NOT IN(1,4)) t2
    </select>
    <select id="getPassedAllImages" resultType="java.lang.String">
        SELECT photo_path_list FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND (`status` =2 OR `status` = 3 OR `status` = 5 OR `status` = 6 OR `status` = 7)
        WHERE community_id = ${communityId} AND (`status` =2 OR `status` = 3 OR `status` = 5 OR `status` = 6 OR `status` = 7)
        AND photo_path_list IS NOT NULL AND photo_path_list != ''
        ORDER BY create_at DESC limit #{pageSize}
    </select>
    <select id="selectIndexMicroWishBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo">
        SELECT
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4)) AS microWishTotal,
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` = 6) AS microWishRealized,
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4,6)) AS microWishUnrealized
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = ${communityId} AND `status` NOT IN(1,4)) AS microWishTotal,
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = ${communityId} AND `status` = 6) AS microWishRealized,
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = ${communityId} AND `status` NOT IN(1,4,6)) AS microWishUnrealized
    </select>
    <select id="getMicroWishAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        WHERE community_id = ${communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getMicroWishTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
        WHERE community_id = ${communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="selectScreenDisplayList"
            resultType="com.panzhihua.common.model.vos.community.ComActMicroWishVO">
        SELECT id, `status`, detail, photo_path_list
        FROM com_act_micro_wish
        WHERE community_id = #{pageBaseDTO.communityId} AND `status` NOT IN(1,4) ORDER BY create_at DESC
        WHERE community_id = ${pageBaseDTO.communityId} AND `status` NOT IN(1,4) ORDER BY create_at DESC
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishOperationRecordMapper.xml
@@ -26,7 +26,7 @@
    <select id="selectId" resultType="Long">
        select id from com_act_micro_wish
        <where>
            1=1 and community_id = #{communityId}
            1=1 and community_id = ${communityId}
            <if test="status !=null">
                and status=#{status}
            </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -61,7 +61,7 @@
        com_act_neighbor_circle AS canc
        left join sys_user as su on su.user_id = canc.release_id
        left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id
        where canc.status = 2 and is_del = 2 and canc.community_id = #{neighborCircleAppDTO.communityId}
        where canc.status = 2 and is_del = 2 and canc.community_id = ${neighborCircleAppDTO.communityId}
        <if test='neighborCircleAppDTO.topicId != null '>
            and canc.topic_id = #{neighborCircleAppDTO.topicId}
        </if>
@@ -92,7 +92,7 @@
        LEFT JOIN sys_user u ON nc.release_id = u.user_id
        LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id
        <where>
            nc.community_id = #{neighborCircleAdminDTO.communityId} and is_del = 2
            nc.community_id = ${neighborCircleAdminDTO.communityId} and is_del = 2
            <if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != &quot;&quot;'>
                and nc.release_content like concat('%',#{neighborCircleAdminDTO.releaseContent},'%')
            </if>
@@ -117,12 +117,12 @@
    </select>
    <select id="getAllImages" resultType="java.lang.String">
        SELECT release_images FROM com_act_neighbor_circle
        WHERE community_id = #{communityId} AND `status` = 2 AND release_images IS NOT NULL AND release_images != ''
        WHERE community_id = ${communityId} AND `status` = 2 AND release_images IS NOT NULL AND release_images != ''
        ORDER BY create_at DESC limit #{pageSize}
    </select>
    <select id="getContents" resultType="java.lang.String">
        SELECT release_content FROM com_act_neighbor_circle
        WHERE community_id = #{communityId} AND `status` = 2 AND release_content IS NOT NULL AND release_content != ''
        WHERE community_id = ${communityId} AND `status` = 2 AND release_content IS NOT NULL AND release_content != ''
        ORDER BY create_at DESC limit #{pageSize}
    </select>
    <select id="getIndexNeighborBaseData"
@@ -130,24 +130,24 @@
        SELECT filed, num, ROUND(num/total,2) AS percent FROM
        (SELECT IF(t2.`name` IS NULL,'无话题',t2.`name`) AS filed, COUNT(1) AS num FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) GROUP BY filed) temp1,
        WHERE t1.community_id = ${communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) GROUP BY filed) temp1,
        (SELECT COUNT(t1.id) AS total FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL)) temp2
        WHERE t1.community_id = ${communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL)) temp2
    </select>
    <select id="getNeighborAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( t1.create_at, '%m' ) AS filed, COUNT(t1.id) AS num
        FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL)
        WHERE t1.community_id = ${communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL)
        AND DATE_FORMAT( t1.create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getNeighborTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(t1.id) AS num FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) AND DATE_FORMAT( t1.create_at, '%Y%m' ) &lt;= #{date}
        WHERE t1.community_id = ${communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL) AND DATE_FORMAT( t1.create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexNeighborList"
            resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO">
@@ -162,7 +162,7 @@
            </foreach>
        </if>
        <if test="pageBaseDTO.communityIds == null">
            AND t1.community_id = #{pageBaseDTO.communityId}
            AND t1.community_id = ${pageBaseDTO.communityId}
        </if>
        AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL)
        <if test="pageBaseDTO.paramId != null">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml
@@ -33,7 +33,7 @@
            LEFT JOIN sys_user AS su ON su.user_id = canct.create_by
        <where>
            <if test="circleTopicAdminDTO.communityId != null">
                and canct.community_id = #{circleTopicAdminDTO.communityId}
                and canct.community_id = ${circleTopicAdminDTO.communityId}
            </if>
            <if test="circleTopicAdminDTO.status != null">
                and canct.status = #{circleTopicAdminDTO.status}
@@ -47,7 +47,7 @@
    <select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO">
        SELECT canct.id, canct.`name`, canct.hot_num,( SELECT count( id ) FROM com_act_neighbor_circle WHERE is_del = 2 AND `status` = 2 and topic_id = canct.id) AS `count`
         from com_act_neighbor_circle_topic as canct where canct.`status` = 1 and canct.community_id = #{communityId}
         from com_act_neighbor_circle_topic as canct where canct.`status` = 1 and canct.community_id = ${communityId}
        <if test="isZero != null and isZero == 1">
            and `count` > 0
        </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml
@@ -45,7 +45,7 @@
            com_act_questnaire
        WHERE
            adver_position_popup = 1
            and community_id = #{communityId}
            and community_id = ${communityId}
            AND (
                #{startTime} BETWEEN start_time AND end_time OR
                #{endTime} BETWEEN start_time AND end_time OR
@@ -198,8 +198,8 @@
                count( id )
            FROM
                (
                SELECT id FROM com_pb_member AS su  WHERE community_id = #{communityId} AND user_id IS NULL UNION ALL
                SELECT id FROM com_pb_member AS su  WHERE community_id = #{communityId} AND user_id IS NOT NULL
                SELECT id FROM com_pb_member AS su  WHERE community_id = ${communityId} AND user_id IS NULL UNION ALL
                SELECT id FROM com_pb_member AS su  WHERE community_id = ${communityId} AND user_id IS NOT NULL
                AND user_id NOT IN ( SELECT user_id FROM com_act_questnaire_user_answer WHERE questnaire_id = #{questId}  )
                ) AS member) AS noPartymemberCount,
            (select count(user_id) from sys_user where community_id = 2 and type = 1) as userCount
@@ -213,24 +213,24 @@
    </select>
    <select id="getIndexQuestionnaireBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo">
        SELECT COUNT(id) AS questionnaireNum, SUM(join_count) AS joinNum FROM com_act_questnaire WHERE community_id = #{communityId} AND state IN (2,3)
        SELECT COUNT(id) AS questionnaireNum, SUM(join_count) AS joinNum FROM com_act_questnaire WHERE community_id = ${communityId} AND state IN (2,3)
    </select>
    <select id="getQuestionnaireAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_questnaire
        WHERE community_id = #{communityId} AND state IN (2,3)
        WHERE community_id = ${communityId} AND state IN (2,3)
        AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getQuestionnaireTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_questnaire
        WHERE community_id = #{communityId} AND state IN (2,3) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
        WHERE community_id = ${communityId} AND state IN (2,3) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="selectQuestionnaireDisplayList"
            resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireVO">
        SELECT id, title, `count`, view_num, join_count, is_cover, state FROM com_act_questnaire
        WHERE community_id = #{pageBaseDTO.communityId} AND state IN (2,3) ORDER BY id DESC
        WHERE community_id = ${pageBaseDTO.communityId} AND state IN (2,3) ORDER BY id DESC
    </select>
    <insert id="addNoNotice">
        insert into com_act_questnaire_user(questnaire_id,user_id,create_at)
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml
@@ -38,7 +38,7 @@
        where
            status = 2 and adver_position_top = 1
            <if test="communityId !=null">
                and community_id =#{communityId}
                and community_id = ${communityId}
            </if>
    </select>
@@ -48,7 +48,7 @@
        <where>
            status = 2 and adver_position_application = 1
            <if test="communityId !=null">
                and community_id =#{communityId}
                and community_id = ${communityId}
            </if>
        </where>
    </select>
@@ -77,7 +77,7 @@
            <where>
                and t.is_del = 2
                <if test="pageReserveDTO.communityId != null and pageReserveDTO.communityId !=0">
                    and t.community_id = #{pageReserveDTO.communityId}
                    and t.community_id = ${pageReserveDTO.communityId}
                </if>
                <if test="pageReserveDTO.communityId ==0">
                    and t1.area_code = '510423'
@@ -127,7 +127,7 @@
        WHERE
            `status` = 2
            AND type = 1
            AND community_id = #{communityId}
            AND community_id = ${communityId}
            group by reserveTime
    </select>
@@ -144,7 +144,7 @@
        WHERE
            carr.`status` = 2
            AND carr.type = 1
            AND carr.community_id = #{makeStatisticsDTO.communityId}
            AND carr.community_id = ${makeStatisticsDTO.communityId}
            <if test="makeStatisticsDTO.startTime != null and makeStatisticsDTO.startTime != &quot;&quot;">
                AND carr.reserve_time <![CDATA[ >= ]]> #{makeStatisticsDTO.startTime}
            </if>
@@ -158,7 +158,7 @@
    <select id="getReserveRecordCount" resultType="integer">
        select count(id) from com_act_reserve_record
        where `status` = 2 and `type` = 1 and community_id = #{communityId}
        where `status` = 2 and `type` = 1 and community_id = ${communityId}
        and reserve_time <![CDATA[ >= ]]> #{startTime}
        and reserve_time <![CDATA[ <= ]]> #{endTime}
    </select>
@@ -181,7 +181,7 @@
            adver_position_application
        FROM
            com_act_reserve
            where is_del = 2 and `type` = 1 and community_id = #{communityId}
            where is_del = 2 and `type` = 1 and community_id = ${communityId}
    </select>
    <update id="addReserveCountById">
@@ -190,36 +190,36 @@
    <select id="getReserveIndexList" resultType="com.panzhihua.common.model.vos.community.ComActReserveIndexVo">
        select id,title,type,img_type,img_url,adver_position_top,adver_position_application from com_act_reserve where `status` = 2 and is_del = 2
        and community_id = #{communityId}
        and community_id = ${communityId}
    </select>
    <select id="indexBackReserve" resultType="Integer">
        select count(*) from com_act_reserve t  LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%')
        select count(*) from com_act_reserve t  LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = ${communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%')
    </select>
    <select id="indexHomeQuarantine" resultType="Integer">
        select count(*) from com_act_reserve t  LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and t.title like '%居家隔离%'
        select count(*) from com_act_reserve t  LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = ${communityId} and t.title like '%居家隔离%'
    </select>
    
    <select id="indexBackReserveSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub">
        select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t
                                                                                             LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                             LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) group by t1.key) a LEFT JOIN
                                             where t.community_id = ${communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) group by t1.key) a LEFT JOIN
                                            (select count(t2.id) as num,t1.key from com_act_reserve t
                                                                                        LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                        LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) and t2.answer_content = '是' group by t1.key) b on a.key = b.key
                                             where t.community_id = ${communityId} and ( t.title like '%返攀登记%' or t.title like '%来攀登记%') and t1.`key` in (1,2,3,17,19,26) and t2.answer_content = '是' group by t1.key) b on a.key = b.key
    </select>
    <select id="IndexHomeQuarantineSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub">
        select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t
                                                                                             LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                             LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) group by t1.key) a LEFT JOIN
                                             where t.community_id = ${communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) group by t1.key) a LEFT JOIN
                                            (select count(t2.id) as num,t1.key from com_act_reserve t
                                                                                        LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                        LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) and t2.answer_content = '是' group by t1.key) b on a.key = b.key
                                             where t.community_id = ${communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) and t2.answer_content = '是' group by t1.key) b on a.key = b.key
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveRecordMapper.xml
@@ -144,13 +144,13 @@
        SELECT
            car.title,
            count( carr.id ) AS count,
            ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = #{registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount
            ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = ${registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount
        FROM
            com_act_reserve_record AS carr
            LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id
        WHERE
            carr.type = 2
            AND carr.community_id = #{registerStatisticsDTO.communityId}
            AND carr.community_id = ${registerStatisticsDTO.communityId}
            AND carr.`status` = 2
            <if test="registerStatisticsDTO.startTime != null and registerStatisticsDTO.startTime != &quot;&quot;">
                AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{registerStatisticsDTO.startTime}
@@ -167,13 +167,13 @@
        SELECT
        car.title,
        count( carr.id ) AS count,
        ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = #{registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount
        ( SELECT count( id ) FROM com_act_reserve_record WHERE `type` = 2 AND community_id = ${registerStatisticsDTO.communityId} AND `status` = 2 ) AS allCount
        FROM
        com_act_reserve_record AS carr
        LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id
        WHERE
        carr.type = 2
        AND carr.community_id = #{registerStatisticsDTO.communityId}
        AND carr.community_id = ${registerStatisticsDTO.communityId}
        AND carr.`status` = 2
        <if test="registerStatisticsDTO.startTime != null and registerStatisticsDTO.startTime != &quot;&quot;">
            AND DATE_FORMAT(carr.create_at,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{registerStatisticsDTO.startTime}
@@ -221,7 +221,7 @@
                and carr.reserve_id = #{pageMakeHandleDTO.reserveId}
            </if>
            <if test="pageMakeHandleDTO.communityId != null ">
                and carr.community_id = #{pageMakeHandleDTO.communityId}
                and carr.community_id = ${pageMakeHandleDTO.communityId}
            </if>
            <if test="pageMakeHandleDTO.startTime != null and pageMakeHandleDTO.startTime != &quot;&quot;">
                AND DATE_FORMAT(carr.reserve_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{pageMakeHandleDTO.startTime}
@@ -276,7 +276,7 @@
            and carr.reserve_id = #{pageMakeHandleDTO.reserveId}
        </if>
        <if test="pageMakeHandleDTO.communityId != null ">
            and carr.community_id = #{pageMakeHandleDTO.communityId}
            and carr.community_id = ${pageMakeHandleDTO.communityId}
        </if>
        <if test="pageMakeHandleDTO.startTime != null and pageMakeHandleDTO.startTime != &quot;&quot;">
            AND DATE_FORMAT(carr.reserve_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{pageMakeHandleDTO.startTime}
@@ -320,19 +320,19 @@
    </select>
    <select id="biggestScreen" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserve">
        select   (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' or t1.title like '%燃气%' or t1.title like '%防火%') and t1.community_id =#{communityId}) count,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id =#{communityId}) epidemicCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%燃气%' ) and t1.community_id =#{communityId}) gasCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%防火%' ) and t1.community_id =#{communityId}) fireCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' ) and t1.community_id =#{communityId}) homeCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id =#{communityId}) reserveCount
        select   (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' or t1.title like '%燃气%' or t1.title like '%防火%') and t1.community_id = ${communityId}) count,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id = ${communityId}) epidemicCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%燃气%' ) and t1.community_id = ${communityId}) gasCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%防火%' ) and t1.community_id = ${communityId}) fireCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' ) and t1.community_id = ${communityId}) homeCount,
                    (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id = ${communityId}) reserveCount
    </select>
    <select id="biggestScreenMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenStaticsReserveMonth">
        select   (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' or t1.title like '%燃气%' or t1.title like '%防火%') and t1.community_id =#{communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at ) count,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%燃气%' ) and t1.community_id =#{communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) gasCount,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%防火%' ) and t1.community_id =#{communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) fireCount,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' ) and t1.community_id =#{communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) homeCount,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id =#{communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) reserveCount
        select   (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' or t1.title like '%返攀%' or t1.title like '%来攀%' or t1.title like '%燃气%' or t1.title like '%防火%') and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at ) count,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%燃气%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) gasCount,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%防火%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) fireCount,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%居家%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) homeCount,
                 (select count(*)  from com_act_reserve_record t LEFT JOIN com_act_reserve t1 on t.reserve_id = t1.id where (t1.title like '%返攀%' or t1.title like '%来攀%' ) and t1.community_id = ${communityId} and t.create_at >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=t.create_at) reserveCount
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialOrgMapper.xml
@@ -64,7 +64,7 @@
                and t.contact_name like concat(#{commonPage.systemName},'%')
            </if>
            <if test="commonPage.paramId!=null">
                and t.community_id =#{commonPage.paramId}
                and t.community_id = ${commonPage.paramId}
            </if>
            <if test="commonPage.phone!=null and commonPage.phone!=''">
                and t.contact_phone like concat(#{commonPage.phone},'%')
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletDOMapper.xml
@@ -28,7 +28,7 @@
            com_act AS ca
            LEFT JOIN sys_user_agreement AS sua ON sua.community_id = ca.community_id
        WHERE
            ca.community_id = #{communityId} and sua.type = #{type}
            ca.community_id = ${communityId} and sua.type = #{type}
    </select>
    <select id="getAgreementContent" resultType="Map">
@@ -39,7 +39,7 @@
            sys_user_agreement AS sua
            LEFT JOIN com_act AS ca ON sua.community_id = ca.community_id
        WHERE
            sua.community_id = #{communityId} and sua.type = #{type}
            sua.community_id = ${communityId} and sua.type = #{type}
    </select>
    <select id="getWalletRanking" resultType="com.panzhihua.common.model.vos.community.wallet.ComActWalletRankingVO">
@@ -48,11 +48,11 @@
            su.nick_name,
            su.image_url,
            cauw.income_amount,
            (select count(id) from com_act_easy_photo where sponsor_id = cauw.user_id and community_id = #{walletTradeDTO.communityId}) as easyCount
            (select count(id) from com_act_easy_photo where sponsor_id = cauw.user_id and community_id = ${walletTradeDTO.communityId}) as easyCount
        FROM
            com_act_user_wallet AS cauw
            LEFT JOIN sys_user AS su ON su.user_id = cauw.user_id
            where cauw.community_id = #{walletTradeDTO.communityId}
            where cauw.community_id = ${walletTradeDTO.communityId}
        ORDER BY
            cauw.income_amount DESC
    </select>
@@ -73,7 +73,7 @@
            LEFT JOIN sys_user AS su ON su.user_id = cauw.user_id
        <where>
            <if test="pageWalletAdminDTO.communityId != null">
                AND cauw.community_id = #{pageWalletAdminDTO.communityId}
                AND cauw.community_id = ${pageWalletAdminDTO.communityId}
            </if>
            <if test="pageWalletAdminDTO.name != null and pageWalletAdminDTO.name != &quot;&quot;">
                AND (su.nick_name like concat (#{pageWalletAdminDTO.name},'%') or su.name like concat (#{pageWalletAdminDTO.name},'%'))
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletTradeDOMapper.xml
@@ -35,7 +35,7 @@
        FROM
            com_act_user_wallet_trade AS cauwt
            LEFT JOIN com_act AS ca ON ca.community_id = cauwt.community_id
            where cauwt.community_id = #{walletTradeDTO.communityId}
            where cauwt.community_id = ${walletTradeDTO.communityId}
            and cauwt.user_id = #{walletTradeDTO.userId}
            order by cauwt.create_at desc
@@ -62,7 +62,7 @@
            LEFT JOIN sys_user AS su1 ON su1.user_id = cauwt.create_by
        <where>
            <if test="walletTradeDTO.communityId != null">
                and cauwt.community_id = #{walletTradeDTO.communityId}
                and cauwt.community_id = ${walletTradeDTO.communityId}
            </if>
            <if test="walletTradeDTO.userId != null">
                and cauwt.user_id = #{walletTradeDTO.userId}
@@ -117,7 +117,7 @@
        LEFT JOIN sys_user AS su1 ON su1.user_id = cauwt.create_by
        <where>
            <if test="walletTradeDTO.communityId != null">
                and cauwt.community_id = #{walletTradeDTO.communityId}
                and cauwt.community_id = ${walletTradeDTO.communityId}
            </if>
            <if test="walletTradeDTO.userId != null">
                and cauwt.user_id = #{walletTradeDTO.userId}
@@ -169,7 +169,7 @@
            LEFT JOIN sys_user AS su1 ON su1.user_id = cauwt.user_id
        <where>
            <if test="walletTradeDTO.communityId != null">
                and cauwt.community_id = #{walletTradeDTO.communityId}
                and cauwt.community_id = ${walletTradeDTO.communityId}
            </if>
            <if test="walletTradeDTO.userId != null">
                and cauwt.user_id = #{walletTradeDTO.userId}
@@ -219,7 +219,7 @@
        LEFT JOIN sys_user AS su1 ON su1.user_id = cauwt.user_id
        <where>
            <if test="walletTradeDTO.communityId != null">
                and cauwt.community_id = #{walletTradeDTO.communityId}
                and cauwt.community_id = ${walletTradeDTO.communityId}
            </if>
            <if test="walletTradeDTO.userId != null">
                and cauwt.user_id = #{walletTradeDTO.userId}
@@ -263,11 +263,11 @@
            resultType="com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeStatisticsAdminVO">
        SELECT
            sum( amount ) as dayTotal,
            (select sum(amount) from com_act_user_wallet_trade where community_id = #{walletTradeDTO.communityId} and change_type = #{walletTradeDTO.changeType} and create_at between timestamp(DATE_ADD(curdate(),interval -day(curdate())+1 day)) and now()) as monthTotal,
            (select sum(amount) from com_act_user_wallet_trade where community_id = #{walletTradeDTO.communityId} and change_type = #{walletTradeDTO.changeType}) as total
            (select sum(amount) from com_act_user_wallet_trade where community_id = ${walletTradeDTO.communityId} and change_type = #{walletTradeDTO.changeType} and create_at between timestamp(DATE_ADD(curdate(),interval -day(curdate())+1 day)) and now()) as monthTotal,
            (select sum(amount) from com_act_user_wallet_trade where community_id = ${walletTradeDTO.communityId} and change_type = #{walletTradeDTO.changeType}) as total
        FROM
            com_act_user_wallet_trade
            where community_id = #{walletTradeDTO.communityId} and change_type = #{walletTradeDTO.changeType}
            where community_id = ${walletTradeDTO.communityId} and change_type = #{walletTradeDTO.changeType}
            and create_at between timestamp(date_add(curdate(), interval - 0 day)) and now()
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseApplyMapper.xml
@@ -30,7 +30,7 @@
        <where>
            1=1
            <if test="commonPage.paramId !=null">
                and t.community_id = #{commonPage.paramId}
                and t.community_id = ${commonPage.paramId}
            </if>
            <if test="commonPage.status !=null">
                and t.status=#{commonPage.status}
@@ -56,11 +56,11 @@
    <select id="selectStatics" resultType="com.panzhihua.common.model.vos.community.warehouse.ApplyStatistics">
        select
                (select count(*)  from com_act_warehouse_apply where status = 0 and community_id =#{communityId}) as pending,
                (select count(*)  from com_act_warehouse_apply where status = 1 and community_id =#{communityId}) as unclaimed,
                (select count(*)  from com_act_warehouse_apply where status = 2 and community_id =#{communityId}) as rejected,
                (select count(*)  from com_act_warehouse_apply where status = 3 and community_id =#{communityId}) as received,
                (select count(*)  from com_act_warehouse_apply where status = -1 and community_id =#{communityId}) as cancelled
                (select count(*)  from com_act_warehouse_apply where status = 0 and community_id = ${communityId}) as pending,
                (select count(*)  from com_act_warehouse_apply where status = 1 and community_id = ${communityId}) as unclaimed,
                (select count(*)  from com_act_warehouse_apply where status = 2 and community_id = ${communityId}) as rejected,
                (select count(*)  from com_act_warehouse_apply where status = 3 and community_id = ${communityId}) as received,
                (select count(*)  from com_act_warehouse_apply where status = -1 and community_id = ${communityId}) as cancelled
    </select>
    <select id="selectById" resultType="com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseDonatesMapper.xml
@@ -41,7 +41,7 @@
    <select id="exportDonatesBySearch"
            resultType="com.panzhihua.common.model.vos.community.warehouse.ExportDonatesVO">
        SELECT * FROM com_act_warehouse_donates
        WHERE community_id = #{exportDonatesDTO.communityId}
        WHERE community_id = ${exportDonatesDTO.communityId}
        <if test="exportDonatesDTO.status != null">
            AND status = #{exportDonatesDTO.status}
        </if>
@@ -66,7 +66,7 @@
    <select id="pageDonates"
            resultType="com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseDonatesVO">
        SELECT * FROM com_act_warehouse_donates
        WHERE community_id = #{pageDonatesDTO.communityId}
        WHERE community_id = ${pageDonatesDTO.communityId}
        <if test="pageDonatesDTO.isWhich != null and pageDonatesDTO.isWhich == 1">
            AND user_id = #{pageDonatesDTO.userId}
        </if>
@@ -106,27 +106,27 @@
    <select id="selectDonatesStatistics"
            resultType="com.panzhihua.common.model.vos.community.warehouse.DonatesStatisticsVO">
        SELECT
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2) as totalInc ,
            (SELECT IF(SUM(surplus_quantity) IS NULL,0,SUM(surplus_quantity)) FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2) as surplus,
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 AND signing_at LIKE #{currentYear}) as yearInc,
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 AND signing_at LIKE #{currentMonth}) as mothInc,
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 AND signing_at LIKE #{today}) as dayInc,
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = #{communityId} AND `status` = 3 AND actual_time LIKE #{currentYear}) as yearDec,
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = #{communityId} AND `status` = 3 AND actual_time LIKE #{currentMonth}) as mothDec,
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = #{communityId} AND `status` = 3 AND actual_time LIKE #{today}) as dayDec
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2) as totalInc ,
            (SELECT IF(SUM(surplus_quantity) IS NULL,0,SUM(surplus_quantity)) FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2) as surplus,
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2 AND signing_at LIKE #{currentYear}) as yearInc,
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2 AND signing_at LIKE #{currentMonth}) as mothInc,
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2 AND signing_at LIKE #{today}) as dayInc,
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = ${communityId} AND `status` = 3 AND actual_time LIKE #{currentYear}) as yearDec,
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = ${communityId} AND `status` = 3 AND actual_time LIKE #{currentMonth}) as mothDec,
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = ${communityId} AND `status` = 3 AND actual_time LIKE #{today}) as dayDec
    </select>
    <select id="getWarehouseDonateRecords" resultType="java.lang.String">
        SELECT CONCAT('收到爱心人士捐赠的',item,'x', quantity)
        FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 ORDER BY signing_at DESC limit #{pageSize}
        FROM com_act_warehouse_donates WHERE community_id = ${communityId} AND `status` = 2 ORDER BY signing_at DESC limit #{pageSize}
    </select>
    <select id="getWarehouseLoveTransfer" resultType="java.lang.String">
        SELECT t1.content FROM com_act_warehouse_operation t1
        LEFT JOIN com_act_warehouse_donates t2 ON t1.goods_id = t2.id
        WHERE t2.community_id = #{communityId} AND t1.`type` = 2 ORDER BY create_time DESC limit #{pageSize}
        WHERE t2.community_id = ${communityId} AND t1.`type` = 2 ORDER BY create_time DESC limit #{pageSize}
    </select>
    <select id="getWarehouseImages" resultType="java.lang.String">
        SELECT image FROM com_act_warehouse_donates
        WHERE community_id = #{communityId} AND `status` = 2 AND image IS NOT NULL AND image != '' ORDER BY signing_at DESC limit #{pageSize}
        WHERE community_id = ${communityId} AND `status` = 2 AND image IS NOT NULL AND image != '' ORDER BY signing_at DESC limit #{pageSize}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseOperationMapper.xml
@@ -26,7 +26,7 @@
                and t.goods_id=#{commonPage.paramId}
            </if>
            <if test="commonPage.communityId !=null">
                and t1.community_id =#{commonPage.communityId}
                and t1.community_id = ${commonPage.communityId}
            </if>
            <if test="commonPage.keyword !=null and commonPage.keyword !=''">
                and t1.item like concat('%',#{commonPage.keyword},'%')
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationDOMapper.xml
@@ -24,7 +24,7 @@
    </sql>
    <select id="listClusterApplets" resultType="com.panzhihua.common.model.vos.community.cluster.PageClusterVo">
        select id,`name` from com_cluster_organization where status = 1 and is_del = 2 and community_id = #{communityId} order by create_at desc
        select id,`name` from com_cluster_organization where status = 1 and is_del = 2 and community_id = ${communityId} order by create_at desc
    </select>
    <select id="pageClusterAdmin" resultType="com.panzhihua.common.model.vos.community.cluster.admin.PageClusterAdminVo">
@@ -40,7 +40,7 @@
        WHERE
            is_del = 2
            <if test="pageClusterAdminDto.communityId != null">
                and community_id = #{pageClusterAdminDto.communityId}
                and community_id = ${pageClusterAdminDto.communityId}
            </if>
            <if test="pageClusterAdminDto.status != null">
                and status = #{pageClusterAdminDto.status}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationMemberDOMapper.xml
@@ -34,7 +34,7 @@
            <where>
                ccom.status = 1 and ccom.is_del = 2
                <if test="pageClusterMemberDto.communityId != null">
                    and ccom.community_id = #{pageClusterMemberDto.communityId}
                    and ccom.community_id = ${pageClusterMemberDto.communityId}
                </if>
                <if test="pageClusterMemberDto.clusterId != null">
                    and ccom.cluster_id = #{pageClusterMemberDto.clusterId}
@@ -61,7 +61,7 @@
        WHERE
            ccom.is_del = 2
            <if test="pageClusterMemberAdminDto.communityId != null">
                and ccom.community_id = #{pageClusterMemberAdminDto.communityId}
                and ccom.community_id = ${pageClusterMemberAdminDto.communityId}
            </if>
            <if test="pageClusterMemberAdminDto.status != null">
                and ccom.`status` = #{pageClusterMemberAdminDto.status}
@@ -120,7 +120,7 @@
        WHERE
        ccom.is_del = 2
        <if test="pageClusterMemberAdminDto.communityId != null">
            and ccom.community_id = #{pageClusterMemberAdminDto.communityId}
            and ccom.community_id = ${pageClusterMemberAdminDto.communityId}
        </if>
        <if test="pageClusterMemberAdminDto.status != null">
            and ccom.`status` = #{pageClusterMemberAdminDto.status}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthElderliesMapper.xml
@@ -37,7 +37,7 @@
        FROM
            com_elder_auth_elderlies ceae
        WHERE
            community_id = #{communityId}
            community_id = ${communityId}
          AND EXISTS (
                SELECT
                    1
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthRecordsMapper.xml
@@ -57,7 +57,7 @@
                LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id
                LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id
        WHERE
            ceae.community_id = #{pageElderAuthRecordsDTO.communityId}
            ceae.community_id = ${pageElderAuthRecordsDTO.communityId}
        <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''">
            and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod}
        </if>
@@ -118,7 +118,7 @@
        LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id
        LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id
        WHERE
        ceae.community_id = #{pageElderAuthRecordsDTO.communityId}
        ceae.community_id = ${pageElderAuthRecordsDTO.communityId}
        <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''">
            and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod}
        </if>
@@ -179,7 +179,7 @@
        LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id
        LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id
        WHERE
        ceae.community_id = #{pageElderAuthRecordsDTO.communityId}
        ceae.community_id = ${pageElderAuthRecordsDTO.communityId}
        <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''">
            and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod}
        </if>
@@ -420,7 +420,7 @@
        LEFT JOIN sys_user su ON ceahr.submit_user_id = su.user_id
        LEFT JOIN com_elder_auth_records as cear on cear.id = ceahr.auth_id
        WHERE
        ceahr.community_id = #{pageElderAuthRecordsDTO.communityId}
        ceahr.community_id = ${pageElderAuthRecordsDTO.communityId}
        <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''">
            and ceahr.auth_period = #{pageElderAuthRecordsDTO.authPeriod}
        </if>
@@ -441,7 +441,7 @@
    </select>
    <select id="getNextIds" resultType="String">
        select id from com_elder_auth_records where approval_status = 1 and community_id = #{communityId}
        select id from com_elder_auth_records where approval_status = 1 and community_id = ${communityId}
    </select>
    <select id="queryRecordWithPage" resultType="com.panzhihua.common.model.vos.community.IdentityAuthRecordDetailVO">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthDOMapper.xml
@@ -56,7 +56,7 @@
        FROM
            com_act AS ca
        WHERE
            community_id = #{communityId}
            community_id = ${communityId}
    </select>
    <select id="getEldersAuthRecords" resultType="com.panzhihua.common.model.vos.elders.ComEldersAuthHistoryVO">
@@ -74,7 +74,7 @@
            LEFT JOIN com_elders_auth_user AS ceau ON ceau.id = cea.family_user_id
            LEFT JOIN com_elders_auth_elderly AS ceae ON ceae.id = ceau.big_age_id
        WHERE
            type = 1 and ceau.community_id = #{communityId}
            type = 1 and ceau.community_id = ${communityId}
            AND cea.create_at BETWEEN DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 00:00:00' ), INTERVAL extract( DAY FROM now())- 1 DAY ), '%Y-%m-%d %H:%i:%s' )
                AND DATE_FORMAT( date_sub( date_format( now(), '%y-%m-%d 23:59:59' ), INTERVAL extract( DAY FROM now()) DAY ), '%Y-%m-%d %H:%i:%s' )
        order by cea.create_at desc
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthElderlyMapper.xml
@@ -51,7 +51,7 @@
                AND domicile = #{pageComEldersAuthElderlyDTO.domicile}
            </if>
           <if test="pageComEldersAuthElderlyDTO.communityId!=null">
                AND community_id = #{pageComEldersAuthElderlyDTO.communityId}
                AND community_id = ${pageComEldersAuthElderlyDTO.communityId}
            </if>
           <if test="pageComEldersAuthElderlyDTO.isExist!=null">
                AND is_exist = #{pageComEldersAuthElderlyDTO.isExist}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthHistoryRecordMapper.xml
@@ -114,7 +114,7 @@
                and ceahr.is_alive = #{pageElderAuthStatisticDTO.isAlive}
            </if>
            <if test="pageElderAuthStatisticDTO.communityId != null">
                and ceahr.community_id = #{pageElderAuthStatisticDTO.communityId}
                and ceahr.community_id = ${pageElderAuthStatisticDTO.communityId}
            </if>
        </where>
        order by ceahr.create_at desc
@@ -129,7 +129,7 @@
                and auth_period = #{statisticHeaderDTO.authPeriod}
            </if>
            <if test="statisticHeaderDTO.communityId != null">
                and community_id = #{statisticHeaderDTO.communityId}
                and community_id = ${statisticHeaderDTO.communityId}
            </if>
            ) AS yesCount,
            ( SELECT count( id ) FROM com_elders_auth_history_record WHERE  is_auth = 2
@@ -137,7 +137,7 @@
                and auth_period = #{statisticHeaderDTO.authPeriod}
            </if>
            <if test="statisticHeaderDTO.communityId != null">
                and community_id = #{statisticHeaderDTO.communityId}
                and community_id = ${statisticHeaderDTO.communityId}
            </if>
            ) AS noCount
        FROM
@@ -147,7 +147,7 @@
                and auth_period = #{statisticHeaderDTO.authPeriod}
            </if>
            <if test="statisticHeaderDTO.communityId != null">
                and community_id = #{statisticHeaderDTO.communityId}
                and community_id = ${statisticHeaderDTO.communityId}
            </if>
        </where>
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEldersAuthStatisticsMapper.xml
@@ -34,7 +34,7 @@
                AND year = #{pageEldersAuthHistoryDTO.year}
            </if>
            <if test="pageEldersAuthHistoryDTO.communityId!=null">
                AND community_id = #{pageEldersAuthHistoryDTO.communityId}
                AND community_id = ${pageEldersAuthHistoryDTO.communityId}
            </if>
        </where>
        ORDER BY create_at desc
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngBuildingMapper.xml
@@ -51,7 +51,7 @@
    </resultMap>
    <select id="select" resultMap="selectMap">
        select t.village_id as villageId,t.name as villageName,t1.id,t1.name  from com_mng_village t left join com_mng_building t1 on t.village_id = t1.village_id where t.community_id = #{id} and t1.id is not null
        select t.village_id as villageId,t.name as villageName,t1.id,t1.name  from com_mng_village t left join com_mng_building t1 on t.village_id = t1.village_id where t.community_id = ${id} and t1.id is not null
    </select>
    <select id="pageBuildingAdmin" resultType="com.panzhihua.common.model.vos.community.building.admin.PageBuildingListAdminVo">
@@ -181,7 +181,7 @@
        FROM
            com_mng_population_house_user AS cmphu
            LEFT JOIN com_mng_population AS cmp ON cmp.id = cmphu.popul_id
            LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id and community_id = #{communityId}
            LEFT JOIN com_mng_population_community_tags AS cmpct ON cmp.id = cmpct.population_id and community_id = ${communityId}
        WHERE
            cmphu.house_id = #{houseId}
        <if test='relation != null '>
@@ -202,7 +202,7 @@
        FROM
            com_mng_village
        WHERE
            community_id = #{communityId}
            community_id = ${communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationCommunityTagsMapper.xml
@@ -37,7 +37,7 @@
    </update>
    <delete id="deletePopulationRelation">
        delete from com_mng_population_community_tags where community_id = #{communityId} and population_id in
        delete from com_mng_population_community_tags where community_id = ${communityId} and population_id in
        <foreach item="item" collection="ids" separator="," open="(" close=")" index="">
            #{item}
        </foreach>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -268,11 +268,11 @@
    </resultMap>
    <select id="getSecondHouseAddress" resultMap="selectMap">
        select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋',t1.floor,'单元',t1.code,'号') as name  from com_mng_village t left join com_mng_population_house t1 on t.village_id = t1.village_id where t.community_id = #{communityId}
        select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋',t1.floor,'单元',t1.code,'号') as name  from com_mng_village t left join com_mng_population_house t1 on t.village_id = t1.village_id where t.community_id = ${communityId}
    </select>
    <select id="getSecondHouse" resultMap="selectMap">
        select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋') as name  from com_mng_village t left join com_mng_population_house t1  on t.village_id = t1.village_id where t.community_id = #{communityId} GROUP BY t.village_id,t1.unit_no
        select t.village_id as villageId,concat(t.alley,t.house_num,'号') as villageName,t1.id,concat(t1.unit_no,'栋') as name  from com_mng_village t left join com_mng_population_house t1  on t.village_id = t1.village_id where t.community_id = ${communityId} GROUP BY t.village_id,t1.unit_no
    </select>
@@ -298,7 +298,7 @@
                AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%')    </if>
            <if test='comMngPopulationVO.label != null and comMngPopulationVO.label != &quot;&quot;'>
                AND cmpct.label LIKE concat('%',#{comMngPopulationVO.label},'%')    </if>
            <if test='comMngPopulationVO.actId != null'>   and cmpct.community_id = #{comMngPopulationVO.actId}
            <if test='comMngPopulationVO.actId != null'>   and cmpct.community_id = ${comMngPopulationVO.actId}
            </if>   <if test='comMngPopulationVO.outOrLocal != null'>
            and cmp.out_or_local = #{comMngPopulationVO.outOrLocal}    </if>
            <if test='comMngPopulationVO.villageId != null and comMngPopulationVO.villageId != &quot;&quot;'>
@@ -361,7 +361,7 @@
            LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id
            LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id
        WHERE
            cmpct.community_id = #{pageInputUserDTO.communityId}
            cmpct.community_id = ${pageInputUserDTO.communityId}
            AND cmpct.label IS NOT NULL
            <if test='pageInputUserDTO.name != null and pageInputUserDTO.name != &quot;&quot;'>
                AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%')
@@ -391,7 +391,7 @@
        LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id
        LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id
        WHERE
        cmpct.community_id = #{pageInputUserDTO.communityId}
        cmpct.community_id = ${pageInputUserDTO.communityId}
        AND cmpct.label IS NOT NULL
        <if test='pageInputUserDTO.name != null and pageInputUserDTO.name != &quot;&quot;'>
            AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%')
@@ -519,7 +519,7 @@
            AND cmp.house_id is not null  </if>
        <if test='populationListDTO.isHouse != null and populationListDTO.isHouse == 2'>
            AND cmp.house_id is null  </if>  <if test='populationListDTO.communityId != null'>
        AND cmpct.community_id = #{populationListDTO.communityId}  </if>
        AND cmpct.community_id = ${populationListDTO.communityId}  </if>
        <if test='populationListDTO.politicalOutlook != null'>
            AND cmp.political_outlook = #{populationListDTO.politicalOutlook}  </if>
    </select>
@@ -528,7 +528,7 @@
        SELECT    count( e.id ) AS eventZATotal,    IFNULL((     SELECT
        count( e1.id )      FROM      `event` AS e1
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id      WHERE
        egd1.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd1.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 1       AND event_deal_status = 4
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e1.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -536,7 +536,7 @@
            AND e1.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS yesEventZATotal,    IFNULL((     SELECT      count( e2.id )      FROM
        `event` AS e2      LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id      WHERE
        egd2.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd2.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 5       AND event_status = 2
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e2.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -544,7 +544,7 @@
            AND e2.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS eventTFTotal,    IFNULL((     SELECT      count( e3.id )      FROM      `event` AS e3
        LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id      WHERE
        egd3.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd3.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 5       AND event_deal_status = 4
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e3.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -552,7 +552,7 @@
            AND e3.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS yesEventTFTotal,    IFNULL((     SELECT      count( e4.id )      FROM
        `event` AS e4      LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id      WHERE
        egd4.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd4.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 6       AND event_status = 2
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e4.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -560,7 +560,7 @@
            AND e4.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS eventTSTotal,    IFNULL((     SELECT      count( e5.id )      FROM      `event` AS e5
        LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id      WHERE
        egd5.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd5.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 6       AND event_deal_status = 4
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e5.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -568,7 +568,7 @@
            AND e5.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS yesEventTSTotal,    IFNULL((     SELECT      count( e6.id )      FROM
        `event` AS e6      LEFT JOIN event_grid_data AS egd6 ON egd6.id = e6.grid_id      WHERE
        egd6.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd6.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 3       AND event_status = 2
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e6.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -576,7 +576,7 @@
            AND e6.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS eventMDTotal,    IFNULL((     SELECT      count( e7.id )      FROM      `event` AS e7
        LEFT JOIN event_grid_data AS egd7 ON egd7.id = e7.grid_id      WHERE
        egd7.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd7.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 3       AND event_deal_status = 4
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e7.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -584,7 +584,7 @@
            AND e7.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS yesEventMDTotal,    IFNULL((     SELECT      count( e8.id )      FROM
        `event` AS e8      LEFT JOIN event_grid_data AS egd8 ON egd8.id = e8.grid_id      WHERE
        egd8.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd8.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 4       AND event_status = 2
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e8.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -592,7 +592,7 @@
            AND e8.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS eventBWDTotal,    IFNULL((     SELECT      count( e9.id )      FROM      `event` AS e9
        LEFT JOIN event_grid_data AS egd9 ON egd9.id = e9.grid_id      WHERE
        egd9.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd9.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 4       AND event_deal_status = 4
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e9.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -600,7 +600,7 @@
            AND e9.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS yesEventBWDTotal,    IFNULL((     SELECT      count( e10.id )      FROM
        `event` AS e10      LEFT JOIN event_grid_data AS egd10 ON egd10.id = e10.grid_id      WHERE
        egd10.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd10.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 2       AND event_status = 2
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e10.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -608,25 +608,25 @@
            AND e10.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS eventGGTotal,    IFNULL((     SELECT      count( e11.id )      FROM
        `event` AS e11      LEFT JOIN event_grid_data AS egd11 ON egd11.id = e11.grid_id      WHERE
        egd11.grid_community_id = #{screenEventDTO.communityId}       AND event_category = 1
        egd11.grid_community_id = ${screenEventDTO.communityId}       AND event_category = 1
        AND event_type = 2       AND event_deal_status = 4
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e11.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
        <if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>
            AND e11.create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>      ),     0
        ) AS yesEventGGTotal,
        IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0  AND community_id = #{screenEventDTO.communityId}
        IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0  AND community_id = ${screenEventDTO.communityId}
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
        <if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>
            AND create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>   ), 0 ) AS eventSSPTotal,
        IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND `status` = 4 AND community_id = #{screenEventDTO.communityId}
        IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE del_tag = 0 AND `status` = 4 AND community_id = ${screenEventDTO.communityId}
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
        <if test='screenEventDTO.endTime != null and screenEventDTO.endTime != &quot;&quot;'>
            AND create_at <![CDATA[<=]]> #{screenEventDTO.endTime}    </if>   ), 0 ) AS yesEventSSPTotal
        FROM    `event` AS e    LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id    WHERE
        egd.grid_community_id = #{screenEventDTO.communityId}     AND event_status = 2 AND event_category = 1
        egd.grid_community_id = ${screenEventDTO.communityId}     AND event_status = 2 AND event_category = 1
        AND event_type = 1
        <if test='screenEventDTO.startTime != null and screenEventDTO.startTime != &quot;&quot;'>
            AND e.create_at <![CDATA[>=]]> #{screenEventDTO.startTime}    </if>
@@ -647,33 +647,33 @@
    <select id="getCivilParty" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilPartyStatisticsVO">
        SELECT
            count( id ) as committeeNum,
            (select count(id) from com_pb_dyn where community_id = #{communityId} and `type` = 1) as dynNum,
            (select count(id) from com_pb_activity where community_id = #{communityId}) as activityNum,
            (select count(id) from com_act_micro_wish where community_id = #{communityId}) as wishNum,
            (select count(id) from com_pb_member where community_id = #{communityId} and audit_result = 1) as partyNum,
            (select count(id) from com_pb_org where community_id = #{communityId} and parent_id = 0) as organizationNum,
            (select count(id) from com_mng_volunteer_mng where community_id = #{communityId} and state = 2) as volunteerNum,
            (select count(id) from com_act_questnaire where community_id = #{communityId}) as questionnaireNum
            (select count(id) from com_pb_dyn where community_id = ${communityId} and `type` = 1) as dynNum,
            (select count(id) from com_pb_activity where community_id = ${communityId}) as activityNum,
            (select count(id) from com_act_micro_wish where community_id = ${communityId}) as wishNum,
            (select count(id) from com_pb_member where community_id = ${communityId} and audit_result = 1) as partyNum,
            (select count(id) from com_pb_org where community_id = ${communityId} and parent_id = 0) as organizationNum,
            (select count(id) from com_mng_volunteer_mng where community_id = ${communityId} and state = 2) as volunteerNum,
            (select count(id) from com_act_questnaire where community_id = ${communityId}) as questionnaireNum
        FROM
            com_pb_member_role
        WHERE
            community_id = #{communityId}
            community_id = ${communityId}
    </select>
    <select id="getCivilGovernment" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilGovernmentStatisticsVO">
        SELECT
            count( id ) as noticeNum,
            (select count(id) from com_act_discuss where community_id = #{communityId} and is_del = 2) as discussNum,
            (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0) as easyNum,
            (select count(id) from com_act_neighbor_circle where community_id = #{communityId} and is_del = 2) as neighborNum,
            (select count(id) from com_act_activity where community_id = #{communityId}) as activityNum,
            (select count(id) from com_act_dyn where community_id = #{communityId}) as dynNum,
            (select count(id) from com_act_warehouse_donates where community_id = #{communityId}) as loveNum,
            (select count(id) from com_act_message where community_id = #{communityId}) as messageNum
            (select count(id) from com_act_discuss where community_id = ${communityId} and is_del = 2) as discussNum,
            (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0) as easyNum,
            (select count(id) from com_act_neighbor_circle where community_id = ${communityId} and is_del = 2) as neighborNum,
            (select count(id) from com_act_activity where community_id = ${communityId}) as activityNum,
            (select count(id) from com_act_dyn where community_id = ${communityId}) as dynNum,
            (select count(id) from com_act_warehouse_donates where community_id = ${communityId}) as loveNum,
            (select count(id) from com_act_message where community_id = ${communityId}) as messageNum
        FROM
            com_act_announcement
        WHERE
            community_id = #{communityId}
            community_id = ${communityId}
    </select>
    <select id="getCivilGrid" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilGridStatisticsVO">
@@ -686,7 +686,7 @@
                `event` AS e1
                LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id
            WHERE
                egd1.grid_community_id = #{communityId}
                egd1.grid_community_id = ${communityId}
                AND e1.event_status = 2
                AND e1.event_type = 1
                AND e1.event_category = 1
@@ -699,7 +699,7 @@
                `event` AS e2
                LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id
            WHERE
                egd2.grid_community_id = #{communityId}
                egd2.grid_community_id = ${communityId}
                AND e2.event_status = 2
                AND e2.event_type = 2
                AND e2.event_category = 1
@@ -712,7 +712,7 @@
                `event` AS e3
                LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id
            WHERE
                egd3.grid_community_id = #{communityId}
                egd3.grid_community_id = ${communityId}
                AND e3.event_status = 2
                AND e3.event_type = 3
                AND e3.event_category = 1
@@ -725,7 +725,7 @@
                `event` AS e4
                LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id
            WHERE
                egd4.grid_community_id = #{communityId}
                egd4.grid_community_id = ${communityId}
                AND e4.event_status = 2
                AND e4.event_type = 6
                AND e4.event_category = 1
@@ -738,7 +738,7 @@
                `event` AS e5
                LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id
            WHERE
                egd5.grid_community_id = #{communityId}
                egd5.grid_community_id = ${communityId}
                AND e5.event_status = 2
            ) AS eventNum,
            (
@@ -748,14 +748,14 @@
                sys_user AS su
                INNER JOIN event_grid_member_relation egmr ON egmr.grid_member_id = su.user_id
            WHERE
                egmr.grid_community_id = #{communityId}
                egmr.grid_community_id = ${communityId}
            ) AS xcNum,
            ( SELECT count( id ) FROM com_sw_patrol_record WHERE community_id = #{communityId} ) AS securityNum
            ( SELECT count( id ) FROM com_sw_patrol_record WHERE community_id = ${communityId} ) AS securityNum
        FROM
            `event` AS e
            LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE
            egd.grid_community_id = #{communityId}
            egd.grid_community_id = ${communityId}
            AND e.event_status = 2
            AND e.event_type = 5
            AND e.event_category = 1
@@ -776,9 +776,9 @@
                LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id
            WHERE
                car.title IN ( '返攀登记', '居家隔离', '11月24日之前居家隔离', '2021-11-4之前来攀登记' )
                AND carr.community_id = #{communityId}
                AND carr.community_id = ${communityId}
            ) AS situationNum,
            ( SELECT count( id ) FROM renting_hourse_register WHERE community_id = #{communityId} ) AS leaseNum,
            ( SELECT count( id ) FROM renting_hourse_register WHERE community_id = ${communityId} ) AS leaseNum,
            (
            SELECT
                count( cpr.id )
@@ -786,10 +786,10 @@
                com_property_repair AS cpr
                LEFT JOIN com_property AS cp ON cp.id = cpr.property_id
            WHERE
                cp.community_id = #{communityId}
                cp.community_id = ${communityId}
            ) AS repairNum,
            ( SELECT count( id ) FROM com_pension_auth_records WHERE community_id = #{communityId} ) AS pensionNum,
            ( SELECT count( id ) FROM com_elder_auth_records WHERE community_id = #{communityId} ) AS eldersNum,
            ( SELECT count( id ) FROM com_pension_auth_records WHERE community_id = ${communityId} ) AS pensionNum,
            ( SELECT count( id ) FROM com_elder_auth_records WHERE community_id = ${communityId} ) AS eldersNum,
            (
            SELECT
                count( cmpct.id )
@@ -798,7 +798,7 @@
                INNER JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id
            WHERE
                cmpct.label LIKE '%低保户%'
                AND cmpct.community_id = #{communityId}
                AND cmpct.community_id = ${communityId}
            ) AS subsistenceNum,
            (
            SELECT
@@ -807,7 +807,7 @@
                com_mng_population_community_tags AS cmpct
                INNER JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id
            WHERE
                cmpct.community_id = #{communityId}
                cmpct.community_id = ${communityId}
                AND cmp.death = 0
                AND cmpct.label LIKE '%高龄老人%'
            ) AS allowanceNum
@@ -1054,30 +1054,30 @@
    <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}
        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}
                                                AND camw.community_id = ${communityId}
    </select>
    <select id="getGridsGovernanceEventList"
            resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO">
@@ -1088,7 +1088,7 @@
        ELSE 2 END `status`
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = ${communityId}
        UNION ALL SELECT
        CASE
        WHEN classify_id = 4 THEN 1
@@ -1102,6 +1102,6 @@
        CASE
        WHEN handle_status = 2 THEN 1
        ELSE 2 END `status`
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)
        FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -7,24 +7,24 @@
    </select>
    <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine">
        select  ( select count(id) from com_pb_activity where status!=6 and community_id =#{communityId} and release_time >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y,
            (select count(id) from com_pb_activity where status!=6 and community_id =#{communityId} and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY
        select  ( select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and release_time >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y,
            (select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY
    </select>
    <select id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop">
        select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id =#{communityId} and t2.status = 1  order by integral_available_party desc
        select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id = ${communityId} and t2.status = 1  order by integral_available_party desc
    </select>
    <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData">
        select (select count(*) from com_act_work_guide ) guide,
        (select count(*) from com_act_announcement where community_id = #{communityId}) announcement,
        (select count(*) from com_elder_auth_elderlies where community_id = #{communityId}) eldersAuth,
        (select count(*) from com_convenient_merchants where (community_id = #{communityId} OR community_id = 0) and is_del =0) convenient,
        (select count(*) from renting_hourse_register where community_id = #{communityId}) rentingHouse,
        (select count(*) from com_property_alarm where community_id = #{communityId}) oneButton,
        (select count(*) from com_pension_auth_pensioners where community_id = #{communityId} ) pensionAuth,
        (select count(*) from com_pb_dyn where community_id = #{communityId} and type = 2) partyDyn,
        (select count(*) from com_property where community_id = #{communityId} ) property
        (select count(*) from com_act_announcement where community_id = ${communityId}) announcement,
        (select count(*) from com_elder_auth_elderlies where community_id = ${communityId}) eldersAuth,
        (select count(*) from com_convenient_merchants where (community_id = ${communityId} OR community_id = 0) and is_del =0) convenient,
        (select count(*) from renting_hourse_register where community_id = ${communityId}) rentingHouse,
        (select count(*) from com_property_alarm where community_id = ${communityId}) oneButton,
        (select count(*) from com_pension_auth_pensioners where community_id = ${communityId} ) pensionAuth,
        (select count(*) from com_pb_dyn where community_id = ${communityId} and type = 2) partyDyn,
        (select count(*) from com_property where community_id = ${communityId} ) property
    </select>
    <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser">
@@ -33,6 +33,6 @@
            select count(*) num,village_id
            from com_mng_population
            where act_id = #{communityId} GROUP BY village_id
        ) t1 on t.village_id = t1.village_id where t.community_id = #{communityId}
        ) t1 on t.village_id = t1.village_id where t.community_id = ${communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthHistoryRecordDOMapper.xml
@@ -79,7 +79,7 @@
                and cpahr.is_alive = #{pensionAuthStatisticDTO.isAlive}
            </if>
            <if test="pensionAuthStatisticDTO.communityId != null">
                and cpahr.community_id = #{pensionAuthStatisticDTO.communityId}
                and cpahr.community_id = ${pensionAuthStatisticDTO.communityId}
            </if>
        </where>
        order by cpahr.create_at desc
@@ -94,7 +94,7 @@
            and auth_period = #{statisticHeaderDTO.authPeriod}
        </if>
        <if test="statisticHeaderDTO.communityId != null">
            and community_id = #{statisticHeaderDTO.communityId}
            and community_id = ${statisticHeaderDTO.communityId}
        </if>
        ) AS yesCount,
        ( SELECT count( id ) FROM com_pension_auth_history_record WHERE  is_auth = 2
@@ -102,7 +102,7 @@
            and auth_period = #{statisticHeaderDTO.authPeriod}
        </if>
        <if test="statisticHeaderDTO.communityId != null">
            and community_id = #{statisticHeaderDTO.communityId}
            and community_id = ${statisticHeaderDTO.communityId}
        </if>
        ) AS noCount
        FROM
@@ -112,7 +112,7 @@
                and auth_period = #{statisticHeaderDTO.authPeriod}
            </if>
            <if test="statisticHeaderDTO.communityId != null">
                and community_id = #{statisticHeaderDTO.communityId}
                and community_id = ${statisticHeaderDTO.communityId}
            </if>
        </where>
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthPensionerMapper.xml
@@ -37,7 +37,7 @@
        FROM
            com_pension_auth_pensioners cpap
        WHERE
            community_id = #{communityId}
            community_id = ${communityId}
          AND EXISTS (
                SELECT
                    1
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthRecordMapper.xml
@@ -51,7 +51,7 @@
        LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id
        LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id
        WHERE
        cpap.community_id = #{pageElderAuthRecordsDTO.communityId}
        cpap.community_id = ${pageElderAuthRecordsDTO.communityId}
        <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''">
            and cpar.auth_period = #{pageElderAuthRecordsDTO.authPeriod}
        </if>
@@ -291,7 +291,7 @@
        LEFT JOIN com_pension_auth_pensioners cpap ON cpahr.elderlies_id = cpap.id
        LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id
        WHERE
        cpahr.community_id = #{pageElderAuthRecordsDTO.communityId}
        cpahr.community_id = ${pageElderAuthRecordsDTO.communityId}
        <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''">
            and cpahr.auth_period = #{pageElderAuthRecordsDTO.authPeriod}
        </if>
@@ -343,6 +343,6 @@
    </select>
    <select id="getNextIds" resultType="String">
        select id from com_pension_auth_records where approval_status = 1 and community_id = #{communityId}
        select id from com_pension_auth_records where approval_status = 1 and community_id = ${communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyMapper.xml
@@ -32,7 +32,7 @@
                and t.phone like concat(#{commonPage.phone},'%')
            </if>
            <if test="commonPage.paramId !=null">
                and t.community_id =#{commonPage.paramId}
                and t.community_id = ${commonPage.paramId}
            </if>
            <if test="commonPage.areaId !=null">
                and t.area_id =#{commonPage.areaId}
@@ -43,13 +43,13 @@
    <select id="getRepairPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( p1.create_time, '%m' ) AS filed, COUNT(1) AS num FROM com_property_repair p1
        LEFT JOIN com_property p2 ON p1.property_id = p2.id
        WHERE p2.community_id = #{communityId} AND DATE_FORMAT( p1.create_time, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        WHERE p2.community_id = ${communityId} AND DATE_FORMAT( p1.create_time, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getRepairTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(1) AS num FROM com_property_repair p1
        LEFT JOIN com_property p2 ON p1.property_id = p2.id
        WHERE p2.community_id = #{communityId} AND DATE_FORMAT( p1.create_time, '%Y%m' ) &lt;= #{date}
        WHERE p2.community_id = ${communityId} AND DATE_FORMAT( p1.create_time, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="getEventAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
@@ -57,11 +57,11 @@
        SELECT DATE_FORMAT( e.create_at, '%m' ) AS filed, COUNT(e.id) AS num
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = ${communityId}
                AND DATE_FORMAT( e.create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        UNION ALL SELECT
                DATE_FORMAT( create_at, '%m' ) AS filed,  COUNT(id) AS num
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        ) temp GROUP BY filed
    </select>
    <select id="getEventTotalPolylineDate"
@@ -70,11 +70,11 @@
        SELECT COUNT(e.id) AS num
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = ${communityId}
                AND DATE_FORMAT( e.create_at, '%Y%m' ) &lt;= #{date}
        UNION ALL SELECT
                COUNT(id) AS num
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
        FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
        ) temp
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyPublicityMapper.xml
@@ -35,7 +35,7 @@
        FROM com_property_publicity pp
        INNER JOIN com_property p ON pp.property_id = p.id
        LEFT JOIN com_mng_village v ON p.area_id = v.village_id
        WHERE pp.community_id = #{pageComPropertyPublicityDTO.communityId}
        WHERE pp.community_id = ${pageComPropertyPublicityDTO.communityId}
        <if test="pageComPropertyPublicityDTO.propertyId != null">
            AND pp.property_id = #{pageComPropertyPublicityDTO.propertyId}
        </if>
@@ -61,7 +61,7 @@
        SELECT pp.*, p.`name` AS propertyName, v.`name` AS villageName FROM com_property_publicity pp
        INNER JOIN com_property p ON pp.property_id = p.id
        LEFT JOIN com_mng_village v ON p.area_id = v.village_id
        WHERE pp.community_id = #{pageComPropertyPublicityDTO.communityId}
        WHERE pp.community_id = ${pageComPropertyPublicityDTO.communityId}
        <if test="pageComPropertyPublicityDTO.villageId != null">
            AND p.area_id = #{pageComPropertyPublicityDTO.villageId}
        </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwDangerReportMapper.xml
@@ -78,7 +78,7 @@
                left join com_act t on cspr.community_id =t.community_id
        <where>
            <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'>
                AND cspr.community_id = #{comSwPatrolRecordDTO.communityId}
                AND cspr.community_id = ${comSwPatrolRecordDTO.communityId}
            </if>
            <if test='comSwPatrolRecordDTO.communityId == 0'>
                AND t.area_code = '510423'
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwPatrolRecordMapper.xml
@@ -56,7 +56,7 @@
        left join com_act t on cspr.community_id = t.community_id
        <where>
            <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'>
                AND cspr.community_id = #{comSwPatrolRecordDTO.communityId}
                AND cspr.community_id = ${comSwPatrolRecordDTO.communityId}
            </if>
            <if test='comSwPatrolRecordDTO.communityId == 0'>
                AND t.area_code = '510423'
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwRotaMapper.xml
@@ -35,7 +35,7 @@
            csr.person_phone
        FROM
            com_sw_rota csr
        where csr.community_id = #{comSwRotaPageDTO.communityId}
        where csr.community_id = ${comSwRotaPageDTO.communityId}
        <if test='comSwRotaPageDTO.rotaPerson != null and comSwRotaPageDTO.rotaPerson != ""'>
            AND (csr.leader_name LIKE concat('%',#{comSwRotaPageDTO.rotaPerson},'%')
                or csr.person_name LIKE concat('%',#{comSwRotaPageDTO.rotaPerson},'%')
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwSafetyWorkRecordMapper.xml
@@ -39,7 +39,7 @@
        left join com_act t on cspr.community_id = t.community_id
        <where>
            <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'>
                AND cspr.community_id = #{comSwPatrolRecordDTO.communityId}
                AND cspr.community_id = ${comSwPatrolRecordDTO.communityId}
            </if>
            <if test='comSwPatrolRecordDTO.communityId == 0'>
                AND t.area_code = '510423'
@@ -62,22 +62,22 @@
    <select id="patrolRecordStatistics" resultType="com.panzhihua.common.model.vos.community.ComSwPatrolRecordStatisticsVO">
        select count(id) as patrolRecordTotal
             ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','1','%')) as huoTotal
             ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','2','%')) as xunTotal
             ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','3','%')) as yiTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_safety_work_record t2 on t1.report_id = t2.id where t.community_id = #{communityId}) as safetyWorkTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId}) as dangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and status = '3') as handledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%')) as huoDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%')) as xunDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%')) as yiDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status = '3' ) as huoHandledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status in ('1','2')) as huoHandlingDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status = '3' ) as xunHandledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status in ('1','2')) as xunHandlingDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status = '3' ) as yiHandledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status in ('1','2')) as yiHandlingDangerTotal
        from com_sw_patrol_record as cmp where community_id = #{communityId}
             ,(select count(id) from com_sw_patrol_record where community_id = ${communityId} and patrol_type LIKE concat('%','1','%')) as huoTotal
             ,(select count(id) from com_sw_patrol_record where community_id = ${communityId} and patrol_type LIKE concat('%','2','%')) as xunTotal
             ,(select count(id) from com_sw_patrol_record where community_id = ${communityId} and patrol_type LIKE concat('%','3','%')) as yiTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_safety_work_record t2 on t1.report_id = t2.id where t.community_id = ${communityId}) as safetyWorkTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId}) as dangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and status = '3') as handledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','1','%')) as huoDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','2','%')) as xunDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','3','%')) as yiDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','1','%') and status = '3' ) as huoHandledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','1','%') and status in ('1','2')) as huoHandlingDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','2','%') and status = '3' ) as xunHandledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','2','%') and status in ('1','2')) as xunHandlingDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','3','%') and status = '3' ) as yiHandledDangerTotal
             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = ${communityId} and danger_type like CONCAT('%','3','%') and status in ('1','2')) as yiHandlingDangerTotal
        from com_sw_patrol_record as cmp where community_id = ${communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml
@@ -48,7 +48,7 @@
            AND su.status = #{pageConvenientMerchantDTO.accountStatus}
        </if>
        <if test="pageConvenientMerchantDTO.communityId != null and pageConvenientMerchantDTO.communityId != 0">
            AND ccm.community_id = #{pageConvenientMerchantDTO.communityId}
            AND ccm.community_id = ${pageConvenientMerchantDTO.communityId}
        </if>
        <if test="pageConvenientMerchantDTO.businessStatus != null">
            AND ccm.business_status = #{pageConvenientMerchantDTO.businessStatus}
@@ -101,7 +101,7 @@
                    statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id
                    LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
                WHERE
                    ( ccm.community_id = #{communityId} or ccm.community_id = 0)  AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` = '犇师傅维修中心' GROUP BY cccs.id
                    ( ccm.community_id = ${communityId} or ccm.community_id = 0)  AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` = '犇师傅维修中心' GROUP BY cccs.id
                    ) temp
                GROUP BY
                    temp.id
@@ -119,7 +119,7 @@
            FROM com_convenient_merchants ccm
            LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE ( ccm.community_id = #{communityId} or ccm.community_id = 0)  AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` != '犇师傅维修中心' GROUP BY cccs.id
            WHERE ( ccm.community_id = ${communityId} or ccm.community_id = 0)  AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` != '犇师傅维修中心' GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
    </select>
    <select id="getClassifyMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
@@ -132,7 +132,7 @@
            FROM com_convenient_merchants ccm
            LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE (ccm.community_id = #{pageClassifyMerchantDTO.communityId} or ccm.community_id = 0) and ccm.is_del = 0  AND ccm.business_status = 1 AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId}
            WHERE (ccm.community_id = ${pageClassifyMerchantDTO.communityId} or ccm.community_id = 0) and ccm.is_del = 0  AND ccm.business_status = 1 AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId}
                GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
    </select>
@@ -161,7 +161,7 @@
            FROM com_convenient_merchants ccm
            LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE (ccm.community_id = #{pageSearchDTO.communityId} or ccm.community_id = 0) AND ccm.business_status = 1 AND ccm.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%')
            WHERE (ccm.community_id = ${pageSearchDTO.communityId} or ccm.community_id = 0) AND ccm.business_status = 1 AND ccm.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%')
                AND ccm.is_del = 0 GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
    </select>
@@ -171,7 +171,7 @@
        FROM  com_convenient_merchants ccm
        LEFT JOIN sys_user su ON ccm.user_id = su.user_id
        LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
        WHERE ccm.community_id = #{exportMerchantDTO.communityId} AND ccm.is_del = 0
        WHERE ccm.community_id = ${exportMerchantDTO.communityId} AND ccm.is_del = 0
        <if test="exportMerchantDTO.serviceId != null and exportMerchantDTO.serviceId != 0">
            AND ccss.service_category_id = #{exportMerchantDTO.serviceId}
        </if>
@@ -204,25 +204,25 @@
    </select>
    <select id="selectMerchantListByCommunity"
            resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT id, `name`, logo, lat, lon FROM com_convenient_merchants WHERE community_id = #{communityId} AND is_del = 0
        SELECT id, `name`, logo, lat, lon FROM com_convenient_merchants WHERE community_id = ${communityId} AND is_del = 0
    </select>
    <select id="getScreenPopularMerchants"
            resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT * FROM (
        SELECT id, `name`, consultation_volume, view_num
        FROM com_convenient_merchants
        WHERE (community_id = #{pagePopularMerchantDTO.communityId} OR community_id = 0) AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100
        WHERE (community_id = ${pagePopularMerchantDTO.communityId} OR community_id = 0) AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100
        ) temp
    </select>
    <select id="getIndexMerchantBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo">
        SELECT
        (SELECT 0) AS resourceTypeNum,
        (SELECT COUNT(id) FROM com_convenient_merchants WHERE (community_id = #{communityId} OR community_id = 0) AND is_del = 0) AS merchantNum,
        (SELECT COUNT(id) FROM com_convenient_merchants WHERE (community_id = ${communityId} OR community_id = 0) AND is_del = 0) AS merchantNum,
        (SELECT SUM(t1.consultation_volume)
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE (t2.community_id = #{communityId} OR t2.community_id = 0)) AS serviceTimes
        WHERE (t2.community_id = ${communityId} OR t2.community_id = 0)) AS serviceTimes
    </select>
    <select id="selectServiceTypeCircleData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
@@ -230,28 +230,28 @@
        FROM com_convenient_service_categories t1
        LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.service_category_id
        LEFT JOIN com_convenient_merchants t3 ON t2.merchant_id = t3.id
        WHERE (t3.community_id = #{communityId} OR t3.community_id = 0) AND t3.is_del = 0 GROUP BY t1.id
        WHERE (t3.community_id = ${communityId} OR t3.community_id = 0) AND t3.is_del = 0 GROUP BY t1.id
    </select>
    <select id="getServiceTimesAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( t1.statistic_date, '%m' ) AS filed, SUM(t1.consultation_volume) AS num
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE (t2.community_id = #{communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        WHERE (t2.community_id = ${communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getServiceTimesTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT IF(SUM(t1.consultation_volume) IS NULL,0,SUM(t1.consultation_volume)) AS num
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE (t2.community_id = #{communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y%m' ) &lt;= #{date}
        WHERE (t2.community_id = ${communityId} OR t2.community_id = 0) AND DATE_FORMAT( t1.statistic_date, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexMerchantList"
            resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT t1.id, t1.`name`, t1.logo, t1.introduction, GROUP_CONCAT(t2.`service_name`) serviceScope
        FROM com_convenient_merchants t1
        LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.merchant_id
        WHERE (t1.community_id = #{pageBaseDTO.communityId} OR t1.community_id = 0)
        WHERE (t1.community_id = ${pageBaseDTO.communityId} OR t1.community_id = 0)
        <if test="pageBaseDTO.paramId != null">
            AND t2.service_category_id = #{pageBaseDTO.paramId}
        </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientProductMapper.xml
@@ -78,7 +78,7 @@
        FROM com_convenient_products ccp
        LEFT JOIN com_convenient_merchants ccm  ON  ccp.merchant_id = ccm.id
        INNER JOIN com_convenient_product_specifications ccps ON ccp.id = ccps.product_id
        WHERE (ccm.community_id = #{pageSearchDTO.communityId} or ccm.community_id = 0) AND ccp.is_del = 0
        WHERE (ccm.community_id = ${pageSearchDTO.communityId} or ccm.community_id = 0) AND ccp.is_del = 0
        AND ccp.on_shelf = 1 AND ccps.is_del = 0 AND ccp.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%') GROUP BY ccp.id
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientServiceCategoryMapper.xml
@@ -50,6 +50,6 @@
        FROM com_convenient_service_categories ccsc
        INNER JOIN com_convenient_service_scope ccss ON ccsc.id = ccss.service_category_id
        LEFT JOIN com_convenient_merchants ccm ON ccss.merchant_id = ccm.id
        WHERE ccsc.is_del = 0 AND ccm.is_del = 0 AND( ccm.community_id = #{communityId} or ccm.community_id =0) AND ccm.business_status = 1 GROUP BY ccsc.id ORDER BY ccsc.weight desc
        WHERE ccsc.is_del = 0 AND ccm.is_del = 0 AND( ccm.community_id = ${communityId} or ccm.community_id =0) AND ccm.business_status = 1 GROUP BY ccsc.id ORDER BY ccsc.weight desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseOrderMapper.xml
@@ -48,7 +48,7 @@
        <where>
            1=1 and t2.type=1 and classification = 1
            <if test="commonPage.communityId!=null and commonPage.communityId!=0">
                and t.community_id = #{commonPage.communityId}
                and t.community_id = ${commonPage.communityId}
            </if>
            <if test="commonPage.userId!=null">
                and t.create_user=#{commonPage.userId}
@@ -65,7 +65,7 @@
        <where>
            1=1
            <if test="communityId !=null and communityId !=0">
                and community_id = #{communityId}
                and community_id = ${communityId}
            </if>
        </where>
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHoursePreOrderMapper.xml
@@ -24,7 +24,7 @@
        <where>
            1=1 and t2.type=1 and classification = 1
            <if test="commonPage.communityId!=null and commonPage.communityId!=0">
                and t.community_id = #{commonPage.communityId}
                and t.community_id = ${commonPage.communityId}
            </if>
            <if test="commonPage.userId!=null">
                and t.create_user=#{commonPage.userId}
@@ -38,11 +38,11 @@
    <select id="statics" resultType="com.panzhihua.common.model.vos.community.rentHouse.PreOrderStatics">
        select * from (
                           (select count(ding_money) as allOrder from  renting_hourse_pre_order where 1=1 <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if> ) allOrder,
                          (select count(ding_money) as allRefuse from  renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>) allRefuse,
                          (select count(*)  as refuseNum from  renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>)  refuseNum,
                          (select count(ding_money) as settledOrder from  renting_hourse_pre_order where status = 2 <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>)  settledOrder,
                          (select count(ding_money) as deductOrder from  renting_hourse_pre_order where status = 1 <if test="communityId !=null and communityId !=0">and community_id = #{communityId}</if>) deductOrder )
                           (select count(ding_money) as allOrder from  renting_hourse_pre_order where 1=1 <if test="communityId !=null and communityId !=0">and community_id = ${communityId}</if> ) allOrder,
                          (select count(ding_money) as allRefuse from  renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id = ${communityId}</if>) allRefuse,
                          (select count(*)  as refuseNum from  renting_hourse_pre_order where (status = 3 or status =4) <if test="communityId !=null and communityId !=0">and community_id = ${communityId}</if>)  refuseNum,
                          (select count(ding_money) as settledOrder from  renting_hourse_pre_order where status = 2 <if test="communityId !=null and communityId !=0">and community_id = ${communityId}</if>)  settledOrder,
                          (select count(ding_money) as deductOrder from  renting_hourse_pre_order where status = 1 <if test="communityId !=null and communityId !=0">and community_id = ${communityId}</if>) deductOrder )
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/RentingHourseRegisterMapper.xml
@@ -60,7 +60,7 @@
        t1.label, t1.address, t1.monthly_rent_money, t1.`status`, t1.detail_status, t1.auth_status, t1.auth_code, t2.url
        FROM renting_hourse_register t1
        LEFT JOIN (SELECT * FROM renting_hourse_file WHERE classification = 1 AND `type` = 1) t2 ON t1.id = t2.ref_id
        WHERE t1.community_id = #{pageRegisterDTO.communityId} AND t1.`status` = #{pageRegisterDTO.status}
        WHERE t1.community_id = ${pageRegisterDTO.communityId} AND t1.`status` = #{pageRegisterDTO.status}
        <if test="pageRegisterDTO.brn != null">
            <if test="pageRegisterDTO.moreBrn == null">
                AND t1.brn = #{pageRegisterDTO.brn}
@@ -105,7 +105,7 @@
               (POWER(MOD(ABS(longitude - #{nearbyDTO.longitude}),360),2) + POWER(ABS(latitude - #{nearbyDTO.latitude}),2)) AS distance
        from   renting_hourse_register t
        LEFT JOIN (SELECT * FROM renting_hourse_file WHERE classification = 1 AND `type` = 1) t1 ON t.id = t1.ref_id
        WHERE t.community_id = #{nearbyDTO.communityId} and t.status=2 and t.detail_status=3
        WHERE t.community_id = ${nearbyDTO.communityId} and t.status=2 and t.detail_status=3
          <if test="nearbyDTO.keyword !=null and nearbyDTO.keyword!=''">
              AND (
              village_name LIKE CONCAT('%', #{nearbyDTO.keyword}, '%')
@@ -126,7 +126,7 @@
        FROM renting_hourse_register t
        LEFT JOIN (SELECT * FROM renting_hourse_file WHERE classification = 1 AND `type` = 1) t1 ON t.id = t1.ref_id
        LEFT JOIN sys_user t2 ON t.tenant_user_id = t2.user_id
        WHERE t.community_id = #{pageRegisterDTO.communityId}
        WHERE t.community_id = ${pageRegisterDTO.communityId}
        <if test="pageRegisterDTO.status == null and pageRegisterDTO.isMy == null">
            AND t.`status` = 2
        </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/SysConfMapper.xml
@@ -52,7 +52,7 @@
                AND create_by = #{pageSysConfDTO.createBy}
            </if>
           <if test="pageSysConfDTO.communityId!=null">
                AND community_id = #{pageSysConfDTO.communityId}
                AND community_id = ${pageSysConfDTO.communityId}
            </if>
        </where>
        <if test="pageSysConfDTO.sortColumns!=null">
@@ -62,7 +62,7 @@
    <select id="getSysConfValue" resultType="string">
        SELECT `value` FROM `sys_conf` where `code` = #{key}
        <if test="communityId != null"> and community_id = #{communityId} </if>
        <if test="communityId != null"> and community_id = ${communityId} </if>
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/config/MybatisHmkInterceptor.java
@@ -3,59 +3,20 @@
import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.executor.statement.StatementHandler;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ParameterMapping;
import org.apache.ibatis.plugin.Intercepts;
import org.apache.ibatis.plugin.Signature;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Intercepts({
        @Signature(type = StatementHandler.class, method = "query", args = {Statement.class, ResultHandler.class})
})
public class MybatisHmkInterceptor implements InnerInterceptor {
    @Override
    public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException {
        String sql=boundSql.getSql();
        if(parameter instanceof Long){
            if(sql.contains("community_id = ?")&&(long)parameter==10086){
                sql=sql.replace("community_id = ?","community_id in (?)");
                parameter="30,31";
                boundSql.setAdditionalParameter("communityId",parameter);
            if(sql.contains("community_id = 10086")){
                sql=sql.replace("community_id = 10086","community_id in (30,31)");
                PluginUtils.mpBoundSql(boundSql).sql(sql);
            }
        }
        if(parameter instanceof Map){
            List<ParameterMapping> parameterMappingList=new ArrayList<>();
            if(sql.contains("community_id = ?")&&((Map<?, ?>) parameter).containsValue(10086L)){
                List<ParameterMapping> parameterMappings=boundSql.getParameterMappings();
                parameterMappings.forEach(parameterMapping -> {
                    if (parameterMapping.getProperty().equals("communityId")){
                        ParameterMapping parameterMapping1=new ParameterMapping.Builder(ms.getConfiguration(),"communityId",Object.class).build();
                        parameterMappingList.add(parameterMapping1);
                    }
                    else {
                        parameterMappingList.add(parameterMapping);
                    }
                });
                sql=sql.replace("community_id = ?","community_id in (?)");
                ((Map<?,?>) parameter).replaceAll((k,v)->{
                    if(v.toString().equals("10086")){
                        boundSql.setAdditionalParameter(k.toString(),"30,31");
                    }
                    return v;
                });
                PluginUtils.mpBoundSql(boundSql).parameterMappings(parameterMappingList);
                PluginUtils.mpBoundSql(boundSql).sql(sql);
            }
        }
        InnerInterceptor.super.beforeQuery(executor, ms, parameter, rowBounds, resultHandler, boundSql);
    }
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/config/MybatisPlusConfig.java
@@ -25,8 +25,8 @@
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        interceptor.addInnerInterceptor(new MybatisHmkInterceptor());
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        return interceptor;
    }
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/ComActEasyPhotoMapper.xml
@@ -57,7 +57,7 @@
        <where>
            AND caep.del_tag = 0
            <if test="easyAppDTO.communityId!=null">
                AND caep.community_id = #{easyAppDTO.communityId}
                AND caep.community_id = ${easyAppDTO.communityId}
            </if>
           <if test="easyAppDTO.isReport!=null">
                AND caep.is_report = #{easyAppDTO.isReport}
@@ -125,7 +125,7 @@
        <where>
            AND caep.del_tag = 0
            <if test="easyAppDTO.communityId!=null">
                AND caep.community_id = #{easyAppDTO.communityId}
                AND caep.community_id = ${easyAppDTO.communityId}
            </if>
            <if test="easyAppDTO.streetId!=null">
                and ca.street_id = #{easyAppDTO.streetId}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridDataMapper.xml
@@ -59,7 +59,7 @@
                AND egd.grid_street_id = #{pageEventGridDataDTO.gridStreetId}
            </if>
            <if test="pageEventGridDataDTO.gridCommunityId!=null">
                AND egd.grid_community_id = #{pageEventGridDataDTO.gridCommunityId}
                AND egd.grid_community_id = ${pageEventGridDataDTO.gridCommunityId}
            </if>
           <if test="pageEventGridDataDTO.keyWord != null and pageEventGridDataDTO.keyWord != &quot;&quot;">
@@ -90,7 +90,7 @@
                AND gd.grid_street_id = #{pageEventGridDataDTO.gridStreetId}
            </if>
            <if test="pageEventGridDataDTO.gridCommunityId!=null">
                AND gd.grid_community_id = #{pageEventGridDataDTO.gridCommunityId}
                AND gd.grid_community_id = ${pageEventGridDataDTO.gridCommunityId}
            </if>
            <if test="pageEventGridDataDTO.gridName!=null">
                AND gd.grid_name = #{pageEventGridDataDTO.gridName}
@@ -283,7 +283,7 @@
    </select>
    <select id="getComActByActId" resultType="com.panzhihua.common.model.vos.grid.ComGridActVO">
        select community_id,street_id,name,address,province_code,city_code,area_code from com_act where community_id = #{communityId}
        select community_id,street_id,name,address,province_code,city_code,area_code from com_act where community_id = ${communityId}
    </select>
    <select id="getGridMemberListsByGrid" resultType="com.panzhihua.common.model.vos.grid.EventGridMemberAdminVO">
        SELECT
@@ -302,7 +302,7 @@
        FROM event_grid_data gd LEFT JOIN com_mng_struct_area_district ad ON gd.zone_id = ad.district_adcode
            LEFT JOIN com_street st ON gd.grid_street_id = st.street_id
            LEFT JOIN com_act act ON gd.grid_community_id = act.community_id
        WHERE gd.grid_community_id = #{communityId}
        WHERE gd.grid_community_id = ${communityId}
    </select>
    <select id="selectGridWithArea" resultType="com.panzhihua.common.model.vos.grid.EventGridDataAreaVO"  parameterType="long">
        SELECT
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberGpsLogMapper.xml
@@ -36,7 +36,7 @@
                AND grid_street_id = #{pageEventGridMemberGpsLogDTO.gridStreetId}
            </if>
           <if test="pageEventGridMemberGpsLogDTO.gridCommunityId!=null">
                AND grid_community_id = #{pageEventGridMemberGpsLogDTO.gridCommunityId}
                AND grid_community_id = ${pageEventGridMemberGpsLogDTO.gridCommunityId}
            </if>
           <if test="pageEventGridMemberGpsLogDTO.gridId!=null">
                AND grid_id = #{pageEventGridMemberGpsLogDTO.gridId}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberRelationMapper.xml
@@ -34,7 +34,7 @@
                AND grid_street_id = #{pageEventGridMemberRelationDTO.gridStreetId}
            </if>
           <if test="pageEventGridMemberRelationDTO.gridCommunityId!=null">
                AND grid_community_id = #{pageEventGridMemberRelationDTO.gridCommunityId}
                AND grid_community_id = ${pageEventGridMemberRelationDTO.gridCommunityId}
            </if>
           <if test="pageEventGridMemberRelationDTO.gridId!=null">
                AND grid_id = #{pageEventGridMemberRelationDTO.gridId}
@@ -309,7 +309,7 @@
        WHERE
            su.type = 6
            <if test="statisticsAdminDTO.communityId!=null">
                AND su.community_id = #{statisticsAdminDTO.communityId}
                AND su.community_id = ${statisticsAdminDTO.communityId}
            </if>
            <if test="statisticsAdminDTO.nickName!=null and statisticsAdminDTO.nickName != &quot;&quot;">
                AND su.nick_name like concat (#{statisticsAdminDTO.nickName},'%')
@@ -326,7 +326,7 @@
            select community_id as id,`name` from com_act where state = 0
        </if>
        <if test="type != null and type == 2">
            select village_id as id,`name` from com_mng_village where community_id = #{id}
            select village_id as id,`name` from com_mng_village where community_id = ${id}
        </if>
        <if test="type != null and type == 3">
            select id,`name` from com_mng_building where village_id = #{id}
@@ -334,7 +334,7 @@
    </select>
    <select id="getVillageCount" resultType="Integer">
        select count(village_id) from com_mng_village where community_id = #{communityId}
        select count(village_id) from com_mng_village where community_id = ${communityId}
    </select>
    <select id="getBuildingCount" resultType="Integer">
@@ -355,7 +355,7 @@
        </if>
        <if test="cascadeListDTO.type != null and cascadeListDTO.type == 2">
            select id as gridId,grid_name AS gridName from event_grid_member_relation as egmr where grid_member_id = #{cascadeListDTO.userId} and grid_community_id = #{cascadeListDTO.communityId}
            select id as gridId,grid_name AS gridName from event_grid_member_relation as egmr where grid_member_id = #{cascadeListDTO.userId} and grid_community_id = ${cascadeListDTO.communityId}
        </if>
    </select>
@@ -380,7 +380,7 @@
            FROM
            event_grid_member_relation AS egmr
            left join event_grid_data as egd on egd.id = egmr.grid_id
            where egmr.grid_member_id = #{userId} and egd.grid_community_id = #{communityId}
            where egmr.grid_member_id = #{userId} and egd.grid_community_id = ${communityId}
        </if>
    </select>
@@ -622,7 +622,7 @@
        WHERE
        su.type = 6
        <if test="statisticsAdminDTO.communityId!=null">
            AND su.community_id = #{statisticsAdminDTO.communityId}
            AND su.community_id = ${statisticsAdminDTO.communityId}
        </if>
        <if test="statisticsAdminDTO.nickName!=null and statisticsAdminDTO.nickName != &quot;&quot;">
            AND su.nick_name like concat (#{statisticsAdminDTO.nickName},'%')
@@ -640,7 +640,7 @@
            left join event_grid_data as egd on egd.id = egmr.grid_id
            INNER JOIN sys_user AS su ON su.user_id = egmr.grid_member_id
            where egd.grid_community_id = #{communityId}
            where egd.grid_community_id = ${communityId}
    </select>
    <select id="getGridsMemberTrajectory" resultType="String">
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventGridMemberWarnLogMapper.xml
@@ -36,7 +36,7 @@
                AND grid_street_id = #{pageEventGridMemberWarnLogDTO.gridStreetId}
            </if>
           <if test="pageEventGridMemberWarnLogDTO.gridCommunityId!=null">
                AND grid_community_id = #{pageEventGridMemberWarnLogDTO.gridCommunityId}
                AND grid_community_id = ${pageEventGridMemberWarnLogDTO.gridCommunityId}
            </if>
           <if test="pageEventGridMemberWarnLogDTO.gridId!=null">
                AND grid_id = #{pageEventGridMemberWarnLogDTO.gridId}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -243,7 +243,7 @@
        <where>
            e.event_status != 3 AND e.event_category = 2
            <if test="pagePublicityEventDTO.communityId!=null">
                AND egd.grid_community_id = #{pagePublicityEventDTO.communityId}
                AND egd.grid_community_id = ${pagePublicityEventDTO.communityId}
            </if>
            <if test="pagePublicityEventDTO.revokeType!=null">
@@ -448,7 +448,7 @@
        <where>
            e.event_status != 3 AND e.event_category = 1
            <if test="pageEventManageDTO.communityId!=null">
                AND egd.grid_community_id = #{pageEventManageDTO.communityId}
                AND egd.grid_community_id = ${pageEventManageDTO.communityId}
            </if>
            <if test='pageEventManageDTO.keyWord != null and pageEventManageDTO.keyWord != &quot;&quot;'>
                AND (
@@ -524,7 +524,7 @@
                AND ( e.revoke_type = #{pagePublicityEventCommunityDTO.revokeType} OR e.revoke_type is null )
            </if>
            <if test="pagePublicityEventCommunityDTO.communityId!=null">
                AND egd.grid_community_id = #{pagePublicityEventCommunityDTO.communityId}
                AND egd.grid_community_id = ${pagePublicityEventCommunityDTO.communityId}
            </if>
            <if test="pagePublicityEventCommunityDTO.eventDealStatus!=null">
                AND e.event_deal_status = #{pagePublicityEventCommunityDTO.eventDealStatus}
@@ -963,7 +963,7 @@
            <where>
                and event_status = 2
                <if test='eventListDTO.communityId != null'>
                    and egd.grid_community_id = #{eventListDTO.communityId}
                    and egd.grid_community_id = ${eventListDTO.communityId}
                </if>
                <if test='eventListDTO.startTime != null and eventListDTO.startTime != &quot;&quot;'>
@@ -1024,7 +1024,7 @@
            <where>
                and cmpct.label IS NOT NULL
                <if test='specialPopulationDTO.communityId != null'>
                    and cmpct.community_id = #{specialPopulationDTO.communityId}
                    and cmpct.community_id = ${specialPopulationDTO.communityId}
                </if>
                <if test="specialPopulationDTO.keyWord!=null and specialPopulationDTO.keyWord!= &quot;&quot;">
                    AND (cmp.name like concat(#{specialPopulationDTO.keyWord},'%') or cmp.card_no_str like concat(#{specialPopulationDTO.keyWord},'%'))
@@ -1044,7 +1044,7 @@
                `event` AS e1
                LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id
            WHERE
                egd1.grid_community_id = #{communityId}
                egd1.grid_community_id = ${communityId}
                AND e1.event_category = 1
                AND e1.event_process_status = 1
                AND e1.event_status = 2
@@ -1057,7 +1057,7 @@
                `event` AS e2
                LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id
            WHERE
                egd2.grid_community_id = #{communityId}
                egd2.grid_community_id = ${communityId}
                AND e2.event_category = 2
                AND e2.event_status = 2
            ) AS propagandaNum,
@@ -1070,13 +1070,13 @@
            WHERE
                e3.event_status = 2
                AND e3.create_at LIKE CONCAT(#{nowDate},'%')) as currentNum,
                (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum
                (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum
                FROM
                    `event` AS e
                    LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
                WHERE
                    egd.grid_community_id = #{communityId}
                    egd.grid_community_id = ${communityId}
                    AND e.event_category = 1
                AND e.event_process_status = 2
            AND e.event_deal_status = 4
@@ -1091,7 +1091,7 @@
                `event` AS e1
                LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id
            WHERE
                egd1.grid_community_id = #{communityId}
                egd1.grid_community_id = ${communityId}
                AND e1.event_process_status = 2
            ORDER BY
                e1.create_at DESC
@@ -1101,7 +1101,7 @@
            `event` AS e
            LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE
            egd.grid_community_id = #{communityId}
            egd.grid_community_id = ${communityId}
            AND e.event_process_status = 2
        ORDER BY
            e.create_at ASC
@@ -1131,7 +1131,7 @@
            LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
            LEFT JOIN sys_user AS su ON su.user_id = e.grid_member_id
        WHERE
            egd.grid_community_id = #{communityId}
            egd.grid_community_id = ${communityId}
            AND e.event_status = 2
            AND e.event_deal_status in (1,2,3,4,6,8)
        ORDER BY
@@ -1148,10 +1148,10 @@
        `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE
        egd.grid_community_id = #{communityId} and e.event_status = 2 AND e.create_at <![CDATA[<=]]> #{end}) AS eventTotal,
        (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and create_at <![CDATA[<=]]> #{end}) as sspTotal,
        (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspAdd,
        (select count(id) from com_act_easy_photo where community_id = #{communityId} and handle_status = 2 and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspSolve,
        egd.grid_community_id = ${communityId} and e.event_status = 2 AND e.create_at <![CDATA[<=]]> #{end}) AS eventTotal,
        (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and create_at <![CDATA[<=]]> #{end}) as sspTotal,
        (select count(id) from com_act_easy_photo where community_id = ${communityId} and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspAdd,
        (select count(id) from com_act_easy_photo where community_id = ${communityId} and handle_status = 2 and del_tag = 0 and #{start} <![CDATA[<=]]> create_at AND create_at <![CDATA[<=]]> #{end}) as sspSolve,
        (
        SELECT
        COUNT( e1.id )
@@ -1159,7 +1159,7 @@
        `event` AS e1
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id
        WHERE
        egd1.grid_community_id = #{communityId} and e1.event_status = 2 AND #{start} <![CDATA[<=]]> e1.create_at AND e1.create_at <![CDATA[<=]]> #{end}) AS eventAdd,
        egd1.grid_community_id = ${communityId} and e1.event_status = 2 AND #{start} <![CDATA[<=]]> e1.create_at AND e1.create_at <![CDATA[<=]]> #{end}) AS eventAdd,
        (
        SELECT
        COUNT( e2.id )
@@ -1167,7 +1167,7 @@
        `event` AS e2
        LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id
        WHERE
        egd2.grid_community_id = #{communityId} and e2.event_process_status = 2 AND #{start} <![CDATA[<=]]> e2.create_at AND e2.create_at <![CDATA[<=]]> #{end}) AS eventSolve
        egd2.grid_community_id = ${communityId} and e2.event_process_status = 2 AND #{start} <![CDATA[<=]]> e2.create_at AND e2.create_at <![CDATA[<=]]> #{end}) AS eventSolve
        FROM
        DUAL
    </select>
@@ -1184,7 +1184,7 @@
                e1.event_category = 1
                AND e1.event_process_status = 2
                AND e1.event_type = 2
                AND egd1.grid_community_id = #{communityId}
                AND egd1.grid_community_id = ${communityId}
                ) AS ggTotal,(
            SELECT
                count( e2.id )
@@ -1195,7 +1195,7 @@
                e2.event_category = 1
                AND e2.event_process_status = 2
                AND e2.event_type = 3
                AND egd2.grid_community_id = #{communityId}
                AND egd2.grid_community_id = ${communityId}
                ) AS mdTotal,(
            SELECT
                count( e3.id )
@@ -1206,7 +1206,7 @@
                e3.event_category = 1
                AND e3.event_process_status = 2
                AND e3.event_type = 4
                AND egd3.grid_community_id = #{communityId}
                AND egd3.grid_community_id = ${communityId}
                ) AS bwdTotal,(
            SELECT
                count( e4.id )
@@ -1217,7 +1217,7 @@
                e4.event_category = 1
                AND e4.event_process_status = 2
                AND e4.event_type = 5
                AND egd4.grid_community_id = #{communityId}
                AND egd4.grid_community_id = ${communityId}
                ) AS tfTotal,(
            SELECT
                count( e5.id )
@@ -1228,9 +1228,9 @@
                e5.event_category = 1
                AND e5.event_process_status = 2
                AND e5.event_type = 6
                AND egd5.grid_community_id = #{communityId}
                AND egd5.grid_community_id = ${communityId}
            ) AS tsTotal,
            (select count(id) from com_act_easy_photo as caep where community_id = #{communityId} and del_tag = 0 and status = 4) as sspTotal
            (select count(id) from com_act_easy_photo as caep where community_id = ${communityId} and del_tag = 0 and status = 4) as sspTotal
        FROM
            `event` AS e
            LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
@@ -1238,7 +1238,7 @@
            e.event_category = 1
            AND e.event_process_status = 2
            AND e.event_type = 1
            AND egd.grid_community_id = #{communityId}
            AND egd.grid_community_id = ${communityId}
    </select>
    <select id="getNoComplete" resultType="com.panzhihua.common.model.vos.screen.EventTypeWorkVO">
@@ -1254,7 +1254,7 @@
                AND e1.event_process_status = 1
                AND e1.event_status = 2
                AND e1.event_type = 2
                AND egd1.grid_community_id = #{communityId}
                AND egd1.grid_community_id = ${communityId}
                ) AS ggTotal,(
            SELECT
                count( e2.id )
@@ -1266,7 +1266,7 @@
                AND e2.event_process_status = 1
                AND e2.event_status = 2
                AND e2.event_type = 3
                AND egd2.grid_community_id = #{communityId}
                AND egd2.grid_community_id = ${communityId}
                ) AS mdTotal,(
            SELECT
                count( e3.id )
@@ -1278,7 +1278,7 @@
                AND e3.event_process_status = 1
                AND e3.event_status = 2
                AND e3.event_type = 4
                AND egd3.grid_community_id = #{communityId}
                AND egd3.grid_community_id = ${communityId}
                ) AS bwdTotal,(
            SELECT
                count( e4.id )
@@ -1290,7 +1290,7 @@
                AND e4.event_process_status = 1
                AND e4.event_status = 2
                AND e4.event_type = 5
                AND egd4.grid_community_id = #{communityId}
                AND egd4.grid_community_id = ${communityId}
                ) AS tfTotal,(
            SELECT
                count( e5.id )
@@ -1302,9 +1302,9 @@
                AND e5.event_process_status = 1
                AND e5.event_status = 2
                AND e5.event_type = 6
                AND egd5.grid_community_id = #{communityId}
                AND egd5.grid_community_id = ${communityId}
            ) AS tsTotal,
            (select count(id) from com_act_easy_photo as caep where community_id = #{communityId} and del_tag = 0 and status in (1,2)) as sspTotal
            (select count(id) from com_act_easy_photo as caep where community_id = ${communityId} and del_tag = 0 and status in (1,2)) as sspTotal
        FROM
            `event` AS e
            LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
@@ -1313,18 +1313,18 @@
            AND e.event_process_status = 1
            AND e.event_status = 2
            AND e.event_type = 1
            AND egd.grid_community_id = #{communityId}
            AND egd.grid_community_id = ${communityId}
    </select>
    <select id="getSSPEventTotal" resultType="Map">
        SELECT
            count( id ) as noEventSSPTotal,
            ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 and del_tag = 0 AND community_id = #{communityId} ) AS eventSSPTotal
            ( SELECT count( id ) FROM com_act_easy_photo WHERE handle_status = 2 and del_tag = 0 AND community_id = ${communityId} ) AS eventSSPTotal
        FROM
            com_act_easy_photo
        WHERE
            handle_status = 1 and del_tag = 0
            AND community_id = #{communityId}
            AND community_id = ${communityId}
    </select>
    <select id="getEventListByCommunityId" parameterType="Long"
@@ -1340,14 +1340,14 @@
        WHERE
            e.event_category = 1
            AND e.event_status = 2
            AND egd.grid_community_id = #{communityId}
            AND egd.grid_community_id = ${communityId}
            AND e.event_deal_status IN (1,2,3,4)
            union all
            select id,7 as type,lng_lat as latLng,handle_status as status from com_act_easy_photo as caep where community_id = #{communityId} and lng_lat is not null
            select id,7 as type,lng_lat as latLng,handle_status as status from com_act_easy_photo as caep where community_id = ${communityId} and lng_lat is not null
    </select>
    <select id="getCivilScreenVillageList" parameterType="Long"  resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO">
        SELECT `NAME`,  user_sum,  lng,  lat,  village_images,  village_id  FROM  com_mng_village AS cmv  WHERE  community_id = #{communityId}
        SELECT `NAME`,  user_sum,  lng,  lat,  village_images,  village_id  FROM  com_mng_village AS cmv  WHERE  community_id = ${communityId}
    </select>
    <select id="getVillagePopulationTotal" parameterType="Long" resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO">
@@ -1419,7 +1419,7 @@
        ELSE 2 END `status`
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = ${communityId}
        UNION ALL SELECT
        CASE
        WHEN classify_id = 4 THEN 1
@@ -1433,7 +1433,7 @@
        CASE
        WHEN handle_status = 2 THEN 1
        ELSE 2 END `status`
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)
        FROM com_act_easy_photo WHERE community_id = ${communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)
    </select>
    <select id="getVillagePopulationTotalNew"
            resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO">
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventVisitingTasksMapper.xml
@@ -64,7 +64,7 @@
        left join event_grid_data egd on egd.id = vt.grid_id
        where 1=1
        <if test = "query.communityId != null">
            and cmpct.community_id = #{query.communityId}
            and cmpct.community_id = ${query.communityId}
        </if>
        <if test = "query.status != null and query.status != 0">
            and vt.event_status = #{query.status}
@@ -158,7 +158,7 @@
    <select id="findUserByCommunityId" resultType="java.util.Map">
        SELECT u.user_id,u.name,u.phone,a.street_id FROM sys_user u
        LEFT JOIN com_act a ON u.community_id = a.community_id
        WHERE u.community_id = #{communityId} and u.type = #{type} limit 1
        WHERE u.community_id = ${communityId} and u.type = #{type} limit 1
    </select>
    <select id="findUserById" resultType="java.util.Map">
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/config/MybatisHmkInterceptor.java
@@ -3,59 +3,20 @@
import com.baomidou.mybatisplus.core.toolkit.PluginUtils;
import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.executor.statement.StatementHandler;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ParameterMapping;
import org.apache.ibatis.plugin.Intercepts;
import org.apache.ibatis.plugin.Signature;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Intercepts({
        @Signature(type = StatementHandler.class, method = "query", args = {Statement.class, ResultHandler.class})
})
public class MybatisHmkInterceptor implements InnerInterceptor {
    @Override
    public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException {
        String sql=boundSql.getSql();
        if(parameter instanceof Long){
            if(sql.contains("community_id = ?")&&(long)parameter==10086){
                sql=sql.replace("community_id = ?","community_id in (?)");
                parameter="30,31";
                boundSql.setAdditionalParameter("communityId",parameter);
            if(sql.contains("community_id = 10086")){
                sql=sql.replace("community_id = 10086","community_id in (30,31)");
                PluginUtils.mpBoundSql(boundSql).sql(sql);
            }
        }
        if(parameter instanceof Map){
            List<ParameterMapping> parameterMappingList=new ArrayList<>();
            if(sql.contains("community_id = ?")&&((Map<?, ?>) parameter).containsValue(10086L)){
                List<ParameterMapping> parameterMappings=boundSql.getParameterMappings();
                parameterMappings.forEach(parameterMapping -> {
                    if (parameterMapping.getProperty().equals("communityId")){
                        ParameterMapping parameterMapping1=new ParameterMapping.Builder(ms.getConfiguration(),"communityId",Object.class).build();
                        parameterMappingList.add(parameterMapping1);
                    }
                    else {
                        parameterMappingList.add(parameterMapping);
                    }
                });
                sql=sql.replace("community_id = ?","community_id in (?)");
                ((Map<?,?>) parameter).replaceAll((k,v)->{
                    if(v.toString().equals("10086")){
                        boundSql.setAdditionalParameter(k.toString(),"30,31");
                    }
                    return v;
                });
                PluginUtils.mpBoundSql(boundSql).parameterMappings(parameterMappingList);
                PluginUtils.mpBoundSql(boundSql).sql(sql);
            }
        }
        InnerInterceptor.super.beforeQuery(executor, ms, parameter, rowBounds, resultHandler, boundSql);
    }
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/config/MybatisPlusConfig.java
@@ -23,8 +23,8 @@
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        interceptor.addInnerInterceptor(new MybatisHmkInterceptor());
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        return interceptor;
    }
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComBpActivityDAO.java
@@ -48,7 +48,7 @@
        + "a.activity_time_begin,\n" + "a.activity_time_end,\n" + "a.enroll_time_begin,\n" + "a.cover,\n"
        + "if(u.type=3 ,'管理员',u.name)createByName,\n" + "a.enroll_time_end \n" + "FROM\n" + "com_pb_activity a\n"
        + "left join sys_user u on a.create_by=u.user_id \n"
        + "where a.community_id = #{partyBuildingActivityVO.communityId}\n"
        + "where a.community_id = ${partyBuildingActivityVO.communityId}\n"
        + "<if test='partyBuildingActivityVO.name != null and partyBuildingActivityVO.name.trim() != &quot;&quot;'>"
        + "and a.name = #{partyBuildingActivityVO.name} \n" + " </if> "
        + "<if test='partyBuildingActivityVO.isAppliets != null and partyBuildingActivityVO.isAppliets==1'>"
@@ -107,6 +107,6 @@
     *            社区id
     * @return 社区名字
     */
    @Select("select name from com_act where community_id = #{communityId}")
    @Select("select name from com_act where community_id = ${communityId}")
    String selectCommunityNameByCommunityId(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbActivityMemberDAO.java
@@ -51,7 +51,7 @@
        + "m.activity_id =#{id}")
    List<Long> selectAllPartyBuildingActivityMembers(Long id);
    @Select("select m.id from sys_user u join com_pb_member m on u.id_card=m.id_card and u.community_id = #{communityId} and u.user_id=#{userId} ")
    @Select("select m.id from sys_user u join com_pb_member m on u.id_card=m.id_card and u.community_id = ${communityId} and u.user_id=#{userId} ")
    Long selectMemberIdByUserId(@Param("userId") Long userId, @Param("communityId") Long communityId);
    @Select("select type from sys_user where user_id=#{createBy}")
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbDynDAO.java
@@ -35,7 +35,7 @@
        + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id  left join com_act t on d.community_id = t.community_id\n"
        + "where d.type=#{partyBuildingComPbDynVO.type}  \n"
        + "<if test='partyBuildingComPbDynVO.communityId != null and partyBuildingComPbDynVO.communityId != 0'>"
        + "and d.community_id = #{partyBuildingComPbDynVO.communityId} \n" + " </if> "
        + "and d.community_id = ${partyBuildingComPbDynVO.communityId} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.dynType != null and partyBuildingComPbDynVO.dynType != 0'>"
        + "and d.dyn_type = #{partyBuildingComPbDynVO.dynType} \n" + " </if> "
        + "<if test='partyBuildingComPbDynVO.title != null and partyBuildingComPbDynVO.title.trim() != &quot;&quot;'>"
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberDAO.java
@@ -41,7 +41,7 @@
        + "DATE_FORMAT( NOW(), '%Y-%m-%d' )) partyAge,\n" + "m.join_time,\n" + "m.employment_time,\n" + "CASE\n"
        + "WHEN u.id_card IS NULL THEN\n" + "'未注册' ELSE '已注册' \n" + "END STATUS \n" + "FROM\n" + "com_pb_member m\n"
        + "LEFT JOIN sys_user u ON m.id_card = u.id_card\n" + "LEFT JOIN com_pb_org o ON m.org_id = o.id"
        + " where m.community_id = #{pagePartyOrganizationVO.communityId} and m.audit_result='1' "
        + " where m.community_id = ${pagePartyOrganizationVO.communityId} and m.audit_result='1' "
        + "<if test='pagePartyOrganizationVO.orgName != null and pagePartyOrganizationVO.orgName != &quot;&quot;'>"
        + "and o.name like concat(#{pagePartyOrganizationVO.orgName},'%') " + " </if> "
        + "<if test='pagePartyOrganizationVO.orgId != null'>" + " and o.id = #{pagePartyOrganizationVO.orgId} "
@@ -92,7 +92,7 @@
        + "<if test='pagePartyBuildingMemberVO.auditStatus != null'>"
        + " and m.audit_result = #{pagePartyBuildingMemberVO.auditStatus}" + " </if> "
        + "<if test='pagePartyBuildingMemberVO.communityId != null'>"
        + " and m.community_id = #{pagePartyBuildingMemberVO.communityId}" + " </if> " + " order by m.join_time desc "
        + " and m.community_id = ${pagePartyBuildingMemberVO.communityId}" + " </if> " + " order by m.join_time desc "
        + "</script>")
    IPage<PartyBuildingMemberVO> pagePartyBuildingMembersVO(Page page,
        @Param("pagePartyBuildingMemberVO") PagePartyBuildingMemberVO pagePartyBuildingMemberVO);
@@ -101,7 +101,7 @@
        + "select cpm.name as comName,cpm.id_card,cpm.join_time,cpm.employment_time,ca.`name` as communityName,cpo.name as orgName from com_pb_member as cpm "
        + " left join com_act as ca on ca.community_id = cpm.community_id "
        + " left join com_pb_org as cpo on cpo.id = cpm.org_id " + " LEFT JOIN sys_user u ON cpm.id_card = u.id_card "
        + " where cpm.community_id = #{organizationVO.communityId} and cpm.audit_result = 1 "
        + " where cpm.community_id = ${organizationVO.communityId} and cpm.audit_result = 1 "
        + "<if test='organizationVO.orgName != null'>" + " and cpo.name LIKE CONCAT('%',#{organizationVO.orgName},'%') "
        + " </if> " + "<if test='organizationVO.account != null and organizationVO.account != &quot;&quot;'>"
        + " and u.phone like concat (#{organizationVO.account},'%')" + " </if> "
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbMemberRoleDAO.java
@@ -32,7 +32,7 @@
    // "</script>")
    @Select("<script> " + "SELECT\n" + "*,\n" + "TIMESTAMPDIFF(\n" + "YEAR,\n" + "t.birth_time,\n"
        + "DATE_FORMAT( NOW(), '%Y-%m-%d' )) age\n" + "FROM\n" + "com_pb_member_role t\n" + "WHERE\n"
        + "t.community_id = #{partyCommitteeVO.communityId} \n" + "</script>")
        + "t.community_id = ${partyCommitteeVO.communityId} \n" + "</script>")
    IPage<PartyCommitteeVO> pagePartyOrganization(Page page,
        @Param("partyCommitteeVO") PartyCommitteeVO partyCommitteeVO);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbOrgDAO.java
@@ -19,7 +19,7 @@
@Mapper
public interface ComPbOrgDAO extends BaseMapper<ComPbOrgDO> {
    @Select("select id,`name`,`status` from com_pb_org where community_id = #{partyOrganizationVO.communityId}")
    @Select("select id,`name`,`status` from com_pb_org where community_id = ${partyOrganizationVO.communityId}")
    IPage<PartyOrganizationVO> listPartyOrganizationAll(Page page,
        @Param("partyOrganizationVO") PartyOrganizationVO partyOrganizationVO);
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/dao/ComPbServiceTeamDAO.java
@@ -23,7 +23,7 @@
public interface ComPbServiceTeamDAO extends BaseMapper<ComPbServiceTeamDO> {
    @Select("<script> " + "SELECT\n" + "* \n" + "FROM\n" + "com_pb_service_team \n"
        + " where community_id = #{pageComPbServiceTeamDTO.communityId}"
        + " where community_id = ${pageComPbServiceTeamDTO.communityId}"
        + "<if test='pageComPbServiceTeamDTO.name != null and pageComPbServiceTeamDTO.name.trim() != &quot;&quot;'>"
        + " and name LIKE concat( #{pageComPbServiceTeamDTO.name}, '%' ) \n" + " </if> "
        + "<if test='pageComPbServiceTeamDTO.job != null and pageComPbServiceTeamDTO.job.trim() != &quot;&quot;'>"
@@ -35,7 +35,7 @@
    ComPbServiceTeamDO selectComPbServiceTeamById(@Param("id") Long id);
    @Select("<script> " + "SELECT\n" + "* \n" + "FROM\n" + "com_pb_service_team \n"
        + " where community_id = #{communityId}" + "<if test='param != null and param != &quot;&quot;'>"
        + " where community_id = ${communityId}" + "<if test='param != null and param != &quot;&quot;'>"
        + " and name LIKE concat( #{param}, '%' ) \n" + " </if> " + "</script>")
    List<ComPbServiceTeamVO> getTotlePerson(@Param("param") String param, @Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmMapper.xml
@@ -26,7 +26,7 @@
        <where>
            1=1
            <if test="commonPage.paramId !=null">
                and t1.community_id =#{commonPage.paramId}
                and t1.community_id = ${commonPage.paramId}
            </if>
            <if test="commonPage.type !=null">
                and t.type =#{commonPage.type}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmSettingMapper.xml
@@ -11,7 +11,7 @@
    </resultMap>
    <select id="getByCommunityId" resultMap="ComPropertyAlarmSettingBaseResultMap">
        select * from com_property_alarm_setting where community_id =#{community_id} order by create_time desc limit 1
        select * from com_property_alarm_setting where community_id = ${community_id} order by create_time desc limit 1
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyEquipmentMapper.xml
@@ -25,7 +25,7 @@
                and type =#{commonPage.type}
            </if>
            <if test="commonPage.paramId !=null">
                and community_id =#{commonPage.paramId}
                and community_id = ${commonPage.paramId}
            </if>
            <if test="commonPage.name!=null and commonPage.name!=''">
                and name like concat(#{commonPage.name},'%')
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyHelpMapper.xml
@@ -21,7 +21,7 @@
                and status =#{commonPage.status}
            </if>
            <if test="commonPage.paramId !=null">
                and community_id =#{commonPage.paramId}
                and community_id = ${commonPage.paramId}
            </if>
        </where>
        order by create_time desc
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml
@@ -49,7 +49,7 @@
                and t1.name like concat(#{commonPage.systemName},'%')
            </if>
            <if test="commonPage.paramId !=null and commonPage.paramId !=0">
                and t2.community_id =#{commonPage.paramId}
                and t2.community_id = ${commonPage.paramId}
            </if>
            <if test="commonPage.areaId !=null and commonPage.areaId !=0">
                and t2.area_id =#{commonPage.areaId}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/mapper/UserDao.xml