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

master
RuoYi 6 years ago committed by Limy
parent ce8fe8b464
commit f9916509c8

@ -31,7 +31,7 @@
showColumns: true, showColumns: true,
showToggle: true, showToggle: true,
showExport: false, showExport: false,
clickToSelect: true, clickToSelect: false,
fixedColumns: false, fixedColumns: false,
fixedNumber: 0, fixedNumber: 0,
rightFixedColumns: false, rightFixedColumns: false,

@ -16,6 +16,12 @@ public class BusinessException extends RuntimeException
this.message = message; this.message = message;
} }
public BusinessException(String message, Throwable e)
{
super(message, e);
this.message = message;
}
@Override @Override
public String getMessage() public String getMessage()
{ {

@ -1,9 +1,8 @@
package com.ruoyi.quartz.util; package com.ruoyi.quartz.util;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.common.utils.spring.SpringUtils;
@ -15,8 +14,6 @@ import com.ruoyi.common.utils.spring.SpringUtils;
*/ */
public class ScheduleRunnable implements Runnable public class ScheduleRunnable implements Runnable
{ {
private static final Logger log = LoggerFactory.getLogger(ScheduleRunnable.class);
private Object target; private Object target;
private Method method; private Method method;
private String params; private String params;
@ -54,7 +51,7 @@ public class ScheduleRunnable implements Runnable
} }
catch (Exception e) catch (Exception e)
{ {
log.error("执行定时任务 - ", e); throw new BusinessException("执行定时任务失败", e);
} }
} }
} }

Loading…
Cancel
Save