提交 d1d1f07a 作者: 方治民

合并分支 'dev_fzm' 到 'dev_lijing'

Dev fzm

查看合并请求 chemical-kesai/kshg-api!11
......@@ -44,4 +44,7 @@ dependencies {
// JTS 几何对象操作库
implementation "org.locationtech.jts:jts-core:${jtsVersion}"
// https://mvnrepository.com/artifact/com.graphhopper.external/jackson-datatype-jts
implementation 'com.graphhopper.external:jackson-datatype-jts:1.0-2.7'
}
/* (C) 2022 YiRing, Inc. */
package com.yiring.app.config;
import com.bedatadriven.jackson.datatype.jts.JtsModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author Jim
* @version 0.1
* 2022/4/8 11:18
*/
@Configuration
public class JtsModuleConfig {
@Bean
public JtsModule jtsModule() {
return new JtsModule();
}
}
......@@ -4,6 +4,8 @@ package com.yiring.app.domain.location;
import com.yiring.common.annotation.FieldMapping;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;
import lombok.*;
import lombok.experimental.FieldDefaults;
......@@ -78,6 +80,12 @@ public class LocationFence implements Serializable {
@Comment("消抖时间(秒)")
Integer threshold;
@Comment("信标集合")
@Builder.Default
@ManyToMany
@ToString.Exclude
Set<LocationBeacon> beacons = new HashSet<>(0);
@Comment("创建时间")
LocalDateTime createTime;
......
......@@ -3,6 +3,7 @@ package com.yiring.app.domain.location;
import com.alibaba.fastjson.JSONObject;
import com.yiring.app.config.converter.JSONObjectConverter;
import com.yiring.auth.domain.user.User;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
......@@ -49,8 +50,23 @@ public class LocationLog implements Serializable {
@GenericGenerator(name = SnowflakeId.GENERATOR, strategy = SnowflakeId.Strategy.LONG)
Long id;
/**
* 来源于定位数据产生时刻标签所属的人员
*/
@Comment("用户")
@ManyToOne
@JoinColumn(name = "user_id")
User user;
/**
* 来源于定位标签定位时刻的人员状态
*/
@Comment("用户状态")
String status;
@Comment("标签")
@ManyToOne
@JoinColumn(name = "tag_id")
LocationTag tag;
@Comment("时间")
......@@ -67,17 +83,18 @@ public class LocationLog implements Serializable {
BigDecimal altitude;
@Comment("坐标点信息")
@Column(columnDefinition = "POINT")
Point point;
@Comment("信标集合")
@Builder.Default
@OneToMany
@ManyToMany
@ToString.Exclude
Set<LocationBeacon> beacons = new HashSet<>(0);
@Comment("围栏集合")
@Builder.Default
@OneToMany
@ManyToMany
@ToString.Exclude
Set<LocationFence> fences = new HashSet<>(0);
......
......@@ -5,7 +5,7 @@ env:
spring:
datasource:
url: jdbc:postgresql://${env.host}:5432/kshg_app
username: postgres
username: admin
password: 123456
jpa:
database-platform: com.yiring.app.config.dialect.PostgresDialect
......@@ -19,8 +19,13 @@ spring:
redis:
database: 5
host: ${env.host}
rabbitmq:
host: ${env.host}
port: 5672
username: admin
password: 123456
# knife4j
knife4j:
enable: true
......
......@@ -8,7 +8,7 @@ spring:
name: "kshg-api"
profiles:
include: auth
active: mock
active: dev
# DEBUG
debug: false
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论