From 6ce3c21838051b34333e8fd7747ea89f576e4127 Mon Sep 17 00:00:00 2001 From: lishuai Date: Mon, 23 Sep 2024 13:39:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E5=88=B6=E6=97=A5=E5=BF=97=202024?= =?UTF-8?q?=E5=B9=B49=E6=9C=8823=E6=97=A513:39:32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/control/IotDeviceControlLogMapper.xml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/thing/src/main/resources/mapper/control/IotDeviceControlLogMapper.xml b/modules/thing/src/main/resources/mapper/control/IotDeviceControlLogMapper.xml index 5de83db..17d37fb 100644 --- a/modules/thing/src/main/resources/mapper/control/IotDeviceControlLogMapper.xml +++ b/modules/thing/src/main/resources/mapper/control/IotDeviceControlLogMapper.xml @@ -23,8 +23,8 @@ idc.relation_id, itt.code as thing_code, itt.name as thing_name, - itd.code as attr_code, - itd.name as attr_name, + idr.code as attr_code, + idr.name as attr_name, idcl.in_msg, idcl.out_msg, idcl.error_msg, @@ -34,8 +34,7 @@ iot_device_control_log idcl INNER JOIN iot_device_control idc ON idcl.control_id = idc.id LEFT JOIN iot_thing_entity itt ON idc.thing_id = itt.id - LEFT JOIN iot_thing_dict_relation idr ON itt.ID = idr.from_id and idr.to_id= idc.attr_id - INNER JOIN iot_thing_dict itd ON idc.attr_id = itd.id + INNER JOIN iot_thing_dict_relation idr ON itt.ID = idr.entity_id and idr.id= idc.attr_id LEFT JOIN sys_user su ON idcl.creator = su.id @@ -45,7 +44,7 @@ and (itt.code like #{device} or itt.name like #{device}) - and (itd.code like #{attr} or idr.to_name like #{attr}) + and (idr.code like #{attr} or idr.name like #{attr}) and idc.extend_id = #{extendId}