映射表绑定设备列表bug修改

This commit is contained in:
huguanghan 2025-01-21 17:35:44 +08:00
parent bb99330cbf
commit 5ddf1ddc5d

View File

@ -105,7 +105,10 @@
</select>
<select id="getBindDeviceByLink" resultMap="EquipmentMap">
select t.id ,t."name",t.iot_model_id,t.iot_addr from sys_equipment t where t.id in (select distinct equipment_id from sys_imptabmapping where link_id =#{linkId})
select se.id ,se."name",se.iot_model_id,se.iot_addr,min( imp.porder) as porder from sys_imptabmapping imp
left join sys_equipment se on imp.equipment_id = se.id
where link_id = #{linkId}
group by se.id ,se."name",se.iot_model_id,se.iot_addr order by porder
</select>
<delete id="deleteMappingByLinkId">