com.ruoyi.quartz.domain.SysJobLog Java Examples
The following examples show how to use
com.ruoyi.quartz.domain.SysJobLog.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractQuartzJob.java From RuoYi with Apache License 2.0 | 6 votes |
/** * 执行后 * * @param context 工作执行上下文对象 */ protected void after(JobExecutionContext context, SysJob sysJob, Exception e) { Date startTime = threadLocal.get(); threadLocal.remove(); final SysJobLog sysJobLog = new SysJobLog(); sysJobLog.setJobName(sysJob.getJobName()); sysJobLog.setJobGroup(sysJob.getJobGroup()); sysJobLog.setMethodName(sysJob.getMethodName()); sysJobLog.setMethodParams(sysJob.getMethodParams()); sysJobLog.setStartTime(startTime); sysJobLog.setEndTime(new Date()); long runMs = sysJobLog.getEndTime().getTime() - sysJobLog.getStartTime().getTime(); sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒"); if (e != null) { sysJobLog.setStatus(Constants.FAIL); String errorMsg = StrUtil.sub(ExceptionUtil.getExceptionMessage(e), 0, 2000); sysJobLog.setExceptionInfo(errorMsg); } else { sysJobLog.setStatus(Constants.SUCCESS); } // 写入数据库当中 SpringUtils.getBean(ISysJobLogService.class).addJobLog(sysJobLog); }
Example #2
Source File: SysJobLogController.java From supplierShop with MIT License | 5 votes |
@Log(title = "调度日志", businessType = BusinessType.EXPORT) @RequiresPermissions("monitor:job:export") @PostMapping("/export") @ResponseBody public AjaxResult export(SysJobLog jobLog) { List<SysJobLog> list = jobLogService.selectJobLogList(jobLog); ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class); return util.exportExcel(list, "调度日志"); }
Example #3
Source File: SysJobLogController.java From RuoYi with Apache License 2.0 | 5 votes |
@Log(title = "调度日志", businessType = BusinessType.EXPORT) @RequiresPermissions("monitor:job:export") @PostMapping("/export") @ResponseBody public AjaxResult export(SysJobLog jobLog) { List<SysJobLog> list = jobLogService.selectJobLogList(jobLog); ExcelUtil<SysJobLog> util = new ExcelUtil<>(SysJobLog.class); return util.exportExcel(list, "调度日志"); }
Example #4
Source File: AbstractQuartzJob.java From supplierShop with MIT License | 5 votes |
/** * 执行后 * * @param context 工作执行上下文对象 * @param sysScheduleJob 系统计划任务 */ protected void after(JobExecutionContext context, SysJob sysJob, Exception e) { Date startTime = threadLocal.get(); threadLocal.remove(); final SysJobLog sysJobLog = new SysJobLog(); sysJobLog.setJobName(sysJob.getJobName()); sysJobLog.setJobGroup(sysJob.getJobGroup()); sysJobLog.setInvokeTarget(sysJob.getInvokeTarget()); sysJobLog.setStartTime(startTime); sysJobLog.setEndTime(new Date()); long runMs = sysJobLog.getEndTime().getTime() - sysJobLog.getStartTime().getTime(); sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒"); if (e != null) { sysJobLog.setStatus(Constants.FAIL); String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000); sysJobLog.setExceptionInfo(errorMsg); } else { sysJobLog.setStatus(Constants.SUCCESS); } // 写入数据库当中 SpringUtils.getBean(ISysJobLogService.class).addJobLog(sysJobLog); }
Example #5
Source File: SysJobLogController.java From ruoyiplus with MIT License | 5 votes |
@Log(title = "调度日志", businessType = BusinessType.EXPORT) @RequiresPermissions("monitor:job:export") @PostMapping("/export") @ResponseBody public AjaxResult export(SysJobLog jobLog) { List<SysJobLog> list = jobLogService.selectJobLogList(jobLog); ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class); return util.exportExcel(list, "调度日志"); }
Example #6
Source File: SysJobLogServiceImpl.java From supplierShop with MIT License | 4 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 */ @Override public void addJobLog(SysJobLog jobLog) { jobLogMapper.insertJobLog(jobLog); }
Example #7
Source File: SysJobLogServiceImpl.java From ruoyiplus with MIT License | 4 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 */ @Override public void addJobLog(SysJobLog jobLog) { jobLogMapper.insertJobLog(jobLog); }
Example #8
Source File: ISysJobLogService.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 获取quartz调度器日志的计划任务 * * @param jobLog 调度日志信息 * @return 调度任务日志集合 */ List<SysJobLog> selectJobLogList(SysJobLog jobLog);
Example #9
Source File: SysJobLogMapper.java From ruoyiplus with MIT License | 2 votes |
/** * 通过调度任务日志ID查询调度信息 * * @param jobLogId 调度任务日志ID * @return 调度任务日志对象信息 */ public SysJobLog selectJobLogById(Long jobLogId);
Example #10
Source File: SysJobLogMapper.java From ruoyiplus with MIT License | 2 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 * @return 结果 */ public int insertJobLog(SysJobLog jobLog);
Example #11
Source File: SysJobLogServiceImpl.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 获取quartz调度器日志的计划任务 * * @param jobLog 调度日志信息 * @return 调度任务日志集合 */ @Override public List<SysJobLog> selectJobLogList(SysJobLog jobLog) { return jobLogMapper.selectJobLogList(jobLog); }
Example #12
Source File: SysJobLogServiceImpl.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 通过调度任务日志ID查询调度信息 * * @param jobLogId 调度任务日志ID * @return 调度任务日志对象信息 */ @Override public SysJobLog selectJobLogById(Long jobLogId) { return jobLogMapper.selectJobLogById(jobLogId); }
Example #13
Source File: SysJobLogServiceImpl.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 */ @Override public void addJobLog(SysJobLog jobLog) { jobLogMapper.insertJobLog(jobLog); }
Example #14
Source File: ISysJobLogService.java From ruoyiplus with MIT License | 2 votes |
/** * 通过调度任务日志ID查询调度信息 * * @param jobLogId 调度任务日志ID * @return 调度任务日志对象信息 */ public SysJobLog selectJobLogById(Long jobLogId);
Example #15
Source File: ISysJobLogService.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 通过调度任务日志ID查询调度信息 * * @param jobLogId 调度任务日志ID * @return 调度任务日志对象信息 */ SysJobLog selectJobLogById(Long jobLogId);
Example #16
Source File: ISysJobLogService.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 */ void addJobLog(SysJobLog jobLog);
Example #17
Source File: SysJobLogMapper.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 获取quartz调度器日志的计划任务 * * @param jobLog 调度日志信息 * @return 调度任务日志集合 */ List<SysJobLog> selectJobLogList(SysJobLog jobLog);
Example #18
Source File: SysJobLogMapper.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 通过调度任务日志ID查询调度信息 * * @param jobLogId 调度任务日志ID * @return 调度任务日志对象信息 */ SysJobLog selectJobLogById(Long jobLogId);
Example #19
Source File: SysJobLogMapper.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 * @return 结果 */ int insertJobLog(SysJobLog jobLog);
Example #20
Source File: SysJobLogMapper.java From RuoYi with Apache License 2.0 | 2 votes |
/** * 查询所有调度任务日志 * * @return 调度任务日志列表 */ List<SysJobLog> selectJobLogAll();
Example #21
Source File: SysJobLogMapper.java From ruoyiplus with MIT License | 2 votes |
/** * 查询所有调度任务日志 * * @return 调度任务日志列表 */ public List<SysJobLog> selectJobLogAll();
Example #22
Source File: SysJobLogMapper.java From ruoyiplus with MIT License | 2 votes |
/** * 获取quartz调度器日志的计划任务 * * @param jobLog 调度日志信息 * @return 调度任务日志集合 */ public List<SysJobLog> selectJobLogList(SysJobLog jobLog);
Example #23
Source File: ISysJobLogService.java From ruoyiplus with MIT License | 2 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 */ public void addJobLog(SysJobLog jobLog);
Example #24
Source File: ISysJobLogService.java From ruoyiplus with MIT License | 2 votes |
/** * 获取quartz调度器日志的计划任务 * * @param jobLog 调度日志信息 * @return 调度任务日志集合 */ public List<SysJobLog> selectJobLogList(SysJobLog jobLog);
Example #25
Source File: SysJobLogServiceImpl.java From ruoyiplus with MIT License | 2 votes |
/** * 通过调度任务日志ID查询调度信息 * * @param jobId 调度任务日志ID * @return 调度任务日志对象信息 */ @Override public SysJobLog selectJobLogById(Long jobLogId) { return jobLogMapper.selectJobLogById(jobLogId); }
Example #26
Source File: SysJobLogServiceImpl.java From ruoyiplus with MIT License | 2 votes |
/** * 获取quartz调度器日志的计划任务 * * @param jobLog 调度日志信息 * @return 调度任务日志集合 */ @Override public List<SysJobLog> selectJobLogList(SysJobLog jobLog) { return jobLogMapper.selectJobLogList(jobLog); }
Example #27
Source File: SysJobLogMapper.java From supplierShop with MIT License | 2 votes |
/** * 新增任务日志 * * @param jobLog 调度日志信息 * @return 结果 */ public int insertJobLog(SysJobLog jobLog);
Example #28
Source File: SysJobLogMapper.java From supplierShop with MIT License | 2 votes |
/** * 通过调度任务日志ID查询调度信息 * * @param jobLogId 调度任务日志ID * @return 调度任务日志对象信息 */ public SysJobLog selectJobLogById(Long jobLogId);
Example #29
Source File: SysJobLogMapper.java From supplierShop with MIT License | 2 votes |
/** * 查询所有调度任务日志 * * @return 调度任务日志列表 */ public List<SysJobLog> selectJobLogAll();
Example #30
Source File: SysJobLogMapper.java From supplierShop with MIT License | 2 votes |
/** * 获取quartz调度器日志的计划任务 * * @param jobLog 调度日志信息 * @return 调度任务日志集合 */ public List<SysJobLog> selectJobLogList(SysJobLog jobLog);