Files
jinko.yikatong/Src/Dlhis.ScheduledTask/Jobs/ExternalAutoResignJob.cs
2025-04-15 14:46:29 +08:00

25 lines
686 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();
}
}