mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-07 12:59:01 +00:00
Merge branch 'master' of https://gitee.com/y_project/RuoYi-Cloud
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.job.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.quartz.SchedulerException;
|
||||
@@ -58,7 +57,7 @@ public class SysJobController extends BaseController
|
||||
@RequiresPermissions("monitor:job:export")
|
||||
@Log(title = "定时任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysJob sysJob) throws IOException
|
||||
public void export(HttpServletResponse response, SysJob sysJob)
|
||||
{
|
||||
List<SysJob> list = jobService.selectJobList(sysJob);
|
||||
ExcelUtil<SysJob> util = new ExcelUtil<SysJob>(SysJob.class);
|
||||
@@ -99,6 +98,10 @@ public class SysJobController extends BaseController
|
||||
{
|
||||
return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)//'调用");
|
||||
}
|
||||
else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR))
|
||||
{
|
||||
return error("新增任务'" + job.getJobName() + "'失败,目标字符串存在违规");
|
||||
}
|
||||
job.setCreateBy(SecurityUtils.getUsername());
|
||||
return toAjax(jobService.insertJob(job));
|
||||
}
|
||||
@@ -127,6 +130,10 @@ public class SysJobController extends BaseController
|
||||
{
|
||||
return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)//'调用");
|
||||
}
|
||||
else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR))
|
||||
{
|
||||
return error("修改任务'" + job.getJobName() + "'失败,目标字符串存在违规");
|
||||
}
|
||||
job.setUpdateBy(SecurityUtils.getUsername());
|
||||
return toAjax(jobService.updateJob(job));
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.job.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -50,7 +49,7 @@ public class SysJobLogController extends BaseController
|
||||
@RequiresPermissions("monitor:job:export")
|
||||
@Log(title = "任务调度日志", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysJobLog sysJobLog) throws IOException
|
||||
public void export(HttpServletResponse response, SysJobLog sysJobLog)
|
||||
{
|
||||
List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
|
||||
ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
|
||||
|
@@ -110,7 +110,7 @@ public class JobInvokeUtil
|
||||
{
|
||||
return null;
|
||||
}
|
||||
String[] methodParams = methodStr.split(",");
|
||||
String[] methodParams = methodStr.split(",(?=(?:[^\']*\"[^\']*\')*[^\']*$)");
|
||||
List<Object[]> classs = new LinkedList<>();
|
||||
for (int i = 0; i < methodParams.length; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user