吉安感知网项目-后端
linwei
2026-01-22 1510366fa12fafd5197ebcd8d7fbc45d2383218d
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml
@@ -65,15 +65,31 @@
    </select>
    <select id="selectGdManageDevice" resultType="org.sxkj.gd.workorder.vo.GdManageDeviceVO">
        select id, device_sn, device_name, nickname, device_payload,longitude,latitude
        from ja_gd_manage_device
        where is_deleted = 0
        select
        id,
        device_sn,
        device_name,
        nickname,
        device_payload,
        longitude,
        latitude,
        geom
        from
        ja_gd_manage_device
        where
        is_deleted = 0
        <if test="deviceIds != null and deviceIds.size() > 0">
            and id in
            <foreach item="item" collection="deviceIds" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
        <if test="devicePayload != null and devicePayload != ''">
            and device_payload like concat('%',#{devicePayload},'%')
        </if>
        <if test="geom != null and geom != ''">
            and ST_Intersects(geom, ST_GeomFromText(#{geom}))
        </if>
    </select>
</mapper>