Skip to content

Commit 8187310

Browse files
committed
更新1.3.2
新增 查询组件my-search 新增 用户管理使用查询组件查询 新增 高级查询日期数据类型增加时间段 新增 全局混入mixin,混入权限检查方法 新增 界面所有操作受权限控制 新增 权限管理权限点,用于字段粒度控制 优化 高级查询支持字段和操作符默认值,日期时间段查询处理 修复 部分环境npm run serve提示安装分页错误
1 parent a92ff99 commit 8187310

File tree

20 files changed

+211
-12
lines changed

20 files changed

+211
-12
lines changed

Admin.Core.Common/Admin.Core.Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.3.1</Version>
6+
<Version>1.3.2</Version>
77
<Authors>xiaoxue</Authors>
88
<Company>xiaoxue</Company>
99
<Description>中台Admin后端通用库</Description>

Admin.Core.Model/Admin.Core.Model.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.3.1</Version>
6+
<Version>1.3.2</Version>
77
<Authors>xiaoxue</Authors>
88
<Company>xiaoxue</Company>
99
<Description>中台Admin后端实体库</Description>

Admin.Core.Model/Admin/PermissionType.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ public enum PermissionType
1717
/// <summary>
1818
/// 接口
1919
/// </summary>
20-
Api = 3
20+
Api = 3,
21+
/// <summary>
22+
/// 权限点
23+
/// </summary>
24+
Dot = 4
2125
}
2226
}

Admin.Core.Repository/Admin.Core.Repository.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<Version>1.3.1</Version>
5+
<Version>1.3.2</Version>
66
<Authors>xiaoxue</Authors>
77
<Company>xiaoxue</Company>
88
<Description>中台Admin后端仓储库</Description>

Admin.Core.Services/Admin.Core.Service.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.3.1</Version>
6+
<Version>1.3.2</Version>
77
<Authors>xiaoxue</Authors>
88
<Company>xiaoxue</Company>
99
<Description>中台Admin后端服务库</Description>

Admin.Core.Services/Admin/Auth/AuthService.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,15 @@ public async Task<IResponseOutput> GetUserInfoAsync()
116116
return ResponseOutput.NotOk("未登录!");
117117
}
118118

119+
//用户信息
119120
var user = await _userRepository.Select.WhereDynamic(_user.Id)
120121
.ToOneAsync(m => new {
121122
m.NickName,
122123
m.UserName,
123124
m.Avatar
124125
});
125126

126-
//获取菜单
127+
//用户菜单
127128
var menus = await _permissionRepository.Select
128129
.Where(a => new[] { PermissionType.Group, PermissionType.Menu }.Contains(a.Type))
129130
.Where(a =>
@@ -150,8 +151,9 @@ public async Task<IResponseOutput> GetUserInfoAsync()
150151
a.External
151152
});
152153

154+
//用户权限点
153155
var permissions = await _permissionRepository.Select
154-
.Where(a => a.Type == PermissionType.Api)
156+
.Where(a => new[] { PermissionType.Api, PermissionType.Dot }.Contains(a.Type))
155157
.Where(a =>
156158
_permissionRepository.Orm.Select<RolePermissionEntity>()
157159
.InnerJoin<UserRoleEntity>((b, c) => b.RoleId == c.RoleId && c.UserId == _user.Id)

Admin.Core.Services/Admin/Permission/IPermissionService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public partial interface IPermissionService
1616

1717
Task<IResponseOutput> GetApiAsync(long id);
1818

19+
Task<IResponseOutput> GetDotAsync(long id);
20+
1921
Task<IResponseOutput> GetPermissionList();
2022

2123
Task<IResponseOutput> GetRolePermissionList(long roleId = 0);
@@ -28,12 +30,16 @@ public partial interface IPermissionService
2830

2931
Task<IResponseOutput> AddApiAsync(PermissionAddApiInput input);
3032

33+
Task<IResponseOutput> AddDotAsync(PermissionAddDotInput input);
34+
3135
Task<IResponseOutput> UpdateGroupAsync(PermissionUpdateGroupInput input);
3236

3337
Task<IResponseOutput> UpdateMenuAsync(PermissionUpdateMenuInput input);
3438

3539
Task<IResponseOutput> UpdateApiAsync(PermissionUpdateApiInput input);
3640

41+
Task<IResponseOutput> UpdateDotAsync(PermissionUpdateDotInput input);
42+
3743
Task<IResponseOutput> DeleteAsync(long id);
3844

3945
Task<IResponseOutput> SoftDeleteAsync(long id);
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using Admin.Core.Model.Admin;
2+
3+
namespace Admin.Core.Service.Admin.Permission.Input
4+
{
5+
public class PermissionAddDotInput
6+
{
7+
/// <summary>
8+
/// 权限类型
9+
/// </summary>
10+
public PermissionType Type { get; set; } = PermissionType.Dot;
11+
12+
/// <summary>
13+
/// 父级节点
14+
/// </summary>
15+
public int ParentId { get; set; }
16+
17+
/// <summary>
18+
/// 权限名称
19+
/// </summary>
20+
public string Label { get; set; }
21+
22+
/// <summary>
23+
/// 权限编码
24+
/// </summary>
25+
public string Code { get; set; }
26+
27+
/// <summary>
28+
/// 说明
29+
/// </summary>
30+
public string Description { get; set; }
31+
32+
/// <summary>
33+
/// 图标
34+
/// </summary>
35+
public string Icon { get; set; }
36+
}
37+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace Admin.Core.Service.Admin.Permission.Input
2+
{
3+
public class PermissionUpdateDotInput : PermissionAddDotInput
4+
{
5+
/// <summary>
6+
/// ȨÏÞId
7+
/// </summary>
8+
public long Id { get; set; }
9+
10+
/// <summary>
11+
/// °æ±¾
12+
/// </summary>
13+
public long Version { get; set; }
14+
}
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using Admin.Core.Service.Admin.Permission.Input;
2+
3+
namespace Admin.Core.Service.Admin.Permission.Output
4+
{
5+
public class PermissionGetDotOutput : PermissionUpdateDotInput
6+
{
7+
8+
}
9+
}

0 commit comments

Comments
 (0)