using Furion.DatabaseAccessor;
|
using Microsoft.EntityFrameworkCore;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading;
|
using System.Threading.Tasks;
|
|
namespace FlexJobApi.Core
|
{
|
/// <summary>
|
/// 任务仓库
|
/// </summary>
|
public static class TaskInfoRepository
|
{
|
/// <summary>
|
/// 获取任务查询
|
/// </summary>
|
/// <param name="rep"></param>
|
/// <param name="logier"></param>
|
/// <returns></returns>
|
public static IQueryable<TaskInfo> GetQueryable(this IRepository<TaskInfo> rep, CurrentLogier logier = null)
|
{
|
logier = logier ?? JwtUtils.GetCurrentLogier();
|
return rep.AsQueryable().AsNoTracking()
|
.OrderBy(it => it.BeginTime)
|
.Where(it => it.EnterpriseId == logier.EnterpriseId);
|
}
|
}
|
}
|