<?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.fjhx.iot.mapper.tda.TdaDeviceMapper">
    <select id="getPage" resultType="com.fjhx.iot.entity.tda.vo.TdaDeviceVo">
        select td.id,
               td.tda_product_id,
               td.product_id,
               td.node_id,
               td.device_name,
               td.device_id,
               td.secret,
               td.create_user,
               td.create_time,
               td.update_user,
               td.update_time,
               tp.name        productName,
               tp.device_type deviceType,
               ta.app_name
        from tda_device td
                 left join tda_product tp on td.tda_product_id = tp.id
                 left join tda_application ta on tp.tda_application_id = ta.id
            ${ew.customSqlSegment}
    </select>

</mapper>
