| | |
| | | <result property="workStartTime" column="work_start_time"/> |
| | | <result property="workEndTime" column="work_end_time"/> |
| | | <result property="bigAgeTips" column="big_age_tips"/> |
| | | <result property="plaintextPassword" column="plaintext_password"/> |
| | | |
| | | </resultMap> |
| | | <sql id="columns"> |
| | |
| | | <select id="indexDataCommunityBackstage" resultType="com.panzhihua.common.model.vos.IndexDataVO"> |
| | | SELECT |
| | | COUNT(DISTINCT u.user_id)allUser, |
| | | (select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id=#{communityId} and m.`state`=2)volunteerUser, |
| | | (select COUNT(m.id) from com_mng_volunteer_mng m where m.community_id = #{communityId} and m.`state`=2)volunteerUser, |
| | | (select count(id) from com_pb_member cpm where cpm.audit_result = 1 and cpm.community_id = #{communityId}) partymemberUser, |
| | | COUNT(h.id)house |
| | | FROM |
| | | sys_user u |
| | | JOIN com_act c ON u.community_id = c.community_id |
| | | LEFT JOIN com_mng_struct_house_user h on u.user_id=h.user_id |
| | | WHERE u.community_id =#{communityId} and u.type=1 |
| | | WHERE u.community_id = #{communityId} and u.type=1 |
| | | </select> |
| | | |
| | | <update id="timedTaskContinuousLandingDays"> |
| | |
| | | FROM |
| | | com_pb_member_role a |
| | | WHERE |
| | | a.phone = #{phone} and community_id=#{userCommunityId} |
| | | a.phone = #{phone} and community_id = #{userCommunityId} |
| | | </select> |
| | | |
| | | <select id="pageUserAppletsBackstage" resultType="com.panzhihua.common.model.vos.user.SysUserVO"> |
| | |
| | | and u.phone=#{pageUserAppletsBackstageDTO.phone} |
| | | </if> |
| | | <if test='pageUserAppletsBackstageDTO.communityId != null and pageUserAppletsBackstageDTO.communityId != 0'>and |
| | | u.community_id=#{pageUserAppletsBackstageDTO.communityId} |
| | | 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} |
| | |
| | | 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 = '510423' 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 t1.area_code = #{areaCode} 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 ='510423' |
| | | where t.type=1 and t.community_id is not null and t1.area_code = #{areaCode} |
| | | </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 where a.area_code = '510423' |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 where a.area_code = #{areaCode} |
| | | 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 u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) where a.area_code = '510423' |
| | | and u.type=1 and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) where a.area_code = #{areaCode} |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | sys_user u |
| | | JOIN sys_user_role r ON u.user_id = r.user_id |
| | | JOIN sys_role e ON r.role_id = e.role_id |
| | | left join com_act ca on u.community_id = ca.community_id |
| | | <if test='administratorsUserVO.roleId != null and administratorsUserVO.roleId!=0'>and |
| | | e.role_id=#{administratorsUserVO.roleId} |
| | | </if> |
| | | <where> |
| | | u.type=3 |
| | | <if test='administratorsUserVO.communityId != null '>AND u.community_id = |
| | | #{administratorsUserVO.communityId} |
| | | </if> |
| | |
| | | </if> |
| | | <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},'%') |
| | |
| | | |
| | | <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 = '510423' |
| | | (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} |
| | | 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='510423' |
| | | and su.type = 1 and t1.area_code=#{areaCode} |
| | | </select> |
| | | |
| | | <update id="gridMemberEditStatus"> |
| | |
| | | FROM |
| | | sys_user u LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id |
| | | LEFT JOIN sys_role r ON ur.role_id = r.role_id |
| | | WHERE ur.role_id IS NOT NULL AND u.phone = #{phone} and r.community_id=#{userCommunityId} |
| | | WHERE ur.role_id IS NOT NULL AND u.phone = #{phone} and r.community_id = #{userCommunityId} |
| | | </select> |
| | | |
| | | <delete id="delGridMemberRelation"> |
| | |
| | | <if test='loginUserInfoVO.communityName != null and loginUserInfoVO.communityName.trim() != ""'> |
| | | AND c.`area_name` like concat(#{loginUserInfoVO.communityName},'%') |
| | | </if> |
| | | where u.face_state is not null and u.type=1 and u.community_id=#{loginUserInfoVO.communityId} |
| | | where u.face_state is not null and u.type=1 and u.community_id = #{loginUserInfoVO.communityId} |
| | | <if test='loginUserInfoVO.name != null and loginUserInfoVO.name.trim() != ""'> |
| | | and u.`name` like concat(#{loginUserInfoVO.name},'%') |
| | | </if> |
| | |
| | | FROM |
| | | com_pb_service_team a |
| | | WHERE |
| | | a.phone = #{phone} and community_id=#{userCommunityId} |
| | | a.phone = #{phone} and community_id = #{userCommunityId} |
| | | </select> |
| | | |
| | | <select id="selectExport" resultType="com.panzhihua.common.model.dtos.user.EexcelUserDTO"> |
| | |
| | | <if test='exportUserDTO.areaName != null and exportUserDTO.areaName.trim() != ""'>AND c.`area_name` |
| | | like concat(#{exportUserDTO.areaName},'%') |
| | | </if> |
| | | where u.community_id=#{exportUserDTO.communityId} and u.type=1 |
| | | where u.community_id = #{exportUserDTO.communityId} and u.type=1 |
| | | <if |
| | | test='exportUserDTO.name != null and exportUserDTO.name.trim() != ""'>and u.`name` like |
| | | concat(#{exportUserDTO.name},'%') |
| | |
| | | </update> |
| | | |
| | | <select id="selectCommunity" resultType="com.panzhihua.common.model.vos.community.ComActVO"> |
| | | select name from com_act where community_id=#{communityId} |
| | | select * from com_act where community_id = #{communityId} |
| | | </select> |
| | | |
| | | <delete id="delLcMember"> |
| | |
| | | AND ca.street_id = cs.street_id |
| | | ) AS userNum |
| | | FROM |
| | | `com_street` AS cs where area_code='510423' |
| | | `com_street` AS cs where area_code=#{areaCode} |
| | | 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 = '510423' |
| | | AND su.community_id IS NOT NULL and ca.area_code = #{areaCode} |
| | | GROUP BY |
| | | ca.community_id |
| | | ORDER BY |
| | |
| | | select count(id) from com_act_social_org where user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="countFmsMember" resultType="integer"> |
| | | SELECT COUNT(id) FROM com_fms_team_member |
| | | WHERE phone = #{phone} AND community_id = #{communityId} |
| | | </select> |
| | | |
| | | </mapper> |