|
|
@ -23,8 +23,8 @@ |
|
|
idc.relation_id, |
|
|
idc.relation_id, |
|
|
itt.code as thing_code, |
|
|
itt.code as thing_code, |
|
|
itt.name as thing_name, |
|
|
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.in_msg, |
|
|
idcl.out_msg, |
|
|
idcl.out_msg, |
|
|
idcl.error_msg, |
|
|
idcl.error_msg, |
|
|
@ -34,8 +34,7 @@ |
|
|
iot_device_control_log idcl |
|
|
iot_device_control_log idcl |
|
|
INNER JOIN iot_device_control idc ON idcl.control_id = idc.id |
|
|
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_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 |
|
|
LEFT JOIN sys_user su ON idcl.creator = su.id |
|
|
<where> |
|
|
<where> |
|
|
<if test="name != null and name.trim() != ''"> |
|
|
<if test="name != null and name.trim() != ''"> |
|
|
@ -45,7 +44,7 @@ |
|
|
and (itt.code like #{device} or itt.name like #{device}) |
|
|
and (itt.code like #{device} or itt.name like #{device}) |
|
|
</if> |
|
|
</if> |
|
|
<if test="attr != null and attr.trim() != ''"> |
|
|
<if test="attr != null and attr.trim() != ''"> |
|
|
and (itd.code like #{attr} or idr.to_name like #{attr}) |
|
|
|
|
|
|
|
|
and (idr.code like #{attr} or idr.name like #{attr}) |
|
|
</if> |
|
|
</if> |
|
|
<if test="extendId != null"> |
|
|
<if test="extendId != null"> |
|
|
and idc.extend_id = #{extendId} |
|
|
and idc.extend_id = #{extendId} |
|
|
|