From ac8bf95409ef0fe471e0fc195b2af1f36daf6676 Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Mon, 21 Aug 2023 17:37:51 +0800 Subject: [PATCH] fix:部分配置修改 --- screen-api/src/main/resources/mapper/DeviceMapper.xml | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/screen-api/src/main/resources/mapper/DeviceMapper.xml b/screen-api/src/main/resources/mapper/DeviceMapper.xml index 04fd460..5f47265 100644 --- a/screen-api/src/main/resources/mapper/DeviceMapper.xml +++ b/screen-api/src/main/resources/mapper/DeviceMapper.xml @@ -43,4 +43,23 @@ 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> \ No newline at end of file -- Gitblit v1.8.0