using Dlhis.ScheduledTask.Common.Dto;
using Dlhis.ScheduledTask.Common.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Dlhis.ScheduledTask.TaskAssignment.Controllers;
[Authorize(Roles = "admin")]
[Route("api/[controller]")]
[ApiController]
public class HangfireController : ControllerBase
{
private readonly IHangfireService _hangfireService;
public HangfireController(IHangfireService hangfireService)
{
_hangfireService = hangfireService;
}
///
/// 手动获取人员
///
///
///
[HttpPost("sap/person/no")]
public async Task ManuallySync(SapPersonNoRequest request)
{
await _hangfireService.CreateSapPersonSyncBackgroundJobAsync(request);
}
}