123456789101112131415161718192021222324252627282930313233343536373839 |
- <?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="com.onemap.file.mapper.TUploadGeomMapper">
- <!-- 可根据自己的需求,是否要使用 -->
- <resultMap type="TUploadGeomDTO" id="TUploadGeomDTOResult">
- <result property="uploaduser" column="uploaduser"/>
- <result property="uploadtime" column="uploadtime"/>
- <result property="unzippath" column="unzippath"/>
- <result property="spotsnumber" column="spotsnumber"/>
- <result property="spotsarea" column="spotsarea"/>
- <result property="shppath" column="shppath"/>
- <result property="name" column="name"/>
- <result property="id" column="id"/>
- <result property="geom" column="geom"/>
- <result property="fromtype" column="fromtype"/>
- <result property="fromroute" column="fromroute"/>
- <result property="filetype" column="filetype"/>
- <result property="filepath" column="filepath"/>
- </resultMap>
- <insert id="insertTUploadGeom" parameterType="TUploadGeomDTO">
- INSERT INTO t_upload_geom (id,name,uploaduser,uploadtime,unzippath,spotsnumber,spotsarea,shppath,geom,fromtype,fromroute,filetype,filepath)
- VALUES (#{id},#{name},#{uploaduser},now(), #{unzippath}, #{spotsnumber}, public.st_area(public.st_transform(public.st_geomfromewkt(#{geom}), #{sridarea})),#{shppath},
- public.st_transform(public.st_geomfromewkt(#{geom}), 4326),#{fromtype},#{fromroute},#{filetype},#{filepath})
- </insert>
- <select id="selectTUploadGeomById" parameterType="String" resultMap="TUploadGeomDTOResult">
- select id,name,uploaduser,uploadtime,unzippath,spotsnumber,round(spotsarea,2) spotsarea,shppath,public.st_asewkt(geom) AS geom,fromtype,fromroute,filetype,filepath
- from t_upload_geom
- where id = #{id}
- </select>
-
- <delete id="deleteTUploadGeomById" parameterType="String">
- delete from t_upload_geom where id = #{id}
- </delete>
- </mapper>
|