diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/AlertPluginInstanceMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/AlertPluginInstanceMapper.xml
index fe25d8d1a3..d79731fb02 100644
--- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/AlertPluginInstanceMapper.xml
+++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/AlertPluginInstanceMapper.xml
@@ -36,11 +36,13 @@
select
from t_ds_alert_plugin_instance
- where id in
-
- #{item}
-
+
+ where id in
+
+ #{item}
+
+
@@ -92,10 +98,12 @@
and worker_group =#{workerGroupName}
- and state in
-
- #{i}
-
+
+ and state in
+
+ #{i}
+
+
order by id asc
@@ -134,10 +142,13 @@
update t_ds_process_instance
set host=null
- where host =#{host} and state in
-
- #{i}
-
+ where host =#{host}
+
+ and state in
+
+ #{i}
+
+
update t_ds_process_instance
@@ -225,10 +236,12 @@
from t_ds_process_instance
where process_definition_code=#{processDefinitionCode}
- and state in
-
- #{i}
-
+
+ and state in
+
+ #{i}
+
+
order by id asc
- delete from t_ds_resources where id in
-
- #{i}
-
+ delete from t_ds_resources
+
+ where id in
+
+ #{i}
+
+