From bc80afaf4f88a3f79cfc0c481b26c20d41e86c93 Mon Sep 17 00:00:00 2001 From: Q Date: Mon, 26 Jan 2026 17:49:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=94=A8=E6=88=B7=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=A1=A8=E7=A7=9F=E6=88=B7=E9=85=8D=E7=BD=AE=E5=8F=8A?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=A1=A8=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 OaUserPermissions 实体中修改了数据库租户配置,统一为 ConnectionStringsSettings.Db。登录服务中查询用户权限时,显式指定了表名为 usercenter_v1.oa_user_permissions,以确保多库环境下的数据准确性。 --- .../Entities/UserCenter/OaUserPermissions.cs | 2 +- LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LearningOfficer.OA.Core/Entities/UserCenter/OaUserPermissions.cs b/LearningOfficer.OA.Core/Entities/UserCenter/OaUserPermissions.cs index 1a38534..af4b1b1 100644 --- a/LearningOfficer.OA.Core/Entities/UserCenter/OaUserPermissions.cs +++ b/LearningOfficer.OA.Core/Entities/UserCenter/OaUserPermissions.cs @@ -11,7 +11,7 @@ namespace LearningOfficer.OA.Core.Entities.UserCenter /// /// 用户学习官权限表 /// - [SugarTable("oa_user_permissions"), Tenant(nameof(ConnectionStringsSettings.UserCenterDb))] + [SugarTable("oa_user_permissions"), Tenant(nameof(ConnectionStringsSettings.Db))] public class OaUserPermissions : BaseEntity { /// diff --git a/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs b/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs index 1fe94de..2ef8b88 100644 --- a/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs +++ b/LearningOfficer.OA.Services/LoginMobile/LoginMobilAppService.cs @@ -128,7 +128,7 @@ namespace LearningOfficer.OA.Services.LoginMobile { throw new BusinessException("账号或密码错误"); } - var per = await _db.Queryable() + var per = await _db.Queryable().AS("usercenter_v1.oa_user_permissions") .Where(s => s.UserId == userResult.Id) .FirstAsync(); if (per == null)