summaryrefslogtreecommitdiff
path: root/src/main/resources/mapper/AlertRuleDao.xml
blob: beed561ae4a037adcfcc8dd7c05fd4291658973f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">    
<mapper namespace="com.nis.dao.AlertRuleDao">
	<resultMap type="com.nis.entity.AlertRule" id="alertRule">
        <result property="id" column="id"/>
        <result property="alertName" column="alert_name"/>
        <result property="expr" column="expr"/>
        <result property="operator" column="operator"/>
        <result property="threshold" column="threshold"/>
        <result property="unit" column="unit"/>
        <result property="last" column="last"/>
        <result property="severity" column="severity"/>
        <result property="summary" column="summary"/>
        <result property="description" column="description"/>
        <result property="receiver" column="receiver"/>
        <result property="buildIn" column="build_in"/>
    </resultMap>
    
	<select id="selectList" resultMap="alertRule">
		select * from alert_rule where build_in != 1
	</select>
	
	<select id="selectBulidInRule" resultMap="alertRule">
		select * from alert_rule where build_in = 1
	</select>
</mapper>