| | |
| | | <if test="alarmRule.ruleName!=null and alarmRule.ruleName!=''"> |
| | | and sar.rule_name like concat(concat('%',#{alarmRule.ruleName}),'%') |
| | | </if> |
| | | <if test="alarmRule.target!=null and alarmRule.target!=''"> |
| | | and sar.target = #{alarmRule.target} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--通过id查询--> |
| | |
| | | where sard.alarm_rule_id = #{id} |
| | | </select> |
| | | |
| | | <!--通过告警规则类型查询生成告警规则类型--> |
| | | <select id="getCreateRuleType" resultType="cn.gistack.system.entity.DictBiz"> |
| | | select create_alarm_type as dictValue,create_alarm_type as dictKey from sm_alarm_rule |
| | | where is_deleted =0 |
| | | and alarm_rule_type = #{alarmRuleType} |
| | | group by create_alarm_type |
| | | </select> |
| | | |
| | | <!--通过成告警规则类型查询告警规则名称--> |
| | | <select id="getAlarmRuleName" resultType="cn.gistack.system.entity.DictBiz"> |
| | | select rule_name as dictValue,rule_name as dictKey from sm_alarm_rule |
| | | where is_deleted =0 |
| | | and create_alarm_type = #{createAlarmType} |
| | | group by rule_name |
| | | </select> |
| | | |
| | | </mapper> |