From b8cc97fad85c7e17cdc73cfa4eed203a9c4ae421 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 30 Dec 2021 12:38:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=82=AE=E4=BB=B6=E6=88=AA=E5=9B=BE?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/sechedule/strategy/impl/EmailTaskHandler.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java index 2b23aea483..3f604967fa 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java +++ b/backend/src/main/java/io/dataease/job/sechedule/strategy/impl/EmailTaskHandler.java @@ -20,7 +20,6 @@ import io.dataease.service.system.EmailService; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; import org.quartz.*; -import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -67,13 +66,10 @@ public class EmailTaskHandler extends TaskHandler implements Job { XpackEmailTemplateDTO emailTemplate = (XpackEmailTemplateDTO) jobDataMap.get("emailTemplate"); SysUserEntity creator = (SysUserEntity) jobDataMap.get("creator"); - proxy().sendReport(taskInstance, emailTemplate, creator); + sendReport(taskInstance, emailTemplate, creator); } - public EmailTaskHandler proxy() { - return CommonBeanFactory.getBean(EmailTaskHandler.class); - } public Long saveInstance(GlobalTaskInstance taskInstance) { EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class); @@ -102,7 +98,7 @@ public class EmailTaskHandler extends TaskHandler implements Job { emailXpackService.saveInstance(taskInstance); } - @Async + public void sendReport(GlobalTaskInstance taskInstance, XpackEmailTemplateDTO emailTemplateDTO, SysUserEntity user) { EmailXpackService emailXpackService = SpringContextUtil.getBean(EmailXpackService.class);