mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-04-08 10:01:29 +08:00
同步openauth.Core:
采用代码生成器的表结构控制前端显示,删除以前按照dbset获取数据库结构 优化注释 升级EF及所有三方的版本
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Infrastructure;
|
||||
using Infrastructure.Const;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OpenAuth.App.Extensions;
|
||||
using OpenAuth.App.Interface;
|
||||
@@ -39,10 +40,10 @@ namespace OpenAuth.App
|
||||
objs = objs.Where(u => u.Id.Contains(request.key));
|
||||
}
|
||||
|
||||
result.data = objs.OrderBy(u => u.Id)
|
||||
result.data =await objs.OrderBy(u => u.Id)
|
||||
.Skip((request.page - 1) * request.limit)
|
||||
.Take(request.limit);
|
||||
result.count = objs.Count();
|
||||
.Take(request.limit).ToListAsync();
|
||||
result.count =await objs.CountAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -53,13 +54,12 @@ namespace OpenAuth.App
|
||||
/// <returns></returns>
|
||||
public async Task StartAll()
|
||||
{
|
||||
var jobs = Repository.Find(u => u.Status == (int) JobStatus.Running);
|
||||
var jobs = await Repository.Find(u => u.Status == (int) JobStatus.Running).ToListAsync();
|
||||
foreach (var job in jobs)
|
||||
{
|
||||
job.Start(_scheduler);
|
||||
}
|
||||
_logger.LogInformation("所有状态为正在运行的任务已启动");
|
||||
|
||||
}
|
||||
|
||||
public void Add(AddOrUpdateOpenJobReq req)
|
||||
|
||||
Reference in New Issue
Block a user