|
@@ -62,7 +62,7 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="pageQueryAll" parameterType="java.util.Map" resultMap="alertRule2ResultToPostgreSql">
|
|
|
- select a.*, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a
|
|
|
+ select a.*, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a
|
|
|
left join windpowerstation w on w.id = a.station
|
|
|
<where>
|
|
|
1=1
|
|
@@ -90,9 +90,6 @@
|
|
|
and a.enabled = false
|
|
|
</if>
|
|
|
</if>
|
|
|
- <if test="relatedParts !=null and relatedParts !=''">
|
|
|
- and a.relatedparts = #{relatedParts}
|
|
|
- </if>
|
|
|
|
|
|
<!-- and a.range = 0-->
|
|
|
</where>
|
|
@@ -112,22 +109,8 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
- <select id="getAllByStationIdAndModelId2" parameterType="java.util.Map"
|
|
|
- resultMap="alertRule2ResultToPostgreSql">
|
|
|
- select *, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a
|
|
|
- <where>
|
|
|
- 1=1
|
|
|
- <if test="station !=null and station !=''">
|
|
|
- and a.station = #{station}
|
|
|
- </if>
|
|
|
- <if test="modelid !=null and modelid !=''">
|
|
|
- and a.modelid = #{modelid}
|
|
|
- </if>
|
|
|
- and a.enabled = true
|
|
|
- </where>
|
|
|
- </select>
|
|
|
<select id="getById" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.Alertrule2">
|
|
|
- select *, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a
|
|
|
+ select * from ALERTRULE2 a
|
|
|
<where>
|
|
|
1=1
|
|
|
<if test="idString !=null and idString !=''">
|
|
@@ -136,13 +119,6 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectListAll" parameterType="java.util.Map" resultMap="alertRule2ResultToPostgreSql">
|
|
|
- select *, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a
|
|
|
- <where>
|
|
|
- enabled = true
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="quertByrelatedParts" resultType="java.util.HashMap">
|
|
|
select a.name from ALERTRULE2 a
|
|
|
where a.relatedparts = #{relatedParts}
|
|
@@ -241,12 +217,11 @@
|
|
|
|
|
|
|
|
|
<select id="selectByAlertrule2Id" resultMap="alertRule2ResultToPostgreSql">
|
|
|
- select *, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a where
|
|
|
- a.id=#{id}
|
|
|
+ select *, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a where a.id=#{id}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectByNameAndSataionAndModelid" resultType="com.gyee.wisdom.alarm.sharding.entity.Alertrule2">
|
|
|
- select *, (case a.enabled WHEN 't' then 1 when 'f' then 0 else 0 end) as specialenable from ALERTRULE2 a
|
|
|
+ select * from alertrule2 a
|
|
|
<where>
|
|
|
1=1
|
|
|
<if test="name !=null and name !=''">
|
|
@@ -325,4 +300,4 @@
|
|
|
</foreach>
|
|
|
</where>
|
|
|
</sql>
|
|
|
-</mapper>
|
|
|
+</mapper>
|