| | |
| | | <if test='pageUserAppletsBackstageDTO.communityId != null and pageUserAppletsBackstageDTO.communityId != 0'>and |
| | | u.community_id = #{pageUserAppletsBackstageDTO.communityId} |
| | | </if> |
| | | <if test='pageUserAppletsBackstageDTO.areaCode != null'>and |
| | | a.area_code = #{pageUserAppletsBackstageDTO.areaCode} |
| | | </if> |
| | | <if test='pageUserAppletsBackstageDTO.status != null and pageUserAppletsBackstageDTO.status != 0'>and |
| | | u.status=#{pageUserAppletsBackstageDTO.status} |
| | | </if> |
| | |
| | | COUNT(user_id)allUser, |
| | | COUNT(case WHEN DATE_FORMAT(t.create_at,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )addUser, |
| | | COUNT(case WHEN DATE_FORMAT(last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )activeDayUser, |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE type = 1 and t1.area_code = #{areaCode} AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE type = 1 AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | FROM |
| | | sys_user t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where t.type=1 and t.community_id is not null and t1.area_code = #{areaCode} |
| | | where t.type=1 and t.community_id is not null |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | |
| | | 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 a.state=0 where a.area_code = #{areaCode} |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 and a.state=0 |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | FROM |
| | | 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.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) where a.area_code = #{areaCode} |
| | | and u.type=1 and a.state=0 and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | <if test='administratorsUserVO.phone != null and administratorsUserVO.phone.trim() != ""'>AND |
| | | u.phone like concat(#{administratorsUserVO.phone},'%') |
| | | </if> |
| | | <if test='administratorsUserVO.areaCode != null '> |
| | | AND ca.area_code = #{administratorsUserVO.areaCode} |
| | | </if> |
| | | <if test='administratorsUserVO.account != null and administratorsUserVO.account.trim() != ""'>AND |
| | | u.account like concat(#{administratorsUserVO.account},'%') |
| | | </if> |
| | |
| | | |
| | | <select id="selectCommunityAddUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | | select count(user_id) as num, |
| | | (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1 and t1.area_code = #{areaCode} |
| | | (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.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 LEFT JOIN com_act t1 on su.community_id = t1.community_id |
| | | 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 and t1.area_code=#{areaCode} |
| | | and su.type = 1 |
| | | </select> |
| | | |
| | | <update id="gridMemberEditStatus"> |
| | |
| | | AND ca.street_id = cs.street_id |
| | | ) AS userNum |
| | | FROM |
| | | `com_street` AS cs where area_code=#{areaCode} |
| | | `com_street` AS cs |
| | | order by userNum desc |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id |
| | | WHERE |
| | | su.type = 1 |
| | | AND su.community_id IS NOT NULL and ca.area_code = #{areaCode} |
| | | AND su.community_id IS NOT NULL |
| | | GROUP BY |
| | | ca.community_id |
| | | ORDER BY |
| | |
| | | SELECT * FROM com_area_town_community WHERE community = #{relationName} |
| | | </select> |
| | | |
| | | <select id="selectAreaCodeByStreetId" resultType="String"> |
| | | select t.name from com_mng_struct_area_district t left join com_street t1 on t.district_adcode = t1.area_code where t1.street_id =#{streetId} |
| | | </select> |
| | | |
| | | </mapper> |