Merge branch 'local_20221024' into huacheng_test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/dao/UserDao.java
| | |
| | | String accessToken = ""; |
| | | String appId = this.getAppId(); |
| | | accessToken=wxXCXTempSend.stringRedisTemplate.boundValueOps("access_token:access_token:"+ appId).get(); |
| | | if (appId.equals(APP_ID)){ |
| | | /*if (appId.equals(APP_ID)){ |
| | | accessToken = validAccessToken(accessToken, appId,APP_SECRET); |
| | | } |
| | | |
| | | }*/ |
| | | return accessToken; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getAccessTokenValid(String appId,Integer index) throws Exception { |
| | | if (index % 100 == 0){ |
| | | if (index % 1000 == 0){ |
| | | return getAccessToken(appId); |
| | | }else { |
| | | return wxXCXTempSend.stringRedisTemplate.boundValueOps("access_token:access_token:"+appId).get(); |
| | |
| | | @Select("SELECT " + " count( caa.id ) as totalNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min = 0 and community_id = ${communityId}) as commonNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and volunteer_min > 0 and community_id = ${communityId}) as volunteerNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 0 and caa.community_id = ${communityId}) as commonPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and is_volunteer = 1 and caa.community_id = ${communityId}) as volunteerPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and caas.sign_identity != 3 and caa.community_id = ${communityId}) as commonPeopleNum, " |
| | | + " (select count(caas.user_id) from (select * from com_act_act_sign where `status` = 1) as caas left join com_act_activity as caa on caa.id = caas.activity_id where caa.`status` IN (1,2,3,4,5) and caas.sign_identity = 3 and caa.community_id = ${communityId}) as volunteerPeopleNum, " |
| | | + " (select count(id) from com_act_activity where `status` IN (1,2,3,4,5) and community_id = ${communityId} and create_at between date_sub(curdate() - day(curdate()) +1,interval 1 month) and now()) as currentNum " |
| | | + "FROM " + " com_act_activity AS caa " + "WHERE " |
| | | + " caa.`status` IN (1,2,3,4,5) and community_id = ${communityId}") |
| | |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = ${communityId} " |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 2 and belong_type = 1" |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 2 and belong_type = 1 " |
| | | + "UNION ALL " |
| | | + "SELECT COUNT( e.id ) AS num,'网格事件' AS name FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = ${communityId} AND e.event_process_status = 2 " |
| | | + "UNION ALL " |
| | |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'一起议' as name FROM com_act_discuss WHERE community_id = ${communityId} " |
| | | + "UNION ALL " |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 1 and belong_type = 1" |
| | | + "SELECT COUNT(id) as num,'邻里圈' as name FROM com_act_neighbor_circle WHERE community_id = ${communityId} AND STATUS = 1 and belong_type = 1 " |
| | | + "UNION ALL " |
| | | + "SELECT COUNT( e.id ) AS num,'网格事件' AS NAME FROM `event` as e left join event_grid_data as egd on egd.id = e.grid_id WHERE egd.grid_community_id = ${communityId} AND e.event_status = 2 and e.event_deal_status in (1,2,3) " |
| | | + "UNION ALL " |
| | |
| | | |
| | | /** |
| | | * 根据手机号查询社区团队表中用户数量 |
| | | * |
| | | * @param phone 手机号 |
| | | * @return 用户数量 |
| | | * @return 用户数量 |
| | | */ |
| | | Integer getCommunityTeamCount(@Param("phone") String phone); |
| | | |
| | | /** |
| | | * 查询西区所有街道列表以及统计人数 |
| | | * @return 西区所有街道列表以及统计人数 |
| | | * |
| | | * @return 西区所有街道列表以及统计人数 |
| | | */ |
| | | List<IndexUserStreetVo> getUserStreetList(@Param("areaCode") String areaCode); |
| | | |
| | | /** |
| | | * 查询街道下社区列表以及统计人数 |
| | | * @param streetId 街道id |
| | | * @return 社区列表以及统计人数 |
| | | * |
| | | * @param streetId 街道id |
| | | * @return 社区列表以及统计人数 |
| | | */ |
| | | List<IndexUserCommunityVo> getUserCommunityList(@Param("streetId") Long streetId); |
| | | |
| | | /** |
| | | * 查询街道下社区注册人数统计数据导出 |
| | | * @return 社区注册人数统计数据导出 |
| | | * |
| | | * @return 社区注册人数统计数据导出 |
| | | */ |
| | | List<IndexUserStreetExcelExportVo> getUserCommunityExcelExport(String areaCode); |
| | | |
| | | /** |
| | | * 查看是否是社区物业人员 |
| | | * |
| | | * @param userId |
| | | * @param userCommunityId |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 查看是否社工 |
| | | * |
| | | * @param phone |
| | | * @param communityId |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 查看是否社会组织 |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查看是否是微团队成员 |
| | | * |
| | | * @param phone |
| | | * @param userCommunityId |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 查询街道信息 |
| | | * |
| | | * @param streetId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询是否是社会组织成员 |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询是否社会组织联系人 |
| | | * |
| | | * @param phone |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询是否人大代表 |
| | | * |
| | | * @param phone |
| | | * @param userCommunityId |
| | | * @return |
| | | */ |
| | | int selectCountDpc(@Param("phone") String phone, @Param("userCommunityId") Long userCommunityId); |
| | | |
| | | /** |
| | | * 查看是否网格员 |
| | | * |
| | | * @param phone |
| | | * @param userCommunityId |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 查询防疫工作人员信息 |
| | | * |
| | | * @param phone |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询单位管理员 |
| | | * |
| | | * @param phone |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询报道单位id |
| | | * |
| | | * @param phone |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据社区名称查询区县社区联动关系 |
| | | * |
| | | * @param relationName |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据街道id查询区域名称 |
| | | * |
| | | * @param streetId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 看板用户统计:用户占比统计 |
| | | * */ |
| | | List<UserProportion> userAnalysis(@Param("type") Integer type,@Param("range") String range,@Param("streetId") Long streetId,@Param("areaCode")Long areaCode,@Param("appId")String appId); |
| | | */ |
| | | List<UserProportion> userAnalysis(@Param("type") Integer type, @Param("range") String range, @Param("streetId") Long streetId, @Param("areaCode") Long areaCode, @Param("appId") String appId); |
| | | |
| | | /** |
| | | * 统计区域实名用户数 |
| | | * */ |
| | | List<RealUser> realUserCount(@Param("type") Integer type,@Param("range") String range,@Param("streetId") Long streetId,@Param("areaCode")Long areaCode,@Param("appId")String appId); |
| | | */ |
| | | List<RealUser> realUserCount(@Param("type") Integer type, @Param("range") String range, @Param("streetId") Long streetId, @Param("areaCode") Long areaCode, @Param("appId") String appId); |
| | | |
| | | /** |
| | | * 统计该街道内的所有用户数 |
| | | * */ |
| | | Integer streetUserCount(@Param("id") Long id,@Param("areaCode")Long areaCode); |
| | | */ |
| | | Integer streetUserCount(@Param("id") Long id, @Param("areaCode") Long areaCode); |
| | | |
| | | /** |
| | | * 街道用户统计 |
| | | * */ |
| | | IndexDataKanbanVO dataKanBanStreet(@Param("streetId") Long streetId,@Param("areaCode") Long areaCode,@Param("range") String range); |
| | | */ |
| | | IndexDataKanbanVO dataKanBanStreet(@Param("streetId") Long streetId, @Param("areaCode") Long areaCode, @Param("range") String range); |
| | | |
| | | /** |
| | | * 获取当天的新增和日活 |
| | | * */ |
| | | Map<String,Long> getDailyAddAndActive(@Param("date") Date date, @Param("id") Long streetId, @Param("areaCode") Long areaCode, @Param("appId") String appId); |
| | | */ |
| | | Map<String, Long> getDailyAddAndActive(@Param("date") Date date, @Param("id") Long streetId, @Param("areaCode") Long areaCode, @Param("appId") String appId); |
| | | |
| | | List<UsersStatisticsDTO> getDailyAdd(@Param("createAt") String createAt, @Param("id") Long streetId, @Param("areaCode") Long areaCode, @Param("appId") String appId); |
| | | |
| | |
| | | |
| | | /** |
| | | * 获取本月的 |
| | | * */ |
| | | Integer getMonthUsers(@Param("streetId") Long streetId,@Param("areaCode") Long areaCode,@Param("range") String range,@Param("appId")String appId); |
| | | */ |
| | | Integer getMonthUsers(@Param("streetId") Long streetId, @Param("areaCode") Long areaCode, @Param("range") String range, @Param("appId") String appId); |
| | | |
| | | /** |
| | | * 获取街道下属村/社区 |
| | | * */ |
| | | List<CommunityVO> selectCommunityByStreetId(@Param("id") Long streetId,@Param("type") Integer type); |
| | | */ |
| | | List<CommunityVO> selectCommunityByStreetId(@Param("id") Long streetId, @Param("type") Integer type); |
| | | |
| | | /** |
| | | * 获取账户id |
| | | * */ |
| | | */ |
| | | List<Integer> selectIdsByAccount(@Param("array") String[] streetList); |
| | | |
| | | List<CommunityVO> selectCommunityByStreetName(String name); |
| | |
| | | |
| | | /** |
| | | * 是否为专家 |
| | | * */ |
| | | */ |
| | | ComSanshuoExpertVO isExpert(String phone); |
| | | |
| | | /** |
| | | * 当前账号是否为专家后台账号 |
| | | * */ |
| | | */ |
| | | int isIndustryCenterAccount(String account); |
| | | |
| | | /** |
| | | * 当前账号是否为专家后台账号 |
| | | * */ |
| | | */ |
| | | int isExpertAccount(String account); |
| | | |
| | | /** |
| | | * 是否为党员 |
| | | * */ |
| | | int isDpcMember(@Param("phone") String phone,@Param("name")String name); |
| | | |
| | | /** |
| | | * 查询两个appid的用户做更新 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<SysUserDO> selectByUserId(@Param("userId") Long userId); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public R updateUserPartyStatus(Long userId) { |
| | | SysUserDO sysUserDO = userDao.selectById(userId); |
| | | if (sysUserDO != null) { |
| | | sysUserDO.setIsPartymember(1); |
| | | int updated = userDao.updateById(sysUserDO); |
| | | if (updated > 0) { |
| | | // 删除用户信息缓存 |
| | | String userKey = UserConstants.LOGIN_USER_INFO + sysUserDO.getUserId(); |
| | | stringRedisTemplate.delete(userKey); |
| | | List<SysUserDO> sysUserDOs = userDao.selectByUserId(userId); |
| | | for (SysUserDO sysUserDO : sysUserDOs) { |
| | | if (sysUserDO != null) { |
| | | sysUserDO.setIsPartymember(1); |
| | | int updated = userDao.updateById(sysUserDO); |
| | | if (updated > 0) { |
| | | // 删除用户信息缓存 |
| | | String userKey = UserConstants.LOGIN_USER_INFO + sysUserDO.getUserId(); |
| | | stringRedisTemplate.delete(userKey); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | ORDER BY |
| | | u.user_id DESC |
| | | </select> |
| | | <select id="selectByUserId" resultMap="BaseResultMap"> |
| | | SELECT u1.* FROM sys_user u1 WHERE u1.phone = (SELECT phone FROM sys_user u2 WHERE u2.user_id=#{userId}) AND u1.app_id in ('wx118de8a734d269f0','wx0cef797390444b75') |
| | | </select> |
| | | |
| | | </mapper> |