mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-20 00:16:37 +08:00
Merge branch 'main' of https://github.com/ccnetcore/Yi into main
This commit is contained in:
@@ -45,7 +45,12 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
return new FileStreamResult(stream, MimeType);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 该方法不对外暴露
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<string> Upload(string type,IFormFile file)
|
||||
{
|
||||
|
||||
@@ -57,6 +62,7 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult>ExportFile()
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common;
|
||||
using Yi.Framework.Common.Const;
|
||||
using Yi.Framework.Common.Helper;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.Core;
|
||||
@@ -30,7 +31,16 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
[HttpPost]
|
||||
public async Task<Result> startJob()
|
||||
{
|
||||
await _quartzInvoker.start("*/1 * * * * ? ", new Quartz.JobKey("test", "my"), "VisitJob");
|
||||
//任务1
|
||||
//await _quartzInvoker.start("*/1 * * * * ? ", new Quartz.JobKey("test", "my"), "VisitJob");
|
||||
|
||||
//任务2
|
||||
Dictionary<string, object> data = new Dictionary<string, object>()
|
||||
{
|
||||
{JobConst.method,"get" },
|
||||
{JobConst.url,"https://www.baidu.com" }
|
||||
};
|
||||
await _quartzInvoker.start("*/1 * * * * ? ", new Quartz.JobKey("test", "my"), "HttpJob",data: data);
|
||||
return Result.Success();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user