修改定时任务添加参数校验

This commit is contained in:
不做码农
2022-05-10 08:17:19 +08:00
parent 87b0501495
commit d7ee352f3a
2 changed files with 6 additions and 2 deletions

View File

@@ -95,6 +95,10 @@ namespace ZR.Admin.WebApi.Controllers
{
throw new CustomException($"地址不能为空");
}
if (parm.TaskType == 1 && (parm.AssemblyName.IsEmpty() || parm.ClassName.IsEmpty()))
{
throw new CustomException($"程序集或者类名不能为空");
}
//从 Dto 映射到 实体
var tasksQz = parm.Adapt<SysTasksQz>().ToCreate();
var worker = new IdWorker(1, 1);