| | |
| | | private final IComActService comActService; |
| | | private final RedisUtils redisUtils; |
| | | private final ISystemUserLevelService systemUserLevelService; |
| | | private final IdentityInformationService identityInformationService; |
| | | /** |
| | | * 党员分页查询列表 |
| | | * |
| | |
| | | if (adminUser == null){ |
| | | throw new ServiceException("无权审核"); |
| | | } |
| | | |
| | | IdentityInformation identityInformation = identityInformationService.getCurrentIdentityInformation(loginUserInfo); |
| | | Integer identity = (Integer) redisUtils.get("identity:" + loginUserInfo.getPhone()); |
| | | if(identity != null && identity != 2){ |
| | | if(identityInformation.getIdentity() != 2){ |
| | | throw new ServiceException("请切换至管理员身份"); |
| | | } |
| | | |
| | | int accountLevel = adminUser.getAccountLevel(); |
| | | SystemUserLevel systemUserLevel = identityInformation.getSystemUserLevel(); |
| | | int accountLevel = systemUserLevel.getLevel(); |
| | | Long communityId = null; |
| | | String streetId = null; |
| | | String districtsCode = null; |
| | | if (accountLevel == ReportTypeEnum.COMMUNITY.getCode()) { |
| | | communityId = adminUser.getCommunityId(); |
| | | communityId = systemUserLevel.getCommunityId(); |
| | | } else if (accountLevel == ReportTypeEnum.STREET.getCode()) { |
| | | streetId = adminUser.getStreetId(); |
| | | streetId = systemUserLevel.getStreetId(); |
| | | } else if (accountLevel == ReportTypeEnum.DISTRICT.getCode()) { |
| | | districtsCode = adminUser.getDistrictsCode(); |
| | | districtsCode = systemUserLevel.getDistrictsCode(); |
| | | } else if(accountLevel != ReportTypeEnum.CITY.getCode()){ |
| | | throw new ServiceException("无权审核:未知等级"); |
| | | } |