Skip to content

Commit

Permalink
优化租户初始化数据排序值
Browse files Browse the repository at this point in the history
  • Loading branch information
zhontai committed Jan 12, 2023
1 parent be3e73d commit f13f5d9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/platform/ZhonTai.Admin/Services/Tenant/TenantService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ public virtual async Task<long> AddAsync(TenantAddInput input)
Name = input.Name,
Code = input.Code,
ParentId = 0,
MemberCount = 1
MemberCount = 1,
Sort = 1
};
await _orgRepository.InsertAsync(org);

Expand Down Expand Up @@ -153,7 +154,8 @@ public virtual async Task<long> AddAsync(TenantAddInput input)
ParentId = 0,
TenantId = tenantId,
Type = RoleType.Group,
Name = "系统默认"
Name = "系统默认",
Sort = 1
};
await _roleRepository.InsertAsync(roleGroup);

Expand All @@ -165,7 +167,8 @@ public virtual async Task<long> AddAsync(TenantAddInput input)
Name = "主管理员",
Code = "main-admin",
ParentId = roleGroup.Id,
DataScope = DataScope.All
DataScope = DataScope.All,
Sort = 1
};
await _roleRepository.InsertAsync(role);

Expand Down

0 comments on commit f13f5d9

Please sign in to comment.