mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 02:29:24 +08:00
fix issue #I3YVBH 兼容oracle 11g
add load all users/roles for flowinstance fix issue #I3W5YR
This commit is contained in:
@@ -5,6 +5,7 @@ using OpenAuth.App.Response;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using OpenAuth.Repository.Interface;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using OpenAuth.App.Request;
|
||||
using OpenAuth.Repository;
|
||||
@@ -29,6 +30,26 @@ namespace OpenAuth.App
|
||||
|
||||
return roles;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有的角色
|
||||
/// 为了控制权限,通常只用于流程实例选择执行角色,其他地方请使用Load
|
||||
/// </summary>
|
||||
public async Task<TableResp<Role>> LoadAll(QueryRoleListReq request)
|
||||
{
|
||||
var result = new TableResp<Role>();
|
||||
var objs = UnitWork.Find<Role>(null);
|
||||
if (!string.IsNullOrEmpty(request.key))
|
||||
{
|
||||
objs = objs.Where(u => u.Name.Contains(request.key));
|
||||
}
|
||||
|
||||
result.data = objs.OrderBy(u => u.Name)
|
||||
.Skip((request.page - 1) * request.limit)
|
||||
.Take(request.limit).ToList();
|
||||
result.count = objs.Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -80,5 +101,7 @@ namespace OpenAuth.App
|
||||
{
|
||||
_revelanceApp = app;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user