ct 5 giorni fa
parent
commit
d74fd85fb4

+ 16 - 16
fs-quartz/src/main/java/com/fs/quartz/util/AbstractQuartzJob.java

@@ -33,22 +33,22 @@ public abstract class AbstractQuartzJob implements Job
     @Override
     public void execute(JobExecutionContext context) throws JobExecutionException
     {
-//        SysJob sysJob = new SysJob();
-//        BeanUtils.copyBeanProp(sysJob, context.getMergedJobDataMap().get(ScheduleConstants.TASK_PROPERTIES));
-//        try
-//        {
-//            before(context, sysJob);
-//            if (sysJob != null)
-//            {
-//                doExecute(context, sysJob);
-//            }
-//            after(context, sysJob, null);
-//        }
-//        catch (Exception e)
-//        {
-//            log.error("任务执行异常  - :", e);
-//            after(context, sysJob, e);
-//        }
+        SysJob sysJob = new SysJob();
+        BeanUtils.copyBeanProp(sysJob, context.getMergedJobDataMap().get(ScheduleConstants.TASK_PROPERTIES));
+        try
+        {
+            before(context, sysJob);
+            if (sysJob != null)
+            {
+                doExecute(context, sysJob);
+            }
+            after(context, sysJob, null);
+        }
+        catch (Exception e)
+        {
+            log.error("任务执行异常  - :", e);
+            after(context, sysJob, e);
+        }
     }
 
     /**