调整用户权限表租户配置及查询表名
在 OaUserPermissions 实体中修改了数据库租户配置,统一为 ConnectionStringsSettings.Db。登录服务中查询用户权限时,显式指定了表名为 usercenter_v1.oa_user_permissions,以确保多库环境下的数据准确性。
This commit is contained in:
parent
8d9752936b
commit
bc80afaf4f
|
|
@ -11,7 +11,7 @@ namespace LearningOfficer.OA.Core.Entities.UserCenter
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户学习官权限表
|
/// 用户学习官权限表
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarTable("oa_user_permissions"), Tenant(nameof(ConnectionStringsSettings.UserCenterDb))]
|
[SugarTable("oa_user_permissions"), Tenant(nameof(ConnectionStringsSettings.Db))]
|
||||||
public class OaUserPermissions : BaseEntity
|
public class OaUserPermissions : BaseEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ namespace LearningOfficer.OA.Services.LoginMobile
|
||||||
{
|
{
|
||||||
throw new BusinessException("账号或密码错误");
|
throw new BusinessException("账号或密码错误");
|
||||||
}
|
}
|
||||||
var per = await _db.Queryable<OaUserPermissions>()
|
var per = await _db.Queryable<OaUserPermissions>().AS("usercenter_v1.oa_user_permissions")
|
||||||
.Where(s => s.UserId == userResult.Id)
|
.Where(s => s.UserId == userResult.Id)
|
||||||
.FirstAsync();
|
.FirstAsync();
|
||||||
if (per == null)
|
if (per == null)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue