| | |
| | | " egd.grid_community_id = #{communityId} " + |
| | | " AND e.event_deal_status IN ( 1, 4 ) " + |
| | | "ORDER BY " + |
| | | " e.create_at DESC " + |
| | | " e.happen_time DESC " + |
| | | " LIMIT 8") |
| | | List<IndexEventListStatisticsVO> getScreenIndexByEventList(@Param("communityId") Long communityId); |
| | | |
| | |
| | | @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, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) as aa where aa.age<= 16) as age16," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 16 and aa.age<= 27) AS age27," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 27 and aa.age<= 35) AS age35," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 35 and aa.age<= 45) AS age45," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 45 and aa.age<= 55) AS age55," + |
| | | "(SELECT COUNT(aa.age) FROM " + |
| | | "(SELECT (SELECT TIMESTAMPDIFF(YEAR, birthday, CURDATE()) ) AS age FROM com_mng_population WHERE act_id = #{communityId}) AS aa WHERE aa.age > 55) AS age55over") |
| | | Map<String, Long> indexCountByAge(@Param("communityId")Long communityId); |
| | | |
| | | } |