|
@@ -1,5 +1,6 @@
|
|
|
package cn.reghao.tnb.content.app.geo.model.po;
|
|
package cn.reghao.tnb.content.app.geo.model.po;
|
|
|
|
|
|
|
|
|
|
+import cn.reghao.jutil.jdk.converter.DateTimeConverter;
|
|
|
import cn.reghao.jutil.jdk.db.BaseObject;
|
|
import cn.reghao.jutil.jdk.db.BaseObject;
|
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
|
import cn.reghao.tnb.content.app.geo.model.vo.MapPoint;
|
|
import cn.reghao.tnb.content.app.geo.model.vo.MapPoint;
|
|
@@ -7,6 +8,7 @@ import lombok.Getter;
|
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author reghao
|
|
* @author reghao
|
|
@@ -19,11 +21,22 @@ public class GeoPoint extends BaseObject<Integer> {
|
|
|
private BigDecimal longitude;
|
|
private BigDecimal longitude;
|
|
|
// 纬度
|
|
// 纬度
|
|
|
private BigDecimal latitude;
|
|
private BigDecimal latitude;
|
|
|
|
|
+ private String title;
|
|
|
private Long createBy;
|
|
private Long createBy;
|
|
|
|
|
+ private LocalDateTime createAt;
|
|
|
|
|
|
|
|
public GeoPoint(MapPoint mapPoint) {
|
|
public GeoPoint(MapPoint mapPoint) {
|
|
|
this.longitude = BigDecimal.valueOf(mapPoint.getLng());
|
|
this.longitude = BigDecimal.valueOf(mapPoint.getLng());
|
|
|
this.latitude = BigDecimal.valueOf(mapPoint.getLat());
|
|
this.latitude = BigDecimal.valueOf(mapPoint.getLat());
|
|
|
this.createBy = UserContext.getUser();
|
|
this.createBy = UserContext.getUser();
|
|
|
|
|
+ this.createAt = DateTimeConverter.localDateTime(System.currentTimeMillis());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public GeoPoint(MapPoint mapPoint, String title) {
|
|
|
|
|
+ this.longitude = BigDecimal.valueOf(mapPoint.getLng());
|
|
|
|
|
+ this.latitude = BigDecimal.valueOf(mapPoint.getLat());
|
|
|
|
|
+ this.title = title;
|
|
|
|
|
+ this.createBy = UserContext.getUser();
|
|
|
|
|
+ this.createAt = DateTimeConverter.localDateTime(System.currentTimeMillis());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|