管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-04 8aa79d9913374a471c80f5855a773850b87f601c
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
package com.lf.server.mapper.all;
 
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
/**
 * 空间基础Mapper
 * @author WWW
 * @param <T> 泛型
 */
public interface GeomBaseMapper<T> extends BasicMapper<T> {
    /**
     * 根据ID查询WKT
     *
     * @param tab 表名
     * @param gid GID
     * @return WKT
     */
    @Select("select ST_AsText(geom) geom from ${tab} where gid = #{gid}")
    public String selectWktById(@Param("tab") String tab, @Param("gid") Integer gid);
 
    /**
     * 根据表名查询空间参考
     *
     * @param tab 表名
     * @return SRID
     */
    @Select("select ST_SRID(geom) from ${tab} limit 1")
    public Integer selectSrid(@Param("tab") String tab);
}