吉安感知网项目-后端
linwei
2026-02-03 4a6c8a672dc22fe730c0d891eb42b31f2f06f713
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -104,7 +104,24 @@
        select * from ja_fw_device
        <where>
            is_deleted = 0
            <if test="isAreaSelect != null and isAreaSelect == 1">
            <choose>
                <when test="areaIds != null and areaIds.size > 0">
                    and (
                        exists (
                    select 1
                    from ja_fw_area_divide ad
                    where ad.is_deleted = 0
                    and ad.id in
                    <foreach collection="areaIds" item="areaIdItem" separator="," open="(" close=")">
                        #{areaIdItem}
                    </foreach>
                    and ad.device_ids is not null
                    and ad.device_ids != ''
                    and find_in_set(ja_fw_device.id, ad.device_ids)
                        )
                    )
                </when>
                <when test="isAreaSelect != null and isAreaSelect == 1">
                and (
                    <choose>
                        <when test="areaId != null">
@@ -139,7 +156,8 @@
                        </otherwise>
                    </choose>
                )
            </if>
                </when>
            </choose>
            <if test="status != null">
                and status = #{status}
            </if>