|
@@ -0,0 +1,29 @@
|
|
|
+package com.ssj.task.sz;
|
|
|
+
|
|
|
+import org.quartz.DisallowConcurrentExecution;
|
|
|
+import org.quartz.Job;
|
|
|
+import org.quartz.JobExecutionContext;
|
|
|
+import org.quartz.JobExecutionException;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import com.ssj.framework.core.util.SystemResourceLocator;
|
|
|
+import com.ssj.service.sys.fx.service.MerchantBackupService;
|
|
|
+
|
|
|
+@DisallowConcurrentExecution
|
|
|
+@Component
|
|
|
+public class MerchantBackupTask implements Job{
|
|
|
+
|
|
|
+ private static Logger logger = LoggerFactory.getLogger(MerchantBackupTask.class);
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void execute(JobExecutionContext context) throws JobExecutionException {
|
|
|
+ try{
|
|
|
+ MerchantBackupService merchantBackupService = SystemResourceLocator.getBean(MerchantBackupService.class);
|
|
|
+ merchantBackupService.runMerchantBackup();
|
|
|
+ }catch (Exception e) {
|
|
|
+ logger.error("【商户备份】商户数据备份定时任务,异常:"+e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|