修改任务表isStart为int类型

This commit is contained in:
不做码农
2023-05-18 18:08:38 +08:00
parent 0e83ba64ce
commit 07ea3d1c48
4 changed files with 7 additions and 9 deletions

View File

@@ -28,12 +28,10 @@ namespace ZR.Admin.WebApi.Extensions
/// <returns></returns>
public static IApplicationBuilder UseAddTaskSchedulers(this IApplicationBuilder app)
{
//var _tasksQzService = (ISysTasksQzService)App.GetRequiredService(typeof(ISysTasksQzService));
ITaskSchedulerServer _schedulerServer = app.ApplicationServices.GetRequiredService<ITaskSchedulerServer>();
//var tasks = _tasksQzService.GetList(m => m.IsStart);
var tasks = SqlSugar.IOC.DbScoped.SugarScope.Queryable<Model.System.SysTasks>().Where(m => m.IsStart).ToList();
var tasks = SqlSugar.IOC.DbScoped.SugarScope.Queryable<Model.System.SysTasks>()
.Where(m => m.IsStart == 1).ToList();
//程序启动后注册所有定时任务
foreach (var task in tasks)