<?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.nantian.cloud.dbcapp.mapper.record.DictEnergyUseMapper">

    <select id="getEnergyUseClassCode" resultType="com.nantian.cloud.dbcapp.dto.ResultBo">
        SELECT DISTINCT(class_code) AS "value",class_meaning AS "label"FROM dict_energy_use ORDER BY class_code ASC
    </select>
    <select id="getEnergyUseList" resultType="com.nantian.cloud.dbcapp.dto.ResultBo">
        SELECT code AS "value",
               meaning AS "label"
        FROM
            dict_energy_use
        WHERE class_code = #{classCode} AND state = "0"
        ORDER BY code ASC
    </select>

</mapper>
