nnnjjj123
2021-01-28 71b6b716361c52af290493d365a328fc1a3467e2
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.enclosure.mapper.EnclosureMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="enclosureResultMap" type="org.springblade.modules.enclosure.entity.Enclosure">
        <id column="id" property="id"/>
        <result column="anumber" property="anumber"/>
        <result column="aname" property="aname"/>
        <result column="coordinate" property="coordinate"/>
    </resultMap>
 
 
    <select id="selectEnclosurePage" resultMap="enclosureResultMap">
        select * from sys_enclosure where is_deleted = 0
    </select>
 
    <insert id="inserte">
    INSERT INTO sys_enclosure (anumber,aname,coordinate) VALUES (#{anumber},#{aname},ST_GeomFromText(${a}));
    </insert>
 
    <update id="updatee">
        update sys_enclosure SET anumber=#{anumber},aname=#{aname},coordinate=ST_GeomFromText(${a}) where anumber=#{anumber}
    </update>
 
    <select id="selectList" resultMap="enclosureResultMap">
        SELECT id,anumber,aname,ST_ASTEXT (coordinate) AS coordinate FROM sys_enclosure
    </select>
 
</mapper>