[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
This commit is contained in:
parent
0d86a48d1c
commit
bb140fbc3b
|
|
@ -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 != ''">
|
||||
|
|
|
|||
Loading…
Reference in New Issue