From b018157eb7d8de9c33cb7bab144f8cec44c680c8 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 27 十一月 2023 11:09:32 +0800 Subject: [PATCH] 解决标绘导出shp接受参数异常 --- src/main/java/com/moon/server/helper/ShpHelper.java | 2 +- src/main/java/com/moon/server/entity/ctrl/MarkJsonEntity.java | 8 ++++---- src/main/resources/application.yml | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/moon/server/entity/ctrl/MarkJsonEntity.java b/src/main/java/com/moon/server/entity/ctrl/MarkJsonEntity.java index c9fa854..4c28073 100644 --- a/src/main/java/com/moon/server/entity/ctrl/MarkJsonEntity.java +++ b/src/main/java/com/moon/server/entity/ctrl/MarkJsonEntity.java @@ -9,7 +9,7 @@ public class MarkJsonEntity implements Serializable { private static final long serialVersionUID = 7776629022021914001L; - private Integer id; + private Long id; private String name; @@ -26,15 +26,15 @@ public MarkJsonEntity() { } - public MarkJsonEntity(Integer id) { + public MarkJsonEntity(Long id) { this.id = id; } - public Integer getId() { + public Long getId() { return id; } - public void setId(Integer id) { + public void setId(Long id) { this.id = id; } diff --git a/src/main/java/com/moon/server/helper/ShpHelper.java b/src/main/java/com/moon/server/helper/ShpHelper.java index c046f86..df2e444 100644 --- a/src/main/java/com/moon/server/helper/ShpHelper.java +++ b/src/main/java/com/moon/server/helper/ShpHelper.java @@ -124,7 +124,7 @@ for (int i = 0; i < layer.GetFeatureCount(); i++) { Feature f = layer.GetFeature(i); - MarkJsonEntity me = new MarkJsonEntity(i + 1); + MarkJsonEntity me = new MarkJsonEntity(i + 1L); for (Integer key : fieldMap.keySet()) { Field field = fieldMap.get(key); GdbHelper.setValue(me, f, field, key); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 44de3ef..84f63f7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -46,12 +46,12 @@ datasource: name: prod # JDBC 鍩烘湰閰嶇疆 ¤tSchema=public - #url: jdbc:postgresql://127.0.0.1:5433/moon?useAffectedRows=true - url: jdbc:postgresql://192.168.20.83:5433/moon?useAffectedRows=true + url: jdbc:postgresql://127.0.0.1:5433/moon?useAffectedRows=true + #url: jdbc:postgresql://192.168.20.83:5433/moon?useAffectedRows=true #url: jdbc:postgresql://103.85.165.99:25432/moon?useAffectedRows=true username: postgres - password: Postgres!_14_moon - #password: postgres + #password: Postgres!_14_moon + password: postgres driver-class-name: org.postgresql.Driver platform: POSTGRESQL type: com.alibaba.druid.pool.DruidDataSource -- Gitblit v1.9.3