mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-08 10:16:37 +08:00
style: 修改聚合跟类命名
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user