25 lines
680 B
C#
25 lines
680 B
C#
using Dlhis.Basic.Api;
|
|
using Dlhis.ScheduledTask.Attributes;
|
|
|
|
namespace Dlhis.ScheduledTask.Jobs;
|
|
|
|
/// <summary>
|
|
/// 自动处理访客离场
|
|
/// </summary>
|
|
[RecurringJob(nameof(ExternalAutoResignJob), "0 0 1 1/1 * ? ", Name = "自动处理访客离场")]
|
|
public class ExternalAutoResignJob : BaseJob
|
|
{
|
|
private readonly ISyncApi _syncApi;
|
|
|
|
/// <inheritdoc />
|
|
public ExternalAutoResignJob(IServiceProvider serviceProvider, ISyncApi syncApi) : base(serviceProvider)
|
|
{
|
|
_syncApi = syncApi;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override async Task RunAsync(IServiceProvider serviceProvider)
|
|
{
|
|
await _syncApi.ExternalAutoResignAsync();
|
|
}
|
|
} |