吉安感知网项目-后端
linwei
2026-01-28 c04afebf9cebfd65bf55c2395e732f36f558d208
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -38,18 +38,7 @@
    <select id="selectFwDevicePage" resultMap="fwDeviceResultMap">
        select
            *,
            (
            select
                 count(*)
             from
                 ja_fw_device_track tmp
             where
                 ja_fw_device.id = tmp.device_id
                ) out_count
            from
                ja_fw_device
        select * from ja_fw_device
        <where>
            is_deleted = 0
            <if test="param2.id != null and param2.id != ''">
@@ -144,6 +133,12 @@
            <if test="status != null">
                and status = #{status}
            </if>
            <if test="isTrack != null and isTrack == 1">
                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) > 0
            </if>
            <if test="isTrack != null and isTrack == 2">
                and (SELECT COUNT(*) FROM ja_fw_device_track tmp WHERE ja_fw_device.id = tmp.device_id) = 0
            </if>
        </where>
    </select>