| | |
| | | select t.* from ( |
| | | SELECT |
| | | a.`name`, |
| | | COUNT(u.user_id)num |
| | | COUNT(u.user_id)num, |
| | | (SELECT count( user_id ) FROM sys_user WHERE type = 1 and community_id = a.community_id |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00')) as dayNum |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrderMonth" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | | select t.* from ( |
| | | SELECT |
| | | a.`name`, |
| | | COUNT(u.user_id)num, |
| | | (SELECT count( user_id ) FROM sys_user WHERE type = 1 and community_id = a.community_id |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00')) as dayNum |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id |
| | | and u.type=1 and u.create_at <![CDATA[ >= ]]> DATE_SUB(DATE_FORMAT(CURDATE(),'%Y-%m-%d 00:00:00'),INTERVAL 0 DAY) |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | DATE_FORMAT( #{date1}, '%Y-%m-%d' )= DATE_FORMAT( a.create_at,'%Y-%m-%d') |
| | | </select> |
| | | |
| | | <select id="selectCommunityAddUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | | select count(user_id) as num, |
| | | (SELECT count( user_id ) FROM sys_user WHERE type = 1 |
| | | AND last_login_time <![CDATA[ >= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 00:00:00') |
| | | AND last_login_time <![CDATA[ <= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 23:59:59')) as dayNum from sys_user as su |
| | | where su.create_at <![CDATA[ >= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 00:00:00'),INTERVAL 0 DAY) |
| | | and su.create_at <![CDATA[ <= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 23:59:59'),INTERVAL 0 DAY) |
| | | and su.type = 1 |
| | | </select> |
| | | |
| | | <update id="gridMemberEditStatus"> |
| | | update sys_user set status = #{gridMemberEditDTO.status} where user_id in |
| | | <foreach item="item" collection="gridMemberEditDTO.ids" separator="," open="(" close=")" index=""> |