|  | @@ -133,21 +133,20 @@ public class SmsCodeServiceImpl implements SmsCodeService {
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  } else if (ClientEnum.TENANT == platform) {
 | 
	
		
			
				|  |  |                      TenantStaff tenantStaff = tenantStaffService.getByUserId(userId);
 | 
	
		
			
				|  |  | -                    if (tenantStaff == null) {
 | 
	
		
			
				|  |  | -                        throw new UsernameNotFoundException("账户不存在");
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    TenantInfo tenantInfo = tenantInfoService.getById(Optional.ofNullable(tenantStaff.getTenantId()).orElse(-1L));
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -                    if (tenantInfo == null) {
 | 
	
		
			
				|  |  | -                        throw new UsernameNotFoundException("账户不存在");
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    if (Boolean.FALSE.equals(tenantInfo.getEnableFlag())) {
 | 
	
		
			
				|  |  | -                        // 机构锁定
 | 
	
		
			
				|  |  | -                        throw new LockedException("账号已冻结,请联系管理员");
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    if (UserLockFlag.LOCKED.equals(tenantStaff.getStatus())) {
 | 
	
		
			
				|  |  | -                        // 账号被锁定
 | 
	
		
			
				|  |  | -                        throw new LockedException("账号已冻结,请联系管理员");
 | 
	
		
			
				|  |  | +                    if (tenantStaff != null) {
 | 
	
		
			
				|  |  | +                        TenantInfo tenantInfo = tenantInfoService.getById(Optional.ofNullable(tenantStaff.getTenantId()).orElse(-1L));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                        if (tenantInfo == null) {
 | 
	
		
			
				|  |  | +                            throw new UsernameNotFoundException("账户不存在");
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        if (Boolean.FALSE.equals(tenantInfo.getEnableFlag())) {
 | 
	
		
			
				|  |  | +                            // 机构锁定
 | 
	
		
			
				|  |  | +                            throw new LockedException("账号已冻结,请联系管理员");
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        if (UserLockFlag.LOCKED.equals(tenantStaff.getStatus())) {
 | 
	
		
			
				|  |  | +                            // 账号被锁定
 | 
	
		
			
				|  |  | +                            throw new LockedException("账号已冻结,请联系管理员");
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 |