Commit c9bd08c2 by RuoYi

修复定时任务执行失败后入库状态为成功

parent 4b8d64f1
......@@ -31,7 +31,7 @@
showColumns: true,
showToggle: true,
showExport: false,
clickToSelect: true,
clickToSelect: false,
fixedColumns: false,
fixedNumber: 0,
rightFixedColumns: false,
......
......@@ -16,6 +16,12 @@ public class BusinessException extends RuntimeException
this.message = message;
}
public BusinessException(String message, Throwable e)
{
super(message, e);
this.message = message;
}
@Override
public String getMessage()
{
......
package com.ruoyi.quartz.util;
import java.lang.reflect.Method;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ReflectionUtils;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.spring.SpringUtils;
......@@ -15,8 +14,6 @@ import com.ruoyi.common.utils.spring.SpringUtils;
*/
public class ScheduleRunnable implements Runnable
{
private static final Logger log = LoggerFactory.getLogger(ScheduleRunnable.class);
private Object target;
private Method method;
private String params;
......@@ -54,7 +51,7 @@ public class ScheduleRunnable implements Runnable
}
catch (Exception e)
{
log.error("执行定时任务 - :", e);
throw new BusinessException("执行定时任务失败", e);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment