|
@@ -3,6 +3,7 @@ package com.zjugis.yzt.dao;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.zjugis.yzt.beans.entity.Pewg;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
import org.apache.ibatis.annotations.Update;
|
|
|
|
|
|
@Mapper
|
|
@@ -15,4 +16,10 @@ public interface PewgMapper extends BaseMapper<Pewg> {
|
|
|
*/
|
|
|
@Update("UPDATE pewg SET shape = st_geometry(#{shape}, #{wkid}) WHERE objectid = #{id}")
|
|
|
int updateShapeById(Integer id, String shape, int wkid);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据objectid查询shape的面积(平方米)
|
|
|
+ */
|
|
|
+ @Select("SELECT st_area(shape) FROM sde.pewg WHERE objectid = #{objectid}")
|
|
|
+ Double selectAreaById(Integer objectid);
|
|
|
}
|