This commit is contained in:
2026-07-15 23:04:46 +08:00
parent 4ef892e15e
commit c94b3ce200
28 changed files with 562 additions and 10 deletions

View File

@@ -0,0 +1,24 @@
using Photon.Core.Timer;
using Quartz;
namespace Application.Web;
public class AutoJob: ITimerAutoJob
{
public async Task Execute(IJobExecutionContext context)
{
string jobId = context.JobDetail.Key.Name;
if (!string.IsNullOrEmpty(jobId))
{
var jobService = App.GetService<IGameAutoJobService>();
var jobData = await jobService.GetJobInfo(jobId);
if (jobData != null)
{
await jobService.HandleJob(jobData);
if (jobData.opType == nameof(GameEnum.JobType.single))
{
await jobService.StopJob(jobId);
}
}
}
}
}