<?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.njcn.quality.mapper.NetDevMapper">


    <select id="getNetDevList" resultType="EnergyDeviceTreeVO">
        select id,name,1 as level from ele_net_dev
        where state = 1
        order by sort
    </select>

    <select id="getNetDevDetail" resultType="NetDevInfoVO">
        select a.*,b.version versionId,c.* from ele_net_dev a
        inner join ele_dev_version b on a.version_id = b.id
        inner join ele_hardware c on a.id = c.id
        where a.state = 1
        and a.id = #{id}
    </select>
</mapper>
