<?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>
|