| | |
| | | <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(id) from com_pb_member cpm where cpm.audit_result = 1 and cpm.community_id = #{communityId}) partymemberUser, |
| | | (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.status != null and pageUserAppletsBackstageDTO.status != 0'>and |
| | | u.status=#{pageUserAppletsBackstageDTO.status} |
| | |
| | | |
| | | <select id="getGridsMemberList" |
| | | resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridMemberVO"> |
| | | select user_id,nick_name,phone from sys_user where type = 6 and community_id = #{communityId} limit 3 |
| | | select user_id,nick_name,phone from sys_user where type = 6 and community_id = ${communityId} limit 3 |
| | | </select> |
| | | |
| | | <update id="updateUserArchives"> |
| | |
| | | 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"> |
| | |
| | | </update> |
| | | |
| | | <select id="getServiceTeamList" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbServiceTeamWishVO"> |
| | | select id as managerId,`name` from com_pb_service_team where community_id = #{communityId} |
| | | select id as managerId,`name` from com_pb_service_team where community_id = ${communityId} |
| | | <if test='param != null and param != ""'>AND `name` like concat(#{param},'%')</if> |
| | | </select> |
| | | |
| | | <select id="getUserListByCommunityId" resultType="com.panzhihua.common.model.vos.user.SysUserVO"> |
| | | select user_id,`name` from sys_user as su where type = 3 and community_id = #{communityId} |
| | | select user_id,`name` from sys_user as su where type = 3 and community_id = ${communityId} |
| | | </select> |
| | | |
| | | <select id="pageUserFace" resultType="com.panzhihua.common.model.vos.LoginUserInfoVO"> |
| | |
| | | <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 name from com_act where community_id = ${communityId} |
| | | </select> |
| | | |
| | | <delete id="delLcMember"> |
| | |
| | | |
| | | <select id="countPropertyWorker" resultType="integer"> |
| | | SELECT COUNT(id) FROM com_property |
| | | WHERE user_id = #{userId} AND community_id = #{communityId} |
| | | WHERE user_id = #{userId} AND community_id = ${communityId} |
| | | </select> |
| | | |
| | | </mapper> |