From 8766cfc344d3635cd7e50a7c674cd5feb54d5a3d Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期一, 02 十二月 2024 09:30:35 +0800
Subject: [PATCH] 预警mq监听并发送

---
 shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleJob.java |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleJob.java b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleJob.java
index 2ced982..80626ad 100644
--- a/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleJob.java
+++ b/shasteel-biz/src/main/java/com/iailab/module/shasteel/job/utils/ScheduleJob.java
@@ -2,11 +2,9 @@
 
 import com.iailab.framework.common.constant.Constant;
 import com.iailab.framework.common.exception.ExceptionUtils;
-import com.iailab.framework.common.util.spring.SpringContextUtils;
-import com.iailab.framework.tenant.core.context.TenantContextHolder;
 import com.iailab.module.shasteel.job.entity.ScheduleJobEntity;
 import com.iailab.module.shasteel.job.entity.ScheduleJobLogEntity;
-import com.iailab.module.shasteel.job.service.ScheduleJobLogService;
+import com.iailab.module.shasteel.util.SpringContextUtils;
 import org.quartz.DisallowConcurrentExecution;
 import org.quartz.JobExecutionContext;
 import org.slf4j.Logger;
@@ -31,18 +29,12 @@
         ScheduleJobEntity scheduleJob = (ScheduleJobEntity) context.getMergedJobDataMap().
 				get(ScheduleUtils.JOB_PARAM_KEY);
 
-        //设置当前租户
-		TenantContextHolder.setTenantId(scheduleJob.getTenantId());
-		Long tenantId = TenantContextHolder.getRequiredTenantId();
-
         //数据库保存执行记录
         ScheduleJobLogEntity log = new ScheduleJobLogEntity();
-		log.setId(System.currentTimeMillis());
         log.setJobId(scheduleJob.getId());
         log.setBeanName(scheduleJob.getBeanName());
         log.setParams(scheduleJob.getParams());
 		log.setCreateDate(new Date());
-		log.setTenantId(tenantId);
 
         //任务开始时间
         long startTime = System.currentTimeMillis();
@@ -73,8 +65,8 @@
 			log.setError(ExceptionUtils.getErrorStackTrace(e));
 		}finally {
 			//获取spring bean
-			ScheduleJobLogService scheduleJobLogService = SpringContextUtils.getBean(ScheduleJobLogService.class);
-			scheduleJobLogService.insert(log);
+			/*ScheduleJobLogService scheduleJobLogService = SpringContextUtils.getBean(ScheduleJobLogService.class);
+			scheduleJobLogService.insert(log);*/
 		}
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3