wuww
2025-04-25 b50aa418312034cfebf121f416e197d68aa5d0de
src/main/java/com/se/nsl/domain/po/Region.java
@@ -1,8 +1,10 @@
package com.se.nsl.domain.po;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.netty.util.internal.StringUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -18,17 +20,18 @@
    private String name;
    @ApiModelProperty("类别:1-行政区划,2-重点区域,3-重点沟")
    private Short type;
    private Integer type;
    @ApiModelProperty("空间位置")
    @TableField(value = "st_astext(geom)", select = true)
    private String geom;
    public Region() {
    }
    public Region(String name, Short type, String geom) {
    public Region(String name, int type, String geom) {
        this.name = name;
        this.type = type;
        this.type = Integer.valueOf(type);
        this.geom = geom;
    }
@@ -48,11 +51,11 @@
        this.name = name;
    }
    public Short getType() {
    public Integer getType() {
        return type;
    }
    public void setType(Short type) {
    public void setType(Integer type) {
        this.type = type;
    }
@@ -63,4 +66,8 @@
    public void setGeom(String geom) {
        this.geom = geom;
    }
    public void setGeomText() {
        this.geom = StringUtil.isNullOrEmpty(this.geom) ? "null" : String.format("ST_GeomFromText('%s')", this.geom.trim());
    }
}