<?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.huimv.environ.eco.mapper.EcoDeviceMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.huimv.environ.eco.entity.EcoDevice">
        <id column="id" property="id" />
        <result column="device_code" property="deviceCode" />
        <result column="device_type" property="deviceType" />
        <result column="unit_id" property="unitId" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, device_code, device_type, unit_id
    </sql>
<!--    <select id="selectList2" resultType="java.util.Map">-->
<!--        SELECT ed.*,bp.pigpen_name FROM `eco_device` ed LEFT JOIN  `base_pigpen` bp ON ed.unit_id=bp.id-->
<!--    </select>-->
<!--    <select id="selectList3" resultType="java.util.Map">-->
<!--        SELECT ed.*,bp.pigpen_name FROM `eco_device` ed LEFT JOIN  `base_pigpen` bp ON ed.unit_id=bp.id-->
<!--&lt;!&ndash;        <if test="ew.customSqlSegment != '' and ew.customSqlSegment != null">&ndash;&gt;-->
<!--&lt;!&ndash;            ${ew.customSqlSegment}&ndash;&gt;-->
<!--&lt;!&ndash;        </if>&ndash;&gt;-->
<!--        ${ew.customSqlSegment}-->
<!--    </select>-->

</mapper>
