From a53533d2a2230c4ff4baf03b64d3eee0b3933314 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Wed, 5 Mar 2025 14:26:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8E=E4=BF=AE=E5=A4=8D=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin.NET.Application/Service/App/Auth/AppAuthService.cs | 1 + Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs b/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs index a4f30843..6d273077 100644 --- a/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs +++ b/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs @@ -64,6 +64,7 @@ public class AppAuthService : IDynamicApiController, ITransient throw Oops.Oh(ErrorCodeEnum.D1027); // 判断是否开启验证码并校验 + input.TenantId = input.TenantId <= 0 ? SqlSugarConst.DefaultTenantId : input.TenantId; var tenant = _sysCacheService.Get>(CacheConst.KeyTenant)?.FirstOrDefault(u => u.Id == input.TenantId); if (tenant == null) { diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs index bd5ecb20..7052478d 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs @@ -58,7 +58,8 @@ public class SysAuthService : IDynamicApiController, ITransient if (passwordMaxErrorTimes < 1) passwordMaxErrorTimes = 5; if (passwordErrorTimes > passwordMaxErrorTimes) throw Oops.Oh(ErrorCodeEnum.D1027); - // 判断是否开启验证码并校验 + // 判断是否开启验证码并校验 + input.TenantId = input.TenantId <= 0 ? SqlSugarConst.DefaultTenantId : input.TenantId; var tenant = _sysCacheService.Get>(CacheConst.KeyTenant)?.FirstOrDefault(u => u.Id == input.TenantId); if (tenant == null) {