| | |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0 and u.app_id=#{areaCode} |
| | | left join (SELECT count( user_id ) dayNum,community_id FROM sys_user WHERE type = 1 and app_id=#{areaCode} |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00') GROUP BY community_id) t1 on a.community_id = t1.community_id GROUP BY a.community_id |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00') GROUP BY community_id) t1 on a.community_id = t1.community_id where a.app_id =#{areaCode} GROUP BY a.community_id |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrderMonth" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id |
| | | and u.type=1 and a.state=0 and u.app_id=#{areaCode} and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | | <select id="pageUserBackstage" resultType="com.panzhihua.common.model.vos.user.AdministratorsUserVO"> |
| | |
| | | sys_user AS su |
| | | LEFT JOIN com_act AS ca ON ca.community_id = su.community_id |
| | | WHERE |
| | | type = 1 and state = 0 |
| | | type = 1 and state = 0 and ca.app_id = #{areaCode} |
| | | AND ca.street_id = cs.street_id |
| | | ) AS userNum |
| | | FROM |
| | | `com_street` AS cs |
| | | `com_street` AS cs where cs.app_id = #{areaCode} |
| | | order by userNum desc |
| | | </select> |
| | | |