首页 星云 工具 资源 星选 资讯 热门工具
:

PDF转图片 完全免费 小红书视频下载 无水印 抖音视频下载 无水印 数字星空

ruoyi-springcloud-quartz

后端 90.19KB 18 需要积分: 1
立即下载

资源介绍:

若依微服务项目中的quartz模块包
package com.ruoyi.quartz.controller; import java.util.List; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.quartz.SchedulerException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.exception.job.TaskException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.quartz.domain.SysJob; import com.ruoyi.quartz.service.ISysJobService; import com.ruoyi.quartz.util.CronUtils; import com.ruoyi.quartz.util.ScheduleUtils; /** * 调度任务信息操作处理 * * @author ruoyi */ @Controller @RequestMapping("/monitor/job") public class SysJobController extends BaseController { private String prefix = "monitor/job"; @Autowired private ISysJobService jobService; @RequiresPermissions("monitor:job:view") @GetMapping() public String job() { return prefix + "/job"; } @RequiresPermissions("monitor:job:list") @PostMapping("/list") @ResponseBody public TableDataInfo list(SysJob job) { startPage(); List list = jobService.selectJobList(job); return getDataTable(list); } @Log(title = "定时任务", businessType = BusinessType.EXPORT) @RequiresPermissions("monitor:job:export") @PostMapping("/export") @ResponseBody public AjaxResult export(SysJob job) { List list = jobService.selectJobList(job); ExcelUtil util = new ExcelUtil(SysJob.class); return util.exportExcel(list, "定时任务"); } @Log(title = "定时任务", businessType = BusinessType.DELETE) @RequiresPermissions("monitor:job:remove") @PostMapping("/remove") @ResponseBody public AjaxResult remove(String ids) throws SchedulerException { jobService.deleteJobByIds(ids); return success(); } @RequiresPermissions("monitor:job:detail") @GetMapping("/detail/{jobId}") public String detail(@PathVariable("jobId") Long jobId, ModelMap mmap) { mmap.put("name", "job"); mmap.put("job", jobService.selectJobById(jobId)); return prefix + "/detail"; } /** * 任务调度状态修改 */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) @RequiresPermissions("monitor:job:changeStatus") @PostMapping("/changeStatus") @ResponseBody public AjaxResult changeStatus(SysJob job) throws SchedulerException { SysJob newJob = jobService.selectJobById(job.getJobId()); newJob.setStatus(job.getStatus()); return toAjax(jobService.changeStatus(newJob)); } /** * 任务调度立即执行一次 */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) @RequiresPermissions("monitor:job:changeStatus") @PostMapping("/run") @ResponseBody public AjaxResult run(SysJob job) throws SchedulerException { boolean result = jobService.run(job); return result ? success() : error("任务不存在或已过期!"); } /** * 新增调度 */ @GetMapping("/add") public String add() { return prefix + "/add"; } /** * 新增保存调度 */ @Log(title = "定时任务", businessType = BusinessType.INSERT) // @RequiresPermissions("monitor:job:add") @PostMapping("/add") @ResponseBody public AjaxResult addSave(@Validated @RequestBody SysJob job) throws SchedulerException, TaskException { if (!CronUtils.isValid(job.getCronExpression())) { return error("新增任务'" + job.getJobName() + "'失败,Cron表达式不正确"); } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) { return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS })) { return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap(s)'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) { return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR)) { return error("新增任务'" + job.getJobName() + "'失败,目标字符串存在违规"); } else if (!ScheduleUtils.whiteList(job.getInvokeTarget())) { return error("新增任务'" + job.getJobName() + "'失败,目标字符串不在白名单内"); } job.setCreateBy("0"); return toAjax(jobService.insertJob(job)); } /** * 修改调度 */ @RequiresPermissions("monitor:job:edit") @GetMapping("/edit/{jobId}") public String edit(@PathVariable("jobId") Long jobId, ModelMap mmap) { mmap.put("job", jobService.selectJobById(jobId)); return prefix + "/edit"; } /** * 修改保存调度 */ @Log(title = "定时任务", businessType = BusinessType.UPDATE) @RequiresPermissions("monitor:job:edit") @PostMapping("/edit") @ResponseBody public AjaxResult editSave(@Validated SysJob job) throws SchedulerException, TaskException { if (!CronUtils.isValid(job.getCronExpression())) { return error("修改任务'" + job.getJobName() + "'失败,Cron表达式不正确"); } else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) { return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS })) { return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) { return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用"); } else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR)) { return error("修改任务'" + job.getJobName() + "'失败,目标字符串存在违规"); } else if (!ScheduleUtils.whiteList(job.getInvokeTarget())) { return error("修改任务'" + job.getJobName() + "'失败,目标字符串不在白名单内"); } return toAjax(jobService.updateJob(job)); } /** * 校验cron表达式是否有效 */ @PostMapping("/checkCronExpressionIsValid") @ResponseBody public boolean checkCronExpressionIsValid(SysJob job) { return jobService.checkCronExpressionIsValid(job.getCronExpression()); } /** * Cron表达式在线生成 */ @G

资源文件列表:

ruoyi-quartz.zip 大约有94个文件
  1. ruoyi-quartz/
  2. ruoyi-quartz/pom.xml 1.15KB
  3. ruoyi-quartz/src/
  4. ruoyi-quartz/src/main/
  5. ruoyi-quartz/src/main/java/
  6. ruoyi-quartz/src/main/java/com/
  7. ruoyi-quartz/src/main/java/com/ruoyi/
  8. ruoyi-quartz/src/main/java/com/ruoyi/quartz/
  9. ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/
  10. ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java 2.4KB
  11. ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/
  12. ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java 8.46KB
  13. ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java 3.42KB
  14. ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/
  15. ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java 4.57KB
  16. ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java 3.33KB
  17. ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/
  18. ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobLogMapper.java 1.38KB
  19. ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java 1.36KB
  20. ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/
  21. ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobLogService.java 1.22KB
  22. ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java 2.33KB
  23. ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/
  24. ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobLogServiceImpl.java 1.93KB
  25. ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java 7.31KB
  26. ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/
  27. ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 719B
  28. ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/
  29. ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/AbstractQuartzJob.java 3.36KB
  30. ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/CronUtils.java 2.47KB
  31. ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java 5.71KB
  32. ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.java 523B
  33. ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzJobExecution.java 430B
  34. ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java 5.11KB
  35. ruoyi-quartz/src/main/resources/
  36. ruoyi-quartz/src/main/resources/mapper/
  37. ruoyi-quartz/src/main/resources/mapper/quartz/
  38. ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml 3.8KB
  39. ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml 4.93KB
  40. ruoyi-quartz/src/main/resources/templates/
  41. ruoyi-quartz/src/main/resources/templates/monitor/
  42. ruoyi-quartz/src/main/resources/templates/monitor/job/
  43. ruoyi-quartz/src/main/resources/templates/monitor/job/add.html 4.1KB
  44. ruoyi-quartz/src/main/resources/templates/monitor/job/cron.html 68.73KB
  45. ruoyi-quartz/src/main/resources/templates/monitor/job/detail.html 4.07KB
  46. ruoyi-quartz/src/main/resources/templates/monitor/job/edit.html 4.84KB
  47. ruoyi-quartz/src/main/resources/templates/monitor/job/job.html 7.95KB
  48. ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html 5.25KB
  49. ruoyi-quartz/target/
  50. ruoyi-quartz/target/classes/
  51. ruoyi-quartz/target/classes/com/
  52. ruoyi-quartz/target/classes/com/ruoyi/
  53. ruoyi-quartz/target/classes/com/ruoyi/quartz/
  54. ruoyi-quartz/target/classes/com/ruoyi/quartz/config/
  55. ruoyi-quartz/target/classes/com/ruoyi/quartz/config/ScheduleConfig.class 2.23KB
  56. ruoyi-quartz/target/classes/com/ruoyi/quartz/controller/
  57. ruoyi-quartz/target/classes/com/ruoyi/quartz/controller/SysJobController.class 7.9KB
  58. ruoyi-quartz/target/classes/com/ruoyi/quartz/controller/SysJobLogController.class 4.49KB
  59. ruoyi-quartz/target/classes/com/ruoyi/quartz/domain/
  60. ruoyi-quartz/target/classes/com/ruoyi/quartz/domain/SysJob.class 4.7KB
  61. ruoyi-quartz/target/classes/com/ruoyi/quartz/domain/SysJobLog.class 3.31KB
  62. ruoyi-quartz/target/classes/com/ruoyi/quartz/mapper/
  63. ruoyi-quartz/target/classes/com/ruoyi/quartz/mapper/SysJobLogMapper.class 721B
  64. ruoyi-quartz/target/classes/com/ruoyi/quartz/mapper/SysJobMapper.class 669B
  65. ruoyi-quartz/target/classes/com/ruoyi/quartz/service/
  66. ruoyi-quartz/target/classes/com/ruoyi/quartz/service/ISysJobLogService.class 609B
  67. ruoyi-quartz/target/classes/com/ruoyi/quartz/service/ISysJobService.class 899B
  68. ruoyi-quartz/target/classes/com/ruoyi/quartz/service/impl/
  69. ruoyi-quartz/target/classes/com/ruoyi/quartz/service/impl/SysJobLogServiceImpl.class 1.86KB
  70. ruoyi-quartz/target/classes/com/ruoyi/quartz/service/impl/SysJobServiceImpl.class 5.77KB
  71. ruoyi-quartz/target/classes/com/ruoyi/quartz/task/
  72. ruoyi-quartz/target/classes/com/ruoyi/quartz/task/RyTask.class 1.49KB
  73. ruoyi-quartz/target/classes/com/ruoyi/quartz/util/
  74. ruoyi-quartz/target/classes/com/ruoyi/quartz/util/AbstractQuartzJob.class 3.79KB
  75. ruoyi-quartz/target/classes/com/ruoyi/quartz/util/CronUtils.class 2.52KB
  76. ruoyi-quartz/target/classes/com/ruoyi/quartz/util/JobInvokeUtil.class 5.53KB
  77. ruoyi-quartz/target/classes/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.class 882B
  78. ruoyi-quartz/target/classes/com/ruoyi/quartz/util/QuartzJobExecution.class 754B
  79. ruoyi-quartz/target/classes/com/ruoyi/quartz/util/ScheduleUtils.class 6.22KB
  80. ruoyi-quartz/target/classes/mapper/
  81. ruoyi-quartz/target/classes/mapper/quartz/
  82. ruoyi-quartz/target/classes/mapper/quartz/SysJobLogMapper.xml 3.8KB
  83. ruoyi-quartz/target/classes/mapper/quartz/SysJobMapper.xml 4.93KB
  84. ruoyi-quartz/target/classes/templates/
  85. ruoyi-quartz/target/classes/templates/monitor/
  86. ruoyi-quartz/target/classes/templates/monitor/job/
  87. ruoyi-quartz/target/classes/templates/monitor/job/add.html 4.1KB
  88. ruoyi-quartz/target/classes/templates/monitor/job/cron.html 68.73KB
  89. ruoyi-quartz/target/classes/templates/monitor/job/detail.html 4.07KB
  90. ruoyi-quartz/target/classes/templates/monitor/job/edit.html 4.84KB
  91. ruoyi-quartz/target/classes/templates/monitor/job/job.html 7.95KB
  92. ruoyi-quartz/target/classes/templates/monitor/job/jobLog.html 5.25KB
  93. ruoyi-quartz/target/generated-sources/
  94. ruoyi-quartz/target/generated-sources/annotations/
0评论
提交 加载更多评论
其他资源 gtk3 + sqlite3实现登录注册功能(前后端分离)完整源码
gtk3实现的登录和注册可视化窗口
chnsenticorp.zip
chnsenticorp.zip
Swing (三原色)调色板(打包后)
包含两个文件:1.8版本的 jre 及该项目的 .exe文件
MobaXterm Pro v23.0中文便携版
MobaXterm Pro v23.0中文便携版
3333333333333333333333333333333333
3333333333333333333333
“gtk3管理端+tcp线程多并发后台+客户端”源码
tcp服务器和客户端之间实现多线程通信。gtk3管理端部署在服务器上,从sqlite3数据库获取数据实现可视化
Argyll-V3.2.0-win32-exe
DisplayCAL给显示器校色,安装DisplayCAL软件后最新安装ArgyllCMS色彩引擎文件,win32
【STM32+HAL】FreeRTOS的CubeMX配置
一、所用工具 1、芯片: STM32F407ZET6 2、STM32CubeMx软件 3、IDE: MDK-Keil软件 4、STM32F4xxHAL库 二、实现功能 1、使用CubeMx进行FreeRTOS的初始化配置 2、实现LED每隔500ms闪烁一次 ​