mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 01:58:01 +08:00
🔄refactor: 统一返回给前端的数据结构
This commit is contained in:
@@ -28,19 +28,19 @@ namespace OpenAuth.App
|
||||
/// <summary>
|
||||
/// 加载列表
|
||||
/// </summary>
|
||||
public async Task<TableData> Load(QueryOpenJobListReq request)
|
||||
public async Task<PagedDynamicDataResp> Load(QueryOpenJobListReq request)
|
||||
{
|
||||
var result = new TableData();
|
||||
var result = new PagedDynamicDataResp();
|
||||
var objs = SugarClient.Queryable<OpenJob>();
|
||||
if (!string.IsNullOrEmpty(request.key))
|
||||
{
|
||||
objs = objs.Where(u => u.Id.Contains(request.key));
|
||||
}
|
||||
|
||||
result.data =await objs.OrderBy(u => u.Id)
|
||||
result.Data =await objs.OrderBy(u => u.Id)
|
||||
.Skip((request.page - 1) * request.limit)
|
||||
.Take(request.limit).ToListAsync();
|
||||
result.count =await objs.CountAsync();
|
||||
result.Count =await objs.CountAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user