吉安感知网项目-后端
rain
2026-01-23 7473859cd3ee464fde053435f7c2da5aab71aa9b
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.sxkj.gd.workOrder.mapper.GdManageDeviceMapper">
<mapper namespace="org.sxkj.gd.workorder.mapper.GdManageDeviceMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="gdManageDeviceResultMap" type="org.sxkj.gd.workorder.entity.GdManageDeviceEntity">
@@ -54,7 +54,9 @@
    <select id="selectGdManageDevicePage" resultMap="gdManageDeviceResultMap">
        select * from ja_gd_manage_device where is_deleted = 0
        select id, device_sn, device_name, nickname, device_payload,longitude,latitude
        from ja_gd_manage_device
        where is_deleted = 0
    </select>
@@ -62,4 +64,32 @@
        SELECT * FROM ja_gd_manage_device ${ew.customSqlSegment}
    </select>
    <select id="selectGdManageDevice" resultType="org.sxkj.gd.workorder.vo.GdManageDeviceVO">
        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>