| | |
| | | |
| | | |
| | | <select id="getSpecialInputUserTagsByVO" resultType="com.panzhihua.service_user.model.dos.ComMngUserTagDO"> |
| | | SELECT t.* FROM com_mng_user_tag t WHERE community_id = ${comMngTagVO.communityId} |
| | | SELECT t.* FROM com_mng_user_tag t WHERE community_id = #{comMngTagVO.communityId} |
| | | <if test='comMngTagVO.tagName != null and comMngTagVO.tagName.trim() != ""'> |
| | | and t.tag_name =#{comMngTagVO.tagName} |
| | | </if> |
| | |
| | | |
| | | |
| | | <select id="pageOperLog" resultType="com.panzhihua.common.model.vos.user.SysOperLogVO"> |
| | | select * from sys_oper_log where community_id = ${sysOperLogVO.communityId} order by oper_time desc |
| | | select * from sys_oper_log where community_id = #{sysOperLogVO.communityId} order by oper_time desc |
| | | </select> |
| | | |
| | | |
| | |
| | | LEFT JOIN com_act_user_wallet as cauw on u.user_id = cauw.user_id and u.community_id = cauw.community_id |
| | | LEFT JOIN com_act_integral_user as caiu on u.user_id = caiu.user_id and u.community_id = caiu.community_id |
| | | WHERE |
| | | u.community_id = ${loginUserInfoVO.communityId} |
| | | u.community_id = #{loginUserInfoVO.communityId} |
| | | AND u.type = 1 |
| | | <if test='loginUserInfoVO.keyWord != null and loginUserInfoVO.keyWord.trim() != ""'> |
| | | AND (u.phone like concat(#{loginUserInfoVO.keyWord},'%') or |
| | |
| | | </select> |
| | | |
| | | <select id="selectComMngStructArea" resultType="com.panzhihua.common.model.vos.community.ComMngStructAreaVO"> |
| | | select a.id,a.community_id,a.area_name,address_detail from com_mng_struct_area a where a.community_id = ${communityId} |
| | | select a.id,a.community_id,a.area_name,address_detail from com_mng_struct_area a where a.community_id = #{communityId} |
| | | </select> |
| | | |
| | | <select id="specialUserExport" resultType="com.panzhihua.common.model.dtos.user.EexcelUserDTO"> |
| | |
| | | if(u.low_income_households=1,'是','否') lowIncomeHouseholds, if(u.low_income_people=1,'是','否') lowIncomePeople, |
| | | if(u.old_people=1,'是','否') oldPeople, if(u.special_service_family=1,'是','否') specialServiceFamily, |
| | | if(u.key_personnel=1,'是','否') keyPersonnel, u.tags FROM sys_user_input u JOIN com_mng_struct_area c ON u.area_id |
| | | = c.id where u.community_id = ${exportSpecialUserDTO.communityId} |
| | | = c.id where u.community_id = #{exportSpecialUserDTO.communityId} |
| | | <if |
| | | test='exportSpecialUserDTO.areaName != null and exportSpecialUserDTO.areaName.trim() != ""'> |
| | | AND |
| | |
| | | if(u.low_income_households=1,'是','否') lowIncomeHouseholds, if(u.low_income_people=1,'是','否') lowIncomePeople, |
| | | if(u.old_people=1,'是','否') oldPeople, if(u.special_service_family=1,'是','否') specialServiceFamily, |
| | | if(u.key_personnel=1,'是','否') keyPersonnel, u.tags FROM sys_user_input u where |
| | | u.community_id = ${exportUserDTO.communityId} |
| | | u.community_id = #{exportUserDTO.communityId} |
| | | <if |
| | | test='exportUserDTO.areaName != null and exportUserDTO.areaName.trim() != ""'>JOIN |
| | | com_mng_struct_area c ON u.area_id = c.id |
| | |
| | | t1.area_name as areaName, t.political_outlook politicalOutlook, CONCAT( IF ( t.soldier = 1, '军人,', '' ), IF ( |
| | | t.low_income_households = 1, '低保户,', '' ), IF ( t.low_income_people = 1, '低收入,', '' ), IF ( t.old_people = 1, |
| | | '特服家庭,', '' ), IF ( t.key_personnel = 1, '重点人员,', '' ) ) tags, t.create_at as createAt FROM sys_user_input t |
| | | LEFT JOIN com_mng_struct_area t1 ON t.area_id = t1.id WHERE t.community_id = ${pageInputUserDTO.communityId} |
| | | LEFT JOIN com_mng_struct_area t1 ON t.area_id = t1.id WHERE t.community_id = #{pageInputUserDTO.communityId} |
| | | <if |
| | | test='pageInputUserDTO.name != null and pageInputUserDTO.name.trim() != ""'>and t.`name` like |
| | | concat(#{pageInputUserDTO.name},'%') |
| | |
| | | ( t.low_income_households = 1, '低保户,', '' ), IF ( t.low_income_people = 1, '低收入,', '' ), IF ( t.old_people = 1, |
| | | '特服家庭,', '' ), IF ( t.key_personnel = 1, '重点人员,', '' ), IFNULL(t.tags,'') ) tags, t2.house_name as address, |
| | | t.create_at as createAt FROM sys_user_input t LEFT JOIN com_mng_struct_area t1 ON t.area_id = t1.id LEFT JOIN |
| | | com_mng_struct_house t2 ON t.house_code = t2.house_code WHERE t.community_id = ${pageInputUserDTO.communityId} |
| | | com_mng_struct_house t2 ON t.house_code = t2.house_code WHERE t.community_id = #{pageInputUserDTO.communityId} |
| | | AND (t.soldier=1 OR t.low_income_households=1 OR t.low_income_people=1 or t.old_people=1 OR |
| | | t.special_service_family=1 OR t.key_personnel=1 OR |
| | | (t.tags IS NOT NULL AND TRIM(t.tags)!='')) |
| | |
| | | <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> |