This is an automated email from the ASF dual-hosted git repository.
kerwin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new bb140fb [DS-7227][refactor] optimize alert plugin instance list order
(#7506)
bb140fb is described below
commit bb140fbc3b462cc192b18dca4ef1cee409909b71
Author: Tom <[email protected]>
AuthorDate: Tue Dec 21 09:22:16 2021 +0800
[DS-7227][refactor] optimize alert plugin instance list order (#7506)
[DS-7227][refactor] optimize alert plugin instance list order
query all alert plugin instance list order by update time desc
optimize `select *` sql in the AlterPluginInstanceMapper.xml
---
.../dao/mapper/AlertPluginInstanceMapper.xml | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 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 babacc2..fe25d8d 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
@@ -19,15 +19,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="org.apache.dolphinscheduler.dao.mapper.AlertPluginInstanceMapper">
+ <sql id="baseSql">
+ id, plugin_define_id, plugin_instance_params, create_time,
update_time, instance_name
+ </sql>
+
+
<select id="queryAllAlertPluginInstanceList"
resultType="org.apache.dolphinscheduler.dao.entity.AlertPluginInstance">
- select *
+ select
+ <include refid="baseSql"/>
from t_ds_alert_plugin_instance
- where 1 = 1
+ where 1 = 1 order by update_time desc
</select>
<select id="queryByIds"
resultType="org.apache.dolphinscheduler.dao.entity.AlertPluginInstance">
- select *
+ select
+ <include refid="baseSql"/>
from t_ds_alert_plugin_instance
where id in
<foreach item="item" index="index" collection="ids"
@@ -38,7 +45,7 @@
<select id="queryByInstanceNamePage"
resultType="org.apache.dolphinscheduler.dao.entity.AlertPluginInstance">
select
- *
+ <include refid="baseSql"/>
from t_ds_alert_plugin_instance
where 1 = 1
<if test="instanceName != null and instanceName != ''">