From 8d9752936b3f3b45b961a27b703fd329d7608005 Mon Sep 17 00:00:00 2001 From: huzhiyun Date: Mon, 26 Jan 2026 17:38:01 +0800 Subject: [PATCH] 1 --- .../LoginMobile/LoginMobilAppService.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs b/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs index 05f8c8e..1fe94de 100644 --- a/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs +++ b/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs @@ -128,6 +128,17 @@ namespace LearningOfficer.OA.Services.LoginMobile { throw new BusinessException("账号或密码错误"); } + var per = await _db.Queryable() + .Where(s => s.UserId == userResult.Id) + .FirstAsync(); + if (per == null) + { + throw new BusinessException("用户权限配置错误,请联系管理员"); + } + if (per.RoleEnum != SysRoleEnum.TeamLeader && per.RoleEnum != SysRoleEnum.LearningOfficer) + { + throw new BusinessException("只有组长/学习官可以登录"); + } userResult.UserType = 1; return userResult; }