|
@@ -361,7 +361,6 @@
|
|
</update>
|
|
</update>
|
|
<update id="timedAlterTable">
|
|
<update id="timedAlterTable">
|
|
alter table alarmhistory_${stationname}_${yearmonth}
|
|
alter table alarmhistory_${stationname}_${yearmonth}
|
|
- owner to gdprod
|
|
|
|
</update>
|
|
</update>
|
|
<update id="timedCreatAlerttimeIndex">
|
|
<update id="timedCreatAlerttimeIndex">
|
|
create index IX_AH_${stationname}_${yearmonth}_alerttime on alarmhistory_${stationname}_${yearmonth} ("alerttime")
|
|
create index IX_AH_${stationname}_${yearmonth}_alerttime on alarmhistory_${stationname}_${yearmonth} ("alerttime")
|
|
@@ -370,7 +369,8 @@
|
|
create index IX_AH_${stationname}_${yearmonth}_snapid on alarmhistory_${stationname}_${yearmonth} ("snapid")
|
|
create index IX_AH_${stationname}_${yearmonth}_snapid on alarmhistory_${stationname}_${yearmonth} ("snapid")
|
|
</update>
|
|
</update>
|
|
<select id="isHasTable" resultType="java.lang.Integer">
|
|
<select id="isHasTable" resultType="java.lang.Integer">
|
|
- select count(*) from information_schema.TABLES where table_name =upper('alarmhistory_{stationname}_${yearmonth}')
|
|
|
|
|
|
+ select count(*) from information_schema.tables where table_schema='public' and table_type='BASE TABLE' and
|
|
|
|
+ table_name=LOWER('alarmhistory_${stationname}_${yearmonth}');
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getlatestAlarmHistory" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.model.AlarmHistoryInfo">
|
|
<select id="getlatestAlarmHistory" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.model.AlarmHistoryInfo">
|