<?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.zcloud.modules.alarmInfo.mapper.AlarmInfoMapper">

    <!-- 通过ID获取数据 -->
    <select id="findThreshold" parameterType="pd" resultType="pd">
        SELECT
            t.DICT_NAME LEVELNAME,
            t.DICT_VALUE LEVELVALUE
        FROM
            `bus_alarm_dict` f
                LEFT JOIN bus_alarm_dict t ON t.PARENT_ID = f.ALARM_DICT_ID and t.ISDELETE = '0'
        where
            f.DICT_NAME=#{DICT_NAME}
          and
            f.ISDELETE = '0'
          and
            f.CORPINFO_ID='8854edee3aa94be496cee676b6d4845a'
        ORDER BY
            CAST( t.DICT_VALUE AS UNSIGNED ) DESC
    </select>
</mapper>
