File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/repository
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/alert Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1818package org .apache .dolphinscheduler .dao .repository ;
1919
2020import org .apache .dolphinscheduler .dao .entity .Project ;
21+ import org .apache .dolphinscheduler .dao .entity .ProjectUser ;
2122
2223import java .util .Collection ;
2324import java .util .List ;
@@ -28,4 +29,5 @@ public interface ProjectDao extends IDao<Project> {
2829
2930 Project queryByCode (Long projectCode );
3031
32+ ProjectUser queryProjectWithUserByWorkflowInstanceId (int workflowInstanceId );
3133}
Original file line number Diff line number Diff line change 1818package org .apache .dolphinscheduler .dao .repository .impl ;
1919
2020import org .apache .dolphinscheduler .dao .entity .Project ;
21+ import org .apache .dolphinscheduler .dao .entity .ProjectUser ;
2122import org .apache .dolphinscheduler .dao .mapper .ProjectMapper ;
2223import org .apache .dolphinscheduler .dao .repository .BaseDao ;
2324import org .apache .dolphinscheduler .dao .repository .ProjectDao ;
@@ -45,4 +46,9 @@ public List<Project> queryByCodes(Collection<Long> projectCodes) {
4546 public Project queryByCode (Long projectCode ) {
4647 return mybatisMapper .queryByCode (projectCode );
4748 }
49+
50+ @ Override
51+ public ProjectUser queryProjectWithUserByWorkflowInstanceId (int workflowInstanceId ) {
52+ return mybatisMapper .queryProjectWithUserByWorkflowInstanceId (workflowInstanceId );
53+ }
4854}
Original file line number Diff line number Diff line change 3131import org .apache .dolphinscheduler .dao .entity .WorkflowAlertContent ;
3232import org .apache .dolphinscheduler .dao .entity .WorkflowDefinitionLog ;
3333import org .apache .dolphinscheduler .dao .entity .WorkflowInstance ;
34- import org .apache .dolphinscheduler .dao .mapper .ProjectMapper ;
3534import org .apache .dolphinscheduler .dao .repository .ProjectDao ;
3635import org .apache .dolphinscheduler .dao .repository .UserDao ;
3736import org .apache .dolphinscheduler .dao .repository .WorkflowDefinitionLogDao ;
@@ -61,9 +60,6 @@ public class WorkflowAlertManager {
6160 @ Autowired
6261 private ProjectDao projectDao ;
6362
64- @ Autowired
65- private ProjectMapper projectMapper ;
66-
6763 /**
6864 * convert command type to human-readable name
6965 *
@@ -265,7 +261,7 @@ public boolean isNeedToSendWarning(WorkflowInstance workflowInstance) {
265261
266262 public void sendTaskTimeoutAlert (WorkflowInstance workflowInstance ,
267263 TaskInstance taskInstance ) {
268- ProjectUser projectUser = projectMapper .queryProjectWithUserByWorkflowInstanceId (workflowInstance .getId ());
264+ ProjectUser projectUser = projectDao .queryProjectWithUserByWorkflowInstanceId (workflowInstance .getId ());
269265 alertDao .sendTaskTimeoutAlert (workflowInstance , taskInstance , projectUser );
270266 }
271267}
You can’t perform that action at this time.
0 commit comments