<?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.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanWarningRuleSetMapper">

    <select id="queryList" resultType="map">
        SELECT *,
               (
                   SELECT zy.WARNING_IF
                   FROM `idx_biz_fan_warning_rule_set` zy
                   WHERE zy.WARNING_NAME = '注意'
                   LIMIT 1 ) AS WARNING_ZY,
	           (
                   SELECT zy.WARNING_IF
                   FROM `idx_biz_fan_warning_rule_set` zy
                   WHERE zy.WARNING_NAME = '危险'
                   LIMIT 1) AS WARNING_WX
        FROM
            `idx_biz_fan_warning_rule_set`
        WHERE
            WARNING_NAME = '警告'
        Limit #{current},#{size}
    </select>

    <select id="queryListCount" resultType="INT">
        SELECT count(1)
        FROM
            `idx_biz_fan_warning_rule_set`     WHERE
            WARNING_NAME = '警告'
    </select>


</mapper>
