修改定时发送

This commit is contained in:
he
2025-06-09 17:01:30 +08:00
parent 4262189508
commit 65bffa26b7
3 changed files with 26 additions and 2 deletions
@@ -118,6 +118,24 @@ namespace IRaCIS.Core.Application.Services
return ResponseOutput.Result(true);
}
/// <summary>
/// 测试定时发送
/// </summary>
/// <returns></returns>
public async Task<IResponseOutput> TestPush()
{
Task.Run(async () =>
{
// 创建独立作用域
using (var scope = serviceScopeFactory.CreateScope())
{
// 从新作用域解析服务
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
await mediator.Publish(new TrialDocumentErverDayEvent { });
}
});
return ResponseOutput.Result(true);
}
/// <summary>
/// Setting 界面的 项目所有文档列表