From 6a5367fd57977305ff0c734d8103430ba15acaec Mon Sep 17 00:00:00 2001 From: SongTao Zhuang <51652084+MichaelDeSteven@users.noreply.github.com> Date: Sun, 28 Aug 2022 20:58:12 +0800 Subject: [PATCH] [Improvement-11662][dao] fix foreach null items in mapper.xml --- .../dao/mapper/AlertPluginInstanceMapper.xml | 12 ++-- .../dao/mapper/ProcessInstanceMapper.xml | 71 +++++++++++-------- .../dao/mapper/ResourceMapper.xml | 21 +++--- .../dao/mapper/ResourceUserMapper.xml | 10 +-- .../dao/mapper/ScheduleMapper.xml | 10 +-- .../dao/mapper/TaskInstanceMapper.xml | 10 +-- .../dao/mapper/UserMapper.xml | 10 +-- 7 files changed, 87 insertions(+), 57 deletions(-) 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} + + select id diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml index f6b216195c..807a296974 100644 --- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml +++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/UserMapper.xml @@ -118,10 +118,12 @@