shiyunteng
2025-03-27 a7ad35b3e20867204cda9faa7bdf8a686264e906
platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml
@@ -49,4 +49,21 @@
               dll.id = #{ledgerId}
              and   d.id = ci.device_id );
   </select>
    <select id="getDeviceListByContractId" resultType="com.by4cloud.platformx.device.entity.Device">
      select
         *
      from
         device d
      where
         d.del_flag = '0'
        and exists (
            select
               ci.device_id
            from
               contract_item ci
            where
               ci.del_flag = '0'
              and ci.contract_id = #{contractId}
              and ci.device_id = d.id )
   </select>
</mapper>