| | |
| | | <result column="install_time" property="installTime"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="extend" property="extend"/> |
| | | <result column="town_code" property="townCode"/> |
| | | <result column="dev_num" property="devNum"/> |
| | | </resultMap> |
| | | |
| | | <!--监测因子趋势图数据--> |
| | |
| | | AND `time` <![CDATA[<]]> #{end} |
| | | ORDER BY `time` |
| | | </select> |
| | | <select id="deviceList" resultMap="BaseResultMap"> |
| | | SELECT |
| | | t.latitude, |
| | | t.longitude, |
| | | t.mac, |
| | | t.state |
| | | FROM |
| | | device t |
| | | inner JOIN monitor_point p on p.id = t.monitor_point_id and p.is_delete = 0 |
| | | and p.organization_id in ( |
| | | SELECT t1.id FROM organization t1 |
| | | where t1.id = #{organizationId} or t1.parent_id = #{organizationId}) |
| | | <if test="region != null"> |
| | | and ${region} = #{regionCode} |
| | | </if> |
| | | WHERE |
| | | t.state <![CDATA[ <> ]]> '0' and t.is_delete = 0 |
| | | order by t.id desc |
| | | </select> |
| | | </mapper> |