<?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.mapper.tda.TdaDeviceMapper">

    <select id="getPage" resultType="com.fjhx.params.tda.TdaDeviceEx">
        select ta.app_name applicationName,
               tp.name     productName,
               td.device_name,
               td.node_id,
               td.device_id,
               td.device_name,
               td.secret
        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>
