style: 修改聚合跟类命名

This commit is contained in:
橙子
2024-05-22 14:35:08 +08:00
parent f2e3c76539
commit 3429de9eb6
89 changed files with 446 additions and 412 deletions

View File

@@ -36,8 +36,8 @@ namespace Yi.Framework.Rbac.SqlSugarCore
if (CurrentUser.Id == null || CurrentUser.IsRefreshToken()) return;
//管理员不过滤
if (CurrentUser.UserName.Equals(UserConst.Admin) || CurrentUser.Roles.Any(f => f.Equals(UserConst.AdminRolesCode))) return;
var expUser = Expressionable.Create<UserEntity>();
var expRole = Expressionable.Create<RoleEntity>();
var expUser = Expressionable.Create<UserAggregateRoot>();
var expRole = Expressionable.Create<RoleAggregateRoot>();
var roleInfo = CurrentUser.GetRoleInfo();
@@ -70,7 +70,7 @@ namespace Yi.Framework.Rbac.SqlSugarCore
else if (DataScopeEnum.DEPT_FOLLOW.Equals(dataScope))//本部门及以下数据
{
//SQl OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )
var allChildDepts = sqlSugarClient.Queryable<DeptEntity>().ToChildList(it => it.ParentId, CurrentUser.GetDeptId());
var allChildDepts = sqlSugarClient.Queryable<DeptAggregateRoot>().ToChildList(it => it.ParentId, CurrentUser.GetDeptId());
expUser.Or(it => allChildDepts.Select(f => f.Id).ToList().Contains(it.DeptId ?? Guid.Empty));
}