|  | @@ -401,11 +401,6 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoMapper, TenantI
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          if (!updateStatus.getEnableFlag()) {
 | 
	
		
			
				|  |  | -            tenantStaffMapper.update(null, Wrappers.<TenantStaff>lambdaUpdate()
 | 
	
		
			
				|  |  | -                    .set(TenantStaff::getStatus, UserLockFlag.LOCKED)
 | 
	
		
			
				|  |  | -                    .set(TenantStaff::getWxOpenid, null)
 | 
	
		
			
				|  |  | -                    .eq(TenantStaff::getTenantId, updateStatus.getId()));
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |              // 账号退出登录
 | 
	
		
			
				|  |  |              QueryWrapper<TenantStaff> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  |              queryWrapper.lambda()
 | 
	
	
		
			
				|  | @@ -413,8 +408,14 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoMapper, TenantI
 | 
	
		
			
				|  |  |              List<TenantStaff> tenantStaffs = tenantStaffMapper.selectList(queryWrapper);
 | 
	
		
			
				|  |  |              List<Long> userIdList = tenantStaffs.stream().map(TenantStaff::getUserId).collect(Collectors.toList());
 | 
	
		
			
				|  |  |              Map<Long, String> idPhoneMap = sysUserMapper.selectBatchIds(userIdList).stream().collect(Collectors.toMap(SysUser::getId, SysUser::getPhone));
 | 
	
		
			
				|  |  | -            tenantStaffs.forEach(staff -> sysUserFeignService.exitByPhoneAndOpenId(ClientEnum.ORGANIZATION.getCode().toLowerCase(),
 | 
	
		
			
				|  |  | -                    idPhoneMap.get(staff.getUserId()), staff.getWxOpenid()));
 | 
	
		
			
				|  |  | +            tenantStaffs.stream().filter(next -> StringUtils.isNotEmpty(next.getWxOpenid()))
 | 
	
		
			
				|  |  | +                    .forEach(staff -> sysUserFeignService.exitByPhoneAndOpenId(ClientEnum.ORGANIZATION.getCode().toLowerCase(),
 | 
	
		
			
				|  |  | +                            idPhoneMap.get(staff.getUserId()), staff.getWxOpenid()));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            tenantStaffMapper.update(null, Wrappers.<TenantStaff>lambdaUpdate()
 | 
	
		
			
				|  |  | +                    .set(TenantStaff::getStatus, UserLockFlag.LOCKED)
 | 
	
		
			
				|  |  | +                    .set(TenantStaff::getWxOpenid, null)
 | 
	
		
			
				|  |  | +                    .eq(TenantStaff::getTenantId, updateStatus.getId()));
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              tenantStaffMapper.update(null, Wrappers.<TenantStaff>lambdaUpdate()
 | 
	
		
			
				|  |  |                      .set(TenantStaff::getStatus, UserLockFlag.NORMAL)
 |