zrj
2024-11-08 4dc18cd2c9d0c44cf8d84cd4687564f26e294eab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?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.springblade.modules.yw.mapper.GeomInfoMapper">
 
    <!--自定义分页查询-->
    <select id="selectGeomInfoPage" resultType="org.springblade.modules.yw.vo.GeomInfoVO">
        select * from yw_geom_info where is_deleted = 0
    </select>
 
    <!--保存空间信息-->
    <insert id="saveGeoInfo">
        insert into yw_geom_info (name,type,geom)
        values (#{geomInfoEntity.name},#{geomInfoEntity.type},ST_GeomFromText(${geomInfoEntity.geom}))
    </insert>
 
    <!--自定义分页查询-->
    <select id="getGeomInfoList" resultType="org.springblade.modules.yw.vo.GeomInfoVO">
        select
        id,name,type,ST_ASTEXT (geom) as geom
        from yw_geom_info ygi
        where ygi.is_deleted = 0
        <if test="ids!=null and ids!=''">
            and ygi.id in
            <foreach collection="ids.split(',')" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
    </select>
 
</mapper>