| | |
| | | |
| | | <!--自定义分页列表查询--> |
| | | <select id="selectAlarmRulePage" resultType="cn.gistack.alerts.alarmRule.vo.AlarmRuleVO"> |
| | | select sar.* from YWXT.sm_alarm_rule sar where sar.is_deleted = 0 |
| | | select sar.* |
| | | from YWXT.sm_alarm_rule sar |
| | | where sar.is_deleted = 0 |
| | | <if test="alarmRule.type!=null and alarmRule.type!=''"> |
| | | and sar.type = #{alarmRule.type} |
| | | </if> |
| | |
| | | </if> |
| | | <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> |
| | | |
| | |
| | | where sard.alarm_rule_id = #{id} |
| | | </select> |
| | | |
| | | <!--通过id查询对应的短信模板ID 集合--> |
| | | <select id="getAlarmRuleDetailListByAlarmRuleId" resultType="java.lang.String"> |
| | | select sst.template_id from sm_alarm_rule_detail sard |
| | | left join sm_sms_template sst on sst.id = sard.template_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> |